Skip to content

Commit 6e8c027

Browse files
authored
Merge pull request #594 from wtsi-npg/devel
pull from devel to master to create release 91.8.0
2 parents 5610774 + 2241358 commit 6e8c027

File tree

6 files changed

+579
-7
lines changed

6 files changed

+579
-7
lines changed

Changes

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
LIST OF CHANGES
22

3+
release 91.8.0
4+
- BotSeq renamed Duplex-Seq
5+
- added new functions to long_info for BotSeq analysis
6+
- added support for NovaSeq v1.5 reagents, i5 index sequenced in opposite direction
7+
38
release 91.7.0
49
- remove the template for an unused tracking server url - run/summary -
5-
and all underlying code to remove obsolete sql queries used by that code
10+
and all underlying code to remove obsolete SQL queries used by that code
611

712
release 91.6.0
813
- enforce custom type NpgTrackingReadableFile to check that the

MANIFEST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,9 +968,12 @@ t/data/run_info/runInfo.miseq.xml
968968
t/data/run_info/runInfo.nextseq.xml
969969
t/data/run_info/runInfo.novaseq.xml
970970
t/data/run_info/runInfo.novaseq.xp.xml
971+
t/data/run_info/runInfo.novaseq.xp.v1.5.xml
971972
t/data/run_params/RunParameters.miniseq.xml
972973
t/data/run_params/RunParameters.nextseq.xml
973974
t/data/run_params/RunParameters.novaseq.xml
975+
t/data/run_params/RunParameters.novaseq.xp.xml
976+
t/data/run_params/RunParameters.novaseq.xp.v1.5.xml
974977
t/data/run_params/runParameters.hiseq.rr.single.xml
975978
t/data/run_params/runParameters.hiseq.rr.twoind.xml
976979
t/data/run_params/runParameters.hiseq.rr.xml

lib/npg_tracking/illumina/run/long_info.pm

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ use IO::All;
88
use File::Spec;
99
use XML::LibXML;
1010
use Try::Tiny;
11+
use Readonly;
1112

1213
requires qw{runfolder_path};
1314

1415
our $VERSION = '0';
16+
Readonly::Scalar my $NOVASEQ_I5FLIP_REAGENT_VER => 3;
1517

1618
=head1 NAME
1719
@@ -104,6 +106,25 @@ sub _build_index_length {
104106
return $end - $start + 1;
105107
}
106108

109+
=head2 is_dual_index
110+
111+
Boolean determines if the run has a second index read, this can be set on object construction
112+
113+
my $bIsDualIndex = $class->is_dual_index();
114+
115+
=cut
116+
117+
has q{is_dual_index} => (
118+
isa => q{Bool},
119+
is => q{ro},
120+
lazy_build => 1,
121+
documentation => q{This run is a paired end read},
122+
);
123+
sub _build_is_dual_index {
124+
my $self = shift;
125+
return $self->index_read2_cycle_range ? 1 : 0;
126+
}
127+
107128
=head2 lane_count
108129
109130
Number of lanes configured for this run. May be set on Construction.
@@ -227,6 +248,42 @@ has _read2_cycle_range => (
227248
},
228249
);
229250

