@@ -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
125141List of cycle lengths configured for each read/index in order.
@@ -388,6 +404,7 @@ sub _build_run_flowcell {
388404
389405foreach 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
515546Method 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 );
0 commit comments