Skip to content

Commit

Permalink
Merge pull request #770 from mgcam/simplify_all_lanes_mergeable
Browse files Browse the repository at this point in the history
Restricted automatically meargeable to NovaSeq.
  • Loading branch information
mgcam authored Oct 27, 2023
2 parents 7b8e6fc + b3525ab commit 928d753
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions lib/npg_tracking/illumina/run/long_info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -654,17 +654,14 @@ sub _build_sbs_consumable_version {

=head2 all_lanes_mergeable
Returns true if either the NovaSeq Standard (ie not NovaSeqXp) workflow
was used or this was a rapid run since in the latter case same library is used
on both lanes.
Returns true if the NovaSeq Standard (ie not NovaSeqXp) workflow was used
since it is guaranteed that the same library is used on all lanes.
=cut

sub all_lanes_mergeable {
my $self = shift;
return (
($self->workflow_type() =~ /NovaSeqStandard/xms) or $self->is_rapid_run()
);
return ($self->workflow_type() =~ /NovaSeqStandard/xms);
}

=head2 is_rapid_run
Expand Down
6 changes: 3 additions & 3 deletions t/60-illumina-run-long_info.t
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ subtest 'retrieving information from runParameters.xml' => sub {

if ($f =~ /\.rr\./) {
ok ($li->is_rapid_run(), 'is rapid run');
ok ($li->all_lanes_mergeable(), 'all lanes meargeable');
ok (!$li->all_lanes_mergeable(), 'lanes are not mergeable');
if ($f =~ /\.truseq\./) {
ok (!$li->is_rapid_run_v2(), 'rapid run version is not 2');
ok ($li->is_rapid_run_v1(), 'rapid run version is 1');
Expand All @@ -101,10 +101,10 @@ subtest 'retrieving information from runParameters.xml' => sub {
ok (!$li->is_rapid_run(), 'is not rapid run');
if ($f =~ /\.novaseq\./) {
if ($f =~ /\.xp\./) {
ok (!$li->all_lanes_mergeable(), 'lanes are not meargeable');
ok (!$li->all_lanes_mergeable(), 'lanes are not mergeable');
is ($li->workflow_type, 'NovaSeqXp', 'Xp workflow type');
} else {
ok ($li->all_lanes_mergeable(), 'all lanes meargeable');
ok ($li->all_lanes_mergeable(), 'all lanes mergeable');
is ($li->workflow_type, 'NovaSeqStandard', 'Standard workflow type');
}
}
Expand Down

0 comments on commit 928d753

Please sign in to comment.