251+
=head2 index_read1_cycle_range
252+
253+
First and last cycles of index read 1, or nothing returned if no index_read 1
254+
255+
=cut
256+
257+
has q{_index_read1_cycle_range} => (
258+
traits => ['Array'],
259+
is => 'ro',
260+
isa => 'ArrayRef[Int]',
261+
default => sub { [] },
262+
handles => {
263+
_push_index_read1_cycle_range => 'push',
264+
index_read1_cycle_range => 'elements',
265+
has_index_read1_cycle_range => 'count',
266+
},
267+
);
268+
269+
=head2 index_read2_cycle_range
270+
271+
First and last cycles of index_read 2, or nothing returned if no index_read 2
272+
273+
=cut
274+
275+
has _index_read2_cycle_range => (
276+
traits => ['Array'],
277+
is => 'ro',
278+
isa => 'ArrayRef[Int]',
279+
default => sub { [] },
280+
handles => {
281+
_push_index_read2_cycle_range => 'push',
282+
index_read2_cycle_range => 'elements',
283+
has_index_read2_cycle_range => 'count',
284+
},
285+
);
286+
230287
=head2 expected_cycle_count
231288
232289
Number of cycles configured for this run and for which the output data (images or intensities or both) can be expected to be found below this folder. This number is extracted from the recipe file. It does not include the cycles for the paired read if that is performed as a separate run - the output data for that will be in a different runfolder.
@@ -409,6 +466,8 @@ foreach my $f ( qw(expected_cycle_count
409466
indexing_cycle_range
410467
read1_cycle_range
411468
read2_cycle_range
469+
index_read1_cycle_range
470+
index_read2_cycle_range
412471
tilelayout_rows
413472
tilelayout_columns) ) {
414473
before $f => sub {
@@ -541,6 +600,20 @@ sub _build_flowcell_mode {
541600
return _get_single_element_text($self->_run_params(), 'FlowCellMode');
542601
}
543602

603+
=head2 sbs_consumable_version
604+
605+
=cut
606+
607+
has q{sbs_consumable_version} => (
608+
isa => 'Str',
609+
is => 'ro',
610+
lazy_build => 1,
611+
);
612+
sub _build_sbs_consumable_version{
613+
my $self = shift;
614+
return _get_single_element_text($self->_run_params(), 'SbsConsumableVersion')||1;
615+
}
616+
544617
=head2 all_lanes_mergeable
545618
546619
Method returns true if all lanes on the flowcell contain the
@@ -605,20 +678,24 @@ sub is_rapid_run_abovev2 {
605678

606679
=head2 is_i5opposite
607680
608-
A dual-indexed sequencing run on the MiniSeq, NextSeq, HiSeq 4000, or HiSeq 3000
681+
A dual-indexed sequencing run on the MiniSeq, NextSeq, HiSeq 4000, HiSeq 3000 or NovaSeq using v1.5 reagents
609682
performs the Index 2 Read after the Read 2 resynthesis step. This workflow
610683
requires a reverse complement of the Index 2 (i5) primer sequence compared to
611684
the primer sequence used on other Illumina platform, see
612685
https://support.illumina.com/content/dam/illumina-support/documents/documentation/system_documentation/miseq/indexed-sequencing-overview-guide-15057455-04.pdf
686+
For NovaSeq using v1.5 reagents the SbsConsumableVersion will be 3
613687
614688
Method returns true if this is the case.
615689
616690
=cut
617691

618692
sub is_i5opposite {
619693
my $self = shift;
620-
return ($self->is_paired_read() && ($self->platform_HiSeqX() or $self->platform_HiSeq4000() or
621-
$self->platform_MiniSeq() or $self->platform_NextSeq()));
694+
return ($self->is_paired_read() &&
695+
($self->platform_HiSeqX() or $self->platform_HiSeq4000() or
696+
$self->platform_MiniSeq() or $self->platform_NextSeq() or
697+
($self->platform_NovaSeq() &&
698+
($self->sbs_consumable_version() >= $NOVASEQ_I5FLIP_REAGENT_VER))));
622699
}
623700

624701
=head2 uses_patterned_flowcell
@@ -861,11 +938,13 @@ sub _set_values_at_end_of_read {
861938
if ( $rc->{start} == $end + 1 ) {
862939
$self->_pop_indexing_cycle_range();
863940
$self->_push_indexing_cycle_range( $rc->{index} );
941+
$self->_push_index_read2_cycle_range( $rc->{start},$rc->{index} );
864942
} else {
865943
carp "Don't know how to deal with non adjacent indexing reads: $start,$end and $rc->{start},$rc->{index}"
866944
}
867945
} else {
868946
$self->_push_indexing_cycle_range( $rc->{start},$rc->{index} );
947+
$self->_push_index_read1_cycle_range( $rc->{start},$rc->{index} );
869948
}
870949
} else {
871950
$self->_push_reads_indexed(0);

t/60-illumina-run-long_info.t

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use strict;
22
use warnings;
3-
use Test::More tests => 59;
3+
use Test::More tests => 65;
44
use Test::Exception;
55
use Test::Deep;
66
use File::Temp qw(tempdir);
@@ -28,7 +28,7 @@ package main;
2828
my $basedir = tempdir( CLEANUP => 1 );
2929

3030
subtest 'retrieving information from runParameters.xml' => sub {
31-
plan tests => 142;
31+
plan tests => 153;
3232

3333
my $rf = join q[/], $basedir, 'runfolder';
3434
mkdir $rf;
@@ -50,6 +50,7 @@ subtest 'retrieving information from runParameters.xml' => sub {
5050
RunParameters.nextseq.xml
5151
RunParameters.novaseq.xml
5252
RunParameters.novaseq.xp.xml
53+
RunParameters.novaseq.xp.v1.5.xml
5354
runParameters.hiseq.rr.truseq.xml
5455
/;
5556
my $dir = 't/data/run_params';
@@ -119,7 +120,7 @@ subtest 'retrieving information from runParameters.xml' => sub {
119120
};
120121

121122
subtest 'getting i5opposite for run' => sub {
122-
plan tests => 14;
123+
plan tests => 15;
123124

124125
$basedir = tempdir( CLEANUP => 1 );
125126
my $rf = join q[/], $basedir, 'run_info';
@@ -144,6 +145,7 @@ subtest 'getting i5opposite for run' => sub {
144145
'runInfo.nextseq.xml' => { 'rpf' => 'RunParameters', 'i5opposite' => 1 },
145146
'runInfo.novaseq.xml' => { 'rpf' => 'RunParameters', 'i5opposite' => 0 },
146147
'runInfo.novaseq.xp.xml' => { 'rpf' => 'RunParameters', 'i5opposite' => 0 },
148+
'runInfo.novaseq.xp.v1.5.xml' => { 'rpf' => 'RunParameters', 'i5opposite' => 1 },
147149
);
148150

149151
my $run_info_dir = 't/data/run_info';
@@ -433,6 +435,12 @@ note($long_info->runfolder_path);
433435
lives_and { ok( $long_info->is_indexed, 'is_indexed ok');} 'is_indexed lives and ok';
434436
lives_ok { $long_info = test::long_info->new({runfolder_path=>$rfpath}); } q{create test role for dual index paired};
435437
lives_and { ok( $long_info->is_paired_read, 'is_paired_read ok');} 'is_paired_read lives and ok';
438+
lives_ok { $long_info = test::long_info->new({runfolder_path=>$rfpath}); } q{create test role for dual index paired};
439+
lives_and { ok( $long_info->is_dual_index, 'is_dual_index ok');} 'is_paired_read lives and ok';
440+
lives_ok { $long_info = test::long_info->new({runfolder_path=>$rfpath}); } q{create test role for dual index paired};
441+
lives_and { cmp_deeply( [$long_info->index_read1_cycle_range], [152,159], 'index_read1_cycle_range matches');} 'index_read1_cycle_range lives and matches';
442+
lives_ok { $long_info = test::long_info->new({runfolder_path=>$rfpath}); } q{create test role for dual index paired};
443+
lives_and { cmp_deeply( [$long_info->index_read2_cycle_range], [160,167], 'index_read2_cycle_range matches');} 'index_read2_cycle_range lives and matches';
436444
}
437445

438446
#and a SP flowcell

0 commit comments

Comments
 (0)