diff --git a/lib/npg_qc/autoqc/checks/review.pm b/lib/npg_qc/autoqc/checks/review.pm index 89149f9d1..27386f100 100644 --- a/lib/npg_qc/autoqc/checks/review.pm +++ b/lib/npg_qc/autoqc/checks/review.pm @@ -106,9 +106,9 @@ RoboQC definitions. Library Manual QC is configured as C. The other recognised type is C, which is only compatible with lane-level entities. -If the Robo QC type is not defined directly in the top-level section, -it should be defined for each of the criteria individually. The definition -on teh criteria level takes precedence. +If the QC type is not defined directly in the top-level section, it should +be defined for each of the criteria individually. The definition on the +criteria level takes precedence. =head2 Rules for assignment of the QC outcome @@ -598,7 +598,10 @@ sub _build__outcome_type { if (!$outcome_type) { $outcome_type = $self->_robo_config()->{$QC_TYPE_KEY}; } - $outcome_type ||= $QC_TYPE_LIB; + + if (!$outcome_type) { + croak 'QC type is not defined in a RoboQC config for ' . $self->_entity_desc; + } if (none { $outcome_type eq $_ } @VALID_QC_TYPES) { croak "Invalid QC type '$outcome_type' in a RoboQC config for " . diff --git a/t/data/autoqc/review/default_and_study_section/product_release.yml b/t/data/autoqc/review/default_and_study_section/product_release.yml index 2b465394c..60e6dbe0b 100644 --- a/t/data/autoqc/review/default_and_study_section/product_release.yml +++ b/t/data/autoqc/review/default_and_study_section/product_release.yml @@ -8,6 +8,7 @@ default: enable: true notify: false robo_qc: + qc_type: "mqc" criteria: - applicability_criteria: lims: diff --git a/t/data/autoqc/review/default_section/product_release.yml b/t/data/autoqc/review/default_section/product_release.yml index ca3d9efab..eda27234d 100644 --- a/t/data/autoqc/review/default_section/product_release.yml +++ b/t/data/autoqc/review/default_section/product_release.yml @@ -3,8 +3,10 @@ default: irods: enable: true robo_qc: + qc_type: "mqc_lane" criteria: - - applicability_criteria: + - qc_type: "mqc" + applicability_criteria: lims: library_type: - "HiSeqX PCR free" diff --git a/t/data/autoqc/review/generic/product_release.yml b/t/data/autoqc/review/generic/product_release.yml index 2f1fe84c3..82963a905 100644 --- a/t/data/autoqc/review/generic/product_release.yml +++ b/t/data/autoqc/review/generic/product_release.yml @@ -31,7 +31,8 @@ study: pp_staging_root: "{{ lustre_mount }}/climb_upload" robo_qc: criteria: - - applicability_criteria: + - qc_type: "mqc" + applicability_criteria: lims: sample_is_control: - 0 @@ -39,7 +40,8 @@ study: acceptance_criteria : - &heron_robo_realsample_ac1 "generic:ncov2019_artic_nf.doc->{meta}->{'num_input_reads'} and (generic:ncov2019_artic_nf.doc->{'QC summary'}->{qc_pass} eq 'TRUE')" - &heron_robo_realsample_ac2 "(generic:ncov2019_artic_nf.doc->{meta}->{'max_negative_control_filtered_read_count'} < 100) or ((generic:ncov2019_artic_nf.doc->{meta}->{'max_negative_control_filtered_read_count'} <= 1000) and (generic:ncov2019_artic_nf.doc->{'QC summary'}->{num_aligned_reads} > 100 * generic:ncov2019_artic_nf.doc->{meta}->{'max_negative_control_filtered_read_count'}))" - - applicability_criteria: + - qc_type: "mqc" + applicability_criteria: lims: sample_is_control: - 1 @@ -48,7 +50,8 @@ study: acceptance_criteria : - *heron_robo_realsample_ac1 - *heron_robo_realsample_ac2 - - applicability_criteria: + - qc_type: "mqc" + applicability_criteria: lims: sample_is_control: - 1 diff --git a/t/data/autoqc/review/no_applicability4single/product_release.yml b/t/data/autoqc/review/no_applicability4single/product_release.yml index b52bbb379..e57b138f4 100644 --- a/t/data/autoqc/review/no_applicability4single/product_release.yml +++ b/t/data/autoqc/review/no_applicability4single/product_release.yml @@ -24,6 +24,7 @@ study: merge: component_cache_dir: "/merge_component_cache/5392/" robo_qc: + qc_type: "mqc" criteria: - applicability_criteria: acceptance_criteria: diff --git a/t/data/autoqc/review/product_release.yml b/t/data/autoqc/review/product_release.yml index 2203a4ef6..b291834e4 100644 --- a/t/data/autoqc/review/product_release.yml +++ b/t/data/autoqc/review/product_release.yml @@ -25,7 +25,8 @@ study: component_cache_dir: "/merge_component_cache/5392/" robo_qc: criteria: - - applicability_criteria: + - qc_type: "mqc" + applicability_criteria: lims: library_type: - "HiSeqX PCR free" diff --git a/t/data/autoqc/review/with_criteria/product_release.yml b/t/data/autoqc/review/with_criteria/product_release.yml index 327cca5c1..88079b9b5 100644 --- a/t/data/autoqc/review/with_criteria/product_release.yml +++ b/t/data/autoqc/review/with_criteria/product_release.yml @@ -23,6 +23,7 @@ study: merge: component_cache_dir: "/merge_component_cache/4042/" robo_qc: + qc_type: "mqc" criteria: - applicability_criteria: lims: diff --git a/t/data/autoqc/review/wrong_default_and_study_section/product_release.yml b/t/data/autoqc/review/wrong_default_and_study_section/product_release.yml index ecc244942..e3cf31dfc 100644 --- a/t/data/autoqc/review/wrong_default_and_study_section/product_release.yml +++ b/t/data/autoqc/review/wrong_default_and_study_section/product_release.yml @@ -27,6 +27,7 @@ study: merge: component_cache_dir: "/merge_component_cache/5392/" robo_qc: + qc_type: "mqc" criteria: - applicability_criteria: lims: