@@ -9,25 +9,25 @@ class ReadsSection implements Section
99{
1010 protected int $ read1Cycles ;
1111
12- protected ? int $ read2Cycles ;
12+ protected int $ index1Cycles ;
1313
14- protected ?int $ index1Cycles ;
14+ protected ?int $ read2Cycles ;
1515
1616 protected ?int $ index2Cycles ;
1717
18- public function __construct (int $ read1Cycles , ? int $ read2Cycles = null , ?int $ index1Cycles = null , ?int $ index2Cycles = null )
18+ public function __construct (int $ read1Cycles , int $ index1Cycles , ?int $ read2Cycles = null , ?int $ index2Cycles = null )
1919 {
2020 if ($ read1Cycles < 1 ) {
2121 throw new IlluminaSampleSheetException ('Read1Cycles must be a positive integer. ' );
2222 }
2323 if ($ read2Cycles !== null && $ read2Cycles < 1 ) {
2424 throw new IlluminaSampleSheetException ('Read2Cycles must be a positive integer or null. ' );
2525 }
26- if ($ index1Cycles !== null && ( $ index1Cycles < 6 || $ index1Cycles > 12 ) ) {
27- throw new IlluminaSampleSheetException ('Index1Cycles must be between 6 and 12 or null . ' );
26+ if ($ index1Cycles < 6 ) {
27+ throw new IlluminaSampleSheetException ('Index1Cycles must be at least 6 . ' );
2828 }
29- if ($ index2Cycles !== null && ($ index2Cycles < 6 || $ index2Cycles > 12 )) {
30- throw new IlluminaSampleSheetException ('Index2Cycles must be between 6 and 12 or null . ' );
29+ if ($ index2Cycles !== null && ($ index2Cycles < 6 )) {
30+ throw new IlluminaSampleSheetException ('Index2Cycles must be at least 6 . ' );
3131 }
3232 $ this ->read1Cycles = $ read1Cycles ;
3333 $ this ->read2Cycles = $ read2Cycles ;
@@ -43,9 +43,9 @@ public function convertSectionToString(): string
4343 if ($ this ->read2Cycles !== null ) {
4444 $ readsLines [] = "Read2Cycles, {$ this ->read2Cycles }" ;
4545 }
46- if ( $ this -> index1Cycles !== null ) {
47- $ readsLines [] = "Index1Cycles, {$ this ->index1Cycles }" ;
48- }
46+
47+ $ readsLines [] = "Index1Cycles, {$ this ->index1Cycles }" ;
48+
4949 if ($ this ->index2Cycles !== null ) {
5050 $ readsLines [] = "Index2Cycles, {$ this ->index2Cycles }" ;
5151 }
0 commit comments