Skip to content

Commit

Permalink
Samplesheet generation tests - move to mlwh driver.
Browse files Browse the repository at this point in the history
Previously the tests uses XML feeds as a source of LIMS
data. All production code is using mlwh database as a
source of LIMS data. Amend tests to use mlwh data and
the default ml_warehouse lims driver.

Amended how an undefined sample public name is dealt with,
i.e. converted an error to a warning and assigned a sensible
fall-back value.

Some samplesheets are generated without names of study owners,
followers, etc. This is due to the fact that some studies
do not have fixtures for user data.

The database fixtures were generated from the current data,
this explains multiple differences between the old and new
content of the generated samplesheets.

In some tests newer production batches were used instead of
hand-crafted data.

Deleted tests for old scenarios that do not exist in production
any longer.

Deleted tests that are duplicated by similar tests with more
contemporary test data.
  • Loading branch information
mgcam committed Sep 19, 2023
1 parent 0f18be3 commit 02c083d
Show file tree
Hide file tree
Showing 13 changed files with 17,540 additions and 283 deletions.
7 changes: 6 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ t/data/fixtures_stlims_wh/000-Study.yml
t/data/fixtures_stlims_wh/100-IseqFlowcell.yml
t/data/fixtures_stlims_wh/100-StudyUser.yml
t/data/fixtures_stlims_wh/200-IseqProductMetric.yml
t/data/fixtures_lims_wh_samplesheet/000-Sample.yml
t/data/fixtures_lims_wh_samplesheet/000-Study.yml
t/data/fixtures_lims_wh_samplesheet/100-StudyUser.yml
t/data/fixtures_lims_wh_samplesheet/100-IseqFlowcell.yml
t/data/gaii/staging/IL3/incoming/100622_IL3_01234/this_run_is_not_complete_yet
t/data/gaii/staging/IL5/incoming/not_a_dir
t/data/gaii/staging/IL999/incoming/100622_IL3_01234/Recipe_GA2-PEM_2x76Cycle_v7.7.xml
Expand Down Expand Up @@ -743,12 +747,13 @@ t/data/run_params/RunParameters.novaseq.xp.lite.xml
t/data/samplesheet/samplesheet_7753.csv
t/data/samplesheet/samplesheet_27483.csv
t/data/samplesheet/samplesheet_33990.csv
t/data/samplesheet/1control7libs_extended.csv
t/data/samplesheet/4pool4libs_extended.csv
t/data/samplesheet/6946_extended.csv
t/data/samplesheet/7007_extended.csv
t/data/samplesheet/8pools_extended.csv
t/data/samplesheet/dual_index_extended.csv
t/data/samplesheet/dual_index_default_new.csv
t/data/samplesheet/dual_index_extended_new.csv
t/data/samplesheet/miseq_default.csv
t/data/samplesheet/miseq_default_dual_index.csv
t/data/samplesheet/miseq_extended.csv
Expand Down
4 changes: 2 additions & 2 deletions lib/npg/samplesheet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ sub _build__limsreflist {
foreach my $attr (qw/library_id sample_publishable_name/) {
my $value = _csv_compatible_value($tmpl->$attr);
if (!$value) {
croak sprintf '%s is not available for position %i %s',
carp sprintf '%s is not available for position %i %s',
$attr, $tmpl->position,
defined $tmpl->tag_index ? 'tag index ' . $tmpl->tag_index : q[];
}
if ($self->mkfastq) {
if (!$value || $self->mkfastq) {
# when making a samplesheet for mkfastq, replace value by run_position
$value = $self->id_run . q[_] . $tmpl->position;
if($self->_index_read) {
Expand Down
250 changes: 103 additions & 147 deletions t/47-samplesheet.t

Large diffs are not rendered by default.

Loading

0 comments on commit 02c083d

Please sign in to comment.