Skip to content

Commit 7a15d15

Browse files
authored
Merge pull request #570 from wtsi-npg/devel
merge from devel to master to create release 91.1.0
2 parents f554930 + b671314 commit 7a15d15

File tree

17 files changed

+762
-35
lines changed

17 files changed

+762
-35
lines changed

Changes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
LIST OF CHANGES
22

3+
release 91.1.0
4+
- staging monitor changes for SP flowcells
5+
- Update URL for production Sequencescape LIMS
6+
- method for creating a lane-level st::api::lims object from
7+
any other st::api::lims object where the resulting object has
8+
the same driver as the original one
9+
310
release 91.0.0
411
- modified is_i5opposite when there is no reverse read
512
- removed scripts for monitoring instruments via ftp; related

lib/Monitor/RunFolder/Staging.pm

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Readonly::Scalar my $RTA_COMPLETE => 10 * $SECONDS_PER_MINUTE;
3131
Readonly::Scalar my $INTENSITIES_DIR_PATH => 'Data/Intensities';
3232
Readonly::Array my @NO_MOVE_NAMES => qw( npgdonotmove npg_do_not_move );
3333
Readonly::Scalar my $MODE_INDEX => 2;
34-
Readonly::Scalar my $EXP_CBCLS_PER_CYCL => 2;
3534

3635
Readonly::Scalar my $RTA_COMPLETE_FN => q[RTAComplete\.txt];
3736
Readonly::Scalar my $COPY_COMPLETE_FN => q[CopyComplete\.txt];
@@ -159,10 +158,11 @@ sub monitor_stats {
159158
sub check_tiles {
160159
my ($self) = @_;
161160

162-
my $expected_lanes = $self->lane_count();
163-
my $expected_cycles = $self->expected_cycle_count();
164-
my $expected_tiles = $self->lane_tilecount();
165-
my $path = $self->runfolder_path();
161+
my $expected_lanes = $self->lane_count();
162+
my $expected_surfaces = $self->surface_count();
163+
my $expected_cycles = $self->expected_cycle_count();
164+
my $expected_tiles = $self->lane_tilecount();
165+
my $path = $self->runfolder_path();
166166

167167
print {*STDERR} "\tChecking Lanes, Cycles, Tiles...\n" or carp $OS_ERROR;
168168

@@ -216,9 +216,10 @@ sub check_tiles {
216216
my @cbcl_files = glob "$cycle/*.$filetype" . q({,.gz});
217217
@cbcl_files = grep { m/ L \d+ _ \d+ [.] $filetype (?: [.] gz )? $ /msx } @cbcl_files;
218218
my $count = scalar @cbcl_files;
219-
if ( $count != $EXP_CBCLS_PER_CYCL ) {
219+
# there should be one cbcl file per expected surface
220+
if ( $count != $expected_surfaces ) {
220221
carp 'Missing cbcl(s) files: '
221-
. "$cycle - [expected: $EXP_CBCLS_PER_CYCL, found: $count]";
222+
. "$cycle - [expected: $expected_surfaces, found: $count]";
222223
return 0;
223224
}
224225
} else {

lib/npg/api/request.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ sub make {
209209
sub _create_path {
210210
my ( $self, $url ) = @_;
211211

212-
my ($stpath) = $url =~ m{\Ahttps?://(?:dev\.)?
212+
my ($stpath) = $url =~ m{\Ahttps?://(?:(?:dev|sequencescape)\.)?
213213
psd.*
214-
\.sanger\.ac\.uk?(?::\d+)
215-
(.*?)\z}xms; # sequencescape path
214+
\.sanger\.ac\.uk?(?::\d+)?
215+
(/.*?)\z}xms; # sequencescape path
216216
##no critic(ProhibitComplexRegexes)
217217
my ($npgpath) = $url =~ m{\Ahttps?://
218218
(?:npg|sfweb|sf2-farm-srv1)
@@ -469,7 +469,7 @@ Marina Gourtovaia
469469
470470
=head1 LICENSE AND COPYRIGHT
471471
472-
Copyright (C) 2010 GRL, by Marina Gourtovaia
472+
Copyright (C) 2010,2020 Genome Research Ltd. by Marina Gourtovaia
473473
474474
This file is part of NPG.
475475

lib/npg/util.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Marina Gourtovaia
160160
161161
=head1 LICENSE AND COPYRIGHT
162162
163-
Copyright (C) 2018 GRL
163+
Copyright (C) 2018,2020 Genome Research Ltd.
164164
165165
This program is free software: you can redistribute it and/or modify
166166
it under the terms of the GNU General Public License as published by

lib/npg_tracking/illumina/run/long_info.pm

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ has q{lane_count} => (
120120
documentation => q{The number of lanes on this run},
121121
);
122122

123+
=head2 surface_count
124+
125+
Number of surfaces configured for this run. May be set on Construction.
126+
127+
my $iSurfaceCount = $self->surface_count();
128+
129+
=cut
130+
131+
has q{surface_count} => (
132+
is => 'ro',
133+
isa => 'Int',
134+
writer => '_set_surface_count',
135+
predicate => 'has_surface_count',
136+
documentation => q{The number of surfaces on this run},
137+
);
138+
123139
=head2 read_cycle_counts
124140
125141
List of cycle lengths configured for each read/index in order.
@@ -388,6 +404,7 @@ sub _build_run_flowcell {
388404

389405
foreach my $f ( qw(expected_cycle_count
390406
lane_count
407+
surface_count
391408
read_cycle_counts
392409
indexing_cycle_range
393410
read1_cycle_range
@@ -510,6 +527,20 @@ sub _build_workflow_type {
510527
return _get_single_element_text($self->_run_params(), 'WorkflowType');
511528
}
512529

530+
=head2 flowcell_mode
531+
532+
=cut
533+
534+
has q{flowcell_mode} => (
535+
isa => 'Str',
536+
is => 'ro',
537+
lazy_build => 1,
538+
);
539+
sub _build_flowcell_mode {
540+
my $self = shift;
541+
return _get_single_element_text($self->_run_params(), 'FlowCellMode');
542+
}
543+
513544
=head2 all_lanes_mergeable
514545
515546
Method returns true if all lanes on the flowcell contain the
@@ -697,6 +728,9 @@ sub _build__runinfo_store {
697728

698729
my $fcl_el = $doc->getElementsByTagName('FlowcellLayout')->[0];
699730
if(not defined $fcl_el) {
731+
if ( $self->platform_NovaSeq() ) {
732+
croak q{No FlowCellLayout for NovaSeq run};
733+
}
700734
$self->_set_lane_count($doc->getElementsByTagName('Lane')->size);
701735
$self->_set_expected_cycle_count($doc->getElementsByTagName('Cycles')->[0]->getAttribute('Incorporation'));
702736

@@ -725,7 +759,12 @@ sub _build__runinfo_store {
725759

726760
}else{
727761
$self->_set_lane_count($fcl_el->getAttribute('LaneCount'));
728-
my $ncol = $fcl_el->getAttribute('SurfaceCount') * $fcl_el->getAttribute('SwathCount');
762+
$self->_set_surface_count($fcl_el->getAttribute('SurfaceCount'));
763+
if ( $self->platform_NovaSeq() && $self->flowcell_mode() eq 'SP' ) {
764+
# NovaSeq SP flowcells only have one surface
765+
$self->_set_surface_count(1);
766+
}
767+
my $ncol = $self->surface_count() * $fcl_el->getAttribute('SwathCount');
729768
my $nrow = $fcl_el->getAttribute('TileCount'); #informatic split on HiSeq
730769
$self->_set_tilelayout_columns($ncol);
731770
$self->_set_tilelayout_rows($nrow);

lib/st/api/base.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use npg::api::util;
1313

1414
our $VERSION = '0';
1515

16-
sub live_url { return q{http://psd-support.internal.sanger.ac.uk:6600}; }
16+
sub live_url { return q{http://sequencescape.psd.sanger.ac.uk}; }
1717
sub dev_url { return q{http://dev.psd.sanger.ac.uk:6610}; }
1818

1919
sub lims_url {

lib/st/api/lims.pm

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,29 @@ sub create_tag_zero_object {
996996
return __PACKAGE__->new(%init);
997997
}
998998

999+
=head2 create_lane_object
1000+
1001+
Using id_run and position values given as attributes to this method, creates
1002+
and returns an st::api::lims object for the lane corresponding to the given
1003+
attributes. The new object has the same driver settings as the original object.
1004+
1005+
my $l = st::api::lims->new(id_run => 4, position => 3, tag_index => 6);
1006+
my $lane_lims = $l->create_lane_object(4,4);
1007+
1008+
=cut
1009+
1010+
sub create_lane_object {
1011+
my ($self, $id_run, $position) = @_;
1012+
($id_run and $position) or croak 'id_run and position are expected as arguments';
1013+
my %init = %{$self->_driver_arguments()};
1014+
$init{'driver_type'} = $self->driver_type;
1015+
delete $init{'tag_index'};
1016+
delete $init{'rpt_list'};
1017+
$init{'id_run'} = $id_run;
1018+
$init{'position'} = $position;
1019+
return __PACKAGE__->new(%init);
1020+
}
1021+
9991022
=head2 cached_samplesheet_var_name
10001023
10011024
Returns the name of the env. variable for storing the full path of the cached
@@ -1410,7 +1433,7 @@ Marina Gourtovaia E<lt>mg8@sanger.ac.ukE<gt>
14101433
14111434
=head1 LICENSE AND COPYRIGHT
14121435
1413-
Copyright (C) 2018 Genome Research Ltd
1436+
Copyright (C) 2013,2014,2015,2016,2017,2018,2019,2020 Genome Research Ltd.
14141437
14151438
This file is part of NPG.
14161439

t/30-api-request.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use npg::api::util;
1414
use st::api::sample;
1515

1616
use t::useragent;
17-
my $lims_url = q[http://psd-support.internal.sanger.ac.uk:6600];
17+
my $lims_url = q[http://sequencescape.psd.sanger.ac.uk];
1818
my $ua = t::useragent->new({
1919
is_success => 1,
2020
mock => {

t/34-monitor-runfolder.t

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ my $dir4rf = tempdir( CLEANUP => 1 );
9999
</RunInfo>
100100
ENDXML
101101
close $fh;
102+
my $runparametersfile = qq[$fs_run_folder/runParameters.xml];
103+
open($fh, '>', $runparametersfile) or die "Could not open file '$runparametersfile' $!";
104+
print $fh <<"ENDXML";
105+
<?xml version="1.0"?>
106+
<RunParameters xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
107+
</RunParameters>
108+
ENDXML
109+
close $fh;
102110

103111
my $test = Monitor::RunFolder->new( runfolder_path => $fs_run_folder,
104112
npg_tracking_schema => $schema, );
@@ -135,6 +143,14 @@ ENDXML
135143
</RunInfo>
136144
ENDXML
137145
close $fh2;
146+
my $runparametersfile2= qq[$fs_run_folder2/runParameters.xml];
147+
open($fh2, '>', $runparametersfile2) or die "Could not open file '$runparametersfile2' $!";
148+
print $fh2 <<"ENDXML";
149+
<?xml version="1.0"?>
150+
<RunParameters xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
151+
</RunParameters>
152+
ENDXML
153+
close $fh2;
138154

139155
$test = Monitor::RunFolder->new( runfolder_path => $fs_run_folder2,
140156
npg_tracking_schema => $schema, );
@@ -166,6 +182,10 @@ q{<?xml version="1.0"?>
166182
</AlignToPhiX>
167183
</Run>
168184
</RunInfo>};
185+
my $run_parameters =
186+
q{<?xml version="1.0"?>
187+
<RunParameters xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
188+
</RunParameters>};
169189

170190

171191
my $root = tempdir( CLEANUP => 1 );
@@ -186,6 +206,11 @@ q{<?xml version="1.0"?>
186206
print $fh $run_info;
187207
close $fh;
188208

209+
# create runParameters file
210+
open my $fh2, '>', join(q[/], $rf, 'runParameters.xml');
211+
print $fh2 $run_parameters;
212+
close $fh2;
213+
189214
warnings_like { $test->delete_superfluous_lanes() } [
190215
qr/Deleted lane 3/, qr/Deleted lane 4/, qr/Deleted lane 5/,
191216
qr/Deleted lane 6/, qr/Deleted lane 7/, qr/Deleted lane 8/],

t/40-st-base.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use_ok('st::api::base');
77
{
88
my $base = st::api::base->new();
99
isa_ok($base, 'st::api::base');
10-
like($base->live_url(), qr/psd\-support/, 'live_url');
10+
like($base->live_url(), qr/sequencescape[.]psd/, 'live_url');
1111
like($base->dev_url(), qr/dev\.psd/, 'dev_url');
1212
is((scalar $base->fields()), undef, 'no default fields');
1313
is($base->primary_key(), undef, 'no default pk');

0 commit comments

Comments
 (0)