Skip to content

Commit

Permalink
Fixed a bug in the autoqc function package.
Browse files Browse the repository at this point in the history
The runfolder_path attribute is passed to the constructor
of the review autoqc check object when deciding whether
this check should run.

Updated the RoboQC section of the existing test product
configuration file.
  • Loading branch information
mgcam committed Sep 17, 2024
1 parent a2bf416 commit cd717a5
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ LIST OF CHANGES
the checksum of the downloaded script to the expected value. We now store
an updated expected checksum value, which corresponds to the latest release.
- GitHub CI - updated deprecated v2 runner to v3

- The runfolder_path attribute is passed to the constructor of the review
autoqc check object when deciding whether this check should run.

release 68.5.0 (2024-09-04)
- The runfolder_path argument is added to the command for the autoqc review
Expand Down
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,7 @@ t/data/release/config/haplotype_caller_on_study_specific_reference/product_relea
t/data/release/config/notify_off/product_release.yml
t/data/release/config/notify_on/product_release.yml
t/data/release/config/qc_review/product_release.yml
t/data/release/config/qc_review_default/product_release.yml
t/data/release/config/pp_archival/product_release.yml
t/data/release/config/pp_archival/product_release_no_array.yml
t/data/release/config/pp_archival/product_release_no_filters.yml
Expand Down
3 changes: 2 additions & 1 deletion lib/npg_pipeline/function/autoqc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ sub _should_run {
$init_hash{'is_paired_read'} = $self->is_paired_read() ? 1 : 0;
} elsif ($self->qc_to_run() eq 'review') {
$init_hash{'product_conf_file_path'} = $self->product_conf_file_path;
$init_hash{'runfolder_path'} = $self->runfolder_path;
} elsif ($self->qc_to_run() eq 'genotype') {
my $ref_fasta = npg_pipeline::cache::reference->instance()
->get_path($product, q(fasta), $self->repository());
Expand Down Expand Up @@ -416,7 +417,7 @@ Marina Gourtovaia
=head1 LICENSE AND COPYRIGHT
Copyright (C) 2018,2019,2020 Genome Research Ltd.
Copyright (C) 2018,2019,2020,2024 Genome Research Ltd.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
21 changes: 20 additions & 1 deletion t/20-function-autoqc.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ my $archive_dir = $hiseq_rf->{'archive_path'};
my $rf_path = $hiseq_rf->{'runfolder_path'};
fcopy('t/data/run_params/runParameters.hiseq.xml', "$rf_path/runParameters.xml")
or die 'Fail to copy run param file';
fcopy('t/data/run_params/RunInfo.hiseq.rr.xml', "$rf_path/RunInfo.xml")
or die 'Fail to copy run info file';

my $default = {
default => {
Expand Down Expand Up @@ -574,7 +576,7 @@ subtest 'genotype and gc_fraction and bcfstats' => sub {
};

subtest 'review' => sub {
plan tests => 6;
plan tests => 8;

local $ENV{NPG_CACHED_SAMPLESHEET_FILE} = 't/data/samplesheet_8747.csv';

Expand Down Expand Up @@ -625,6 +627,23 @@ subtest 'review' => sub {
qq{--qc_in=$archive_dir/lane1/plex1/qc --conf_path=t/data/release/config/qc_review } .
qq{--runfolder_path=$rf_path};
is ($d->command, $expected_command, 'correct command for plex-level job');

$qc = npg_pipeline::function::autoqc->new(
qc_to_run => 'review',
is_indexed => 1,
id_run => 8747,
runfolder_path => $rf_path,
timestamp => q{today},
conf_path => q{t/data/release/config/qc_review_default},
resource => $default
);

$da = $qc->create();
ok ($da && (@{$da} == 6), '6 definitions returned');
%definitions = map { $_->composition->freeze2rpt => $_ } @{$da};
@expected_rpt_lists = map { "8747:$_:168"} qw/1 2 3 4 5 6/;
is_deeply ([sort keys %definitions], \@expected_rpt_lists,
'definitions are for correct entities');
};

subtest 'interop' => sub {
Expand Down
14 changes: 8 additions & 6 deletions t/data/release/config/qc_review/product_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ default:
study:
- study_id: "1713"
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
lims:
- library_type:
- "Agilent Pulldown"
lims:
library_type:
- "Agilent Pulldown"
acceptance_criteria:
- "criteria1"
- study_id: "2410"
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
lims:
- library_type:
- "Custom"
lims:
library_type:
- "Custom"
acceptance_criteria:
- "criteria2"
22 changes: 22 additions & 0 deletions t/data/release/config/qc_review_default/product_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
common:
irods: &no_irods
enable: false
default:
irods: &default_irods
enable: true
data_deletion:
staging_deletion_delay: 30
markdup_method: "biobambam"
gbs_pipeline: &gbs_pipeline_accessible
allowed: true
robo_qc:
qc_type: "mqc"
criteria:
- applicability_criteria:
lims:
is_control: 1
sequencing_run:
platform_HiSeq: 1
acceptance_criteria:
- "sequence_error.pass"

0 comments on commit cd717a5

Please sign in to comment.