Skip to content

Commit

Permalink
Ensure per product archival impacts hierarchy
Browse files Browse the repository at this point in the history
as well as location in iRODS.
Also, use fresh data for NovaSeqX test run.
  • Loading branch information
dkj committed Jul 17, 2023
1 parent 8e44aab commit 279e529
Show file tree
Hide file tree
Showing 6 changed files with 3,738 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/npg_pipeline/product/release/irods.pm
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ sub irods_product_destination_collection {
my $dc;
try {
$dc = $self->irods_product_destination_collection_norf(
$run_collection, $product, $self->platform_NovaSeq());
$run_collection, $product, $self->per_product_archive());
} catch {
$self->logcroak($_);
};
Expand Down
26 changes: 14 additions & 12 deletions t/20-function-seq_to_irods_archiver.t
Original file line number Diff line number Diff line change
Expand Up @@ -290,35 +290,37 @@ subtest 'NovaSeq run' => sub {
ok ($d->excluded, 'step is excluded');
};

subtest 'NovaSeq run' => sub {
plan tests => 2,

my $id_run = 26291;
my $rf_name = '180709_A00538_0010_BH3FCMDRXX';
my $rfpath_test = abs_path(getcwd) . qq{/t/data/novaseq/$rf_name};
subtest 'NovaSeqX run' => sub {
plan tests => 3,
my $id_run = 47515;
my $rf_name = '20230622_LH00210_0007_A225TMTLT3';
my $rfpath_test = abs_path(getcwd) . qq{/t/data/novaseqx/$rf_name};
my $rfpath = "$tmp_dir/$rf_name";
dircopy($rfpath_test, $rfpath);
copy('t/data/run_params/RunParameters.novaseqx.xml',
"$rfpath/RunParameters.xml");
my $bbc_path = qq{$rfpath/Data/Intensities/BAM_basecalls_20180805-013153};
my $bbc_path = qq{$rfpath/Data/Intensities/BAM_basecalls_20230703-150003};

local $ENV{NPG_CACHED_SAMPLESHEET_FILE} =
qq{$bbc_path/metadata_cache_26291/samplesheet_26291.csv};
qq{$bbc_path/metadata_cache_47515/samplesheet_47515.csv};

my $col = qq{/seq/illumina/runs/26/$id_run};
my $col = qq{/seq/illumina/runs/47/$id_run};

my $a = npg_pipeline::function::seq_to_irods_archiver->new(
run_folder => $rf_name,
runfolder_path => $rfpath,
analysis_path => $bbc_path,
conf_path => $config_dir,
id_run => $id_run,
timestamp => q{20181204},
timestamp => q{20230702},
resource => $defaults
);

ok ($a->per_product_archive(), 'per-product archival');
is ($a->irods_destination_collection(), $col, 'correct run collection');
my $da = $a->create();
my $d = $da->[0];
like ($d->command,
qr{--collection \S+illumina/runs\S+lane1\/plex1},
'command has per product iRODS destination collection');
};

1;
Expand Down
Loading

0 comments on commit 279e529

Please sign in to comment.