Skip to content

Commit

Permalink
QC type should be defined, default fallback is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcam committed Sep 13, 2024
1 parent fa8ae77 commit 230b33f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 9 deletions.
11 changes: 7 additions & 4 deletions lib/npg_qc/autoqc/checks/review.pm
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ RoboQC definitions. Library Manual QC is configured as C<qc_type: "mqc">.
The other recognised type is C<mqc_lane>, 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
Expand Down Expand Up @@ -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 " .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ default:
enable: true
notify: false
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
lims:
Expand Down
4 changes: 3 additions & 1 deletion t/data/autoqc/review/default_section/product_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 6 additions & 3 deletions t/data/autoqc/review/generic/product_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ study:
pp_staging_root: "{{ lustre_mount }}/climb_upload"
robo_qc:
criteria:
- applicability_criteria:
- qc_type: "mqc"
applicability_criteria:
lims:
sample_is_control:
- 0
- ""
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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ study:
merge:
component_cache_dir: "/merge_component_cache/5392/"
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
acceptance_criteria:
Expand Down
3 changes: 2 additions & 1 deletion t/data/autoqc/review/product_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions t/data/autoqc/review/with_criteria/product_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ study:
merge:
component_cache_dir: "/merge_component_cache/4042/"
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
lims:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ study:
merge:
component_cache_dir: "/merge_component_cache/5392/"
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
lims:
Expand Down

0 comments on commit 230b33f

Please sign in to comment.