Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
05a0448
https://mlllab.atlassian.net/browse/AE-4093
dhaupt88 Feb 17, 2026
dc14cb1
Apply php-cs-fixer changes
KingKong1213 Feb 17, 2026
d9958e8
Merge branch 'master' into AE-4093-update-illumina-sample-sheets
spawnia Feb 18, 2026
9a1fccd
Current state
dhaupt88 Feb 18, 2026
d820a1c
Apply php-cs-fixer changes
KingKong1213 Feb 18, 2026
2fc42cf
refactor code to be usable for PHP 7.4
dhaupt88 Feb 19, 2026
8dea0a8
Apply php-cs-fixer changes
KingKong1213 Feb 19, 2026
94b5f19
refactor code to be usable for PHP 7.4
dhaupt88 Feb 19, 2026
2d47056
Apply php-cs-fixer changes
KingKong1213 Feb 19, 2026
1b1c51f
Fix class name
dhaupt88 Feb 19, 2026
02d74be
Add header row in CloudDataSection
dhaupt88 Feb 19, 2026
f5e8b7d
Apply php-cs-fixer changes
KingKong1213 Feb 19, 2026
0b67d61
use typed variables
dhaupt88 Feb 20, 2026
dbf25f4
Refactor function because of code review
dhaupt88 Feb 20, 2026
ca9b935
Apply php-cs-fixer changes
KingKong1213 Feb 20, 2026
9e614e6
Use english exception
dhaupt88 Feb 20, 2026
8ebcf1d
FlowcellLaneNotExistException -> FlowcellLaneDoesNotExistException
dhaupt88 Feb 20, 2026
14d7199
Apply php-cs-fixer changes
KingKong1213 Feb 20, 2026
a648ce8
Use Collection->join instead of implode
dhaupt88 Feb 20, 2026
3bc05e8
Apply php-cs-fixer changes
KingKong1213 Feb 20, 2026
180c7f4
Change namespaces in tests
dhaupt88 Feb 20, 2026
cc6f35c
Change namespaces in tests
dhaupt88 Feb 20, 2026
64b10ad
Add Cloud and local specific parameters
dhaupt88 Feb 20, 2026
765928e
Apply php-cs-fixer changes
KingKong1213 Feb 20, 2026
7a38fb8
Add Cloud and local specific parameters
dhaupt88 Feb 20, 2026
dd4602a
Apply php-cs-fixer changes
KingKong1213 Feb 20, 2026
31c1828
IndexRead2 can be null
dhaupt88 Feb 23, 2026
b52268b
IndexRead2 can be not be null, instead it can be 0. Change validation…
dhaupt88 Feb 23, 2026
38f7057
IndexRead2 can be not be null, instead it can be 0. Change validation…
dhaupt88 Feb 23, 2026
aa268e1
IndexRead2 can be not be null, instead it can be 0. Change validation…
dhaupt88 Feb 23, 2026
f29e20b
IndexRead2 can be not be null, instead it can be 0. Change validation…
dhaupt88 Feb 23, 2026
241bb58
Apply php-cs-fixer changes
KingKong1213 Feb 23, 2026
569c6b7
Use public function performAnalysisOn and Enum to ensure either cloud…
dhaupt88 Feb 23, 2026
1ac5e86
Apply php-cs-fixer changes
KingKong1213 Feb 23, 2026
252d8ca
Code Review suggestion. Prevent to manipulate object, create new obje…
dhaupt88 Feb 24, 2026
beac9f5
Cannot use Tag's in OverrideCycles
dhaupt88 Feb 24, 2026
0ee2854
barcodeMismatchesIndex2 can be empty
dhaupt88 Feb 24, 2026
a2912c0
Fix SpreadSheet class name casing to match PhpSpreadsheet
Feb 25, 2026
2b3835c
Address code review feedback
Feb 25, 2026
9d1aee2
Apply php-cs-fixer changes
simbig Feb 25, 2026
6877cbf
Fix bugs, typos, and consistency issues
Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Flowcells/FlowcellLaneDoesNotExistException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class FlowcellLaneDoesNotExistException extends \Exception {}
39 changes: 39 additions & 0 deletions src/Flowcells/FlowcellType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

abstract class FlowcellType
{
abstract public function name(): string;

abstract public function totalLaneCount(): int;

/** @var array<int, int> */
public array $lanes;

/** @param array<int, int>|null $lanes */
public function __construct(?array $lanes)
{
if ($lanes === null) {
$lanes = range(1, $this->totalLaneCount());
}
$this->validate($lanes);
$this->lanes = $lanes;
}

/** @param array<int, int> $specificLanes */
public function validate(array $specificLanes): void
{
$validLanes = range(1, $this->totalLaneCount());
$invalidLanes = array_diff($specificLanes, $validLanes);

if (count($invalidLanes) > 0) {
$label = count($invalidLanes) > 1
? 'lanes'
: 'lane';
$invalidLanesAsString = implode(', ', $invalidLanes);

throw new FlowcellLaneDoesNotExistException("The Flowcell-Type: '{$this->name()}' doesn't contain {$label}: {$invalidLanesAsString}");
}
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/Miseqi100_100M.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class Miseqi100_100M extends FlowcellType
{
public function totalLaneCount(): int
{
return 1;
}

public function name(): string
{
return '100M';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/Miseqi100_25M.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class Miseqi100_25M extends FlowcellType
{
public function totalLaneCount(): int
{
return 1;
}

public function name(): string
{
return '25M';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/Miseqi100_50M.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class Miseqi100_50M extends FlowcellType
{
public function totalLaneCount(): int
{
return 1;
}

public function name(): string
{
return '50M';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/Miseqi100_5M.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class Miseqi100_5M extends FlowcellType
{
public function totalLaneCount(): int
{
return 1;
}

public function name(): string
{
return '5M';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/NovaSeqX10B.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class NovaSeqX10B extends FlowcellType
{
public function totalLaneCount(): int
{
return 8;
}

public function name(): string
{
return '10B';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/NovaSeqX1_5B.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class NovaSeqX1_5B extends FlowcellType
{
public function totalLaneCount(): int
{
return 2;
}

public function name(): string
{
return '1.5B';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/NovaSeqX25B.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class NovaSeqX25B extends FlowcellType
{
public function totalLaneCount(): int
{
return 8;
}

public function name(): string
{
return '25B';
}
}
16 changes: 16 additions & 0 deletions src/Flowcells/NovaSeqX5B.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);

namespace MLL\Utils\Flowcells;

class NovaSeqX5B extends FlowcellType
{
public function totalLaneCount(): int
{
return 8;
}

public function name(): string
{
return '5B';
}
}
2 changes: 1 addition & 1 deletion src/IlluminaSampleSheet/BaseSampleSheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function addSection(Section $section): void
public function toString(): string
{
$sectionStrings = array_map(
fn (Section $section): string => $section->convertSectionToString(),
fn (Section $section): string => "[{$section->sectionName()}]" . PHP_EOL . $section->convertSectionToString(),
$this->sections
);

Expand Down
2 changes: 2 additions & 0 deletions src/IlluminaSampleSheet/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
interface Section
{
public function convertSectionToString(): string;

public function sectionName(): string;
}
7 changes: 6 additions & 1 deletion src/IlluminaSampleSheet/V1/DataSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function convertSectionToString(): string
->map(fn (Row $row): string => $row->toString())
->implode("\n");

return "[Data]\n{$firstRow->headerLine()}\n{$rowsData}\n";
return "{$firstRow->headerLine()}\n{$rowsData}\n";
}

protected function validateDuplicatedSampleIDs(): void
Expand All @@ -65,4 +65,9 @@ protected function validateDuplicatedSampleIDs(): void
throw new IlluminaSampleSheetException("Sample_ID values must be distinct. Duplicated SampleIDs: {$duplicateIDsAsString}");
}
}

public function sectionName(): string
{
return 'Data';
}
}
6 changes: 5 additions & 1 deletion src/IlluminaSampleSheet/V1/HeaderSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function __construct(
public function convertSectionToString(): string
{
$headerLines = [
'[Header]',
"IEMFileVersion,{$this->iemFileVersion}",
"Investigator Name,{$this->investigatorName}",
"Experiment Name,{$this->experimentName}",
Expand All @@ -63,4 +62,9 @@ public function convertSectionToString(): string

return implode("\n", $headerLines);
}

public function sectionName(): string
{
return 'Header';
}
}
7 changes: 6 additions & 1 deletion src/IlluminaSampleSheet/V1/ReadsSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public function __construct(int $read1Cycles, int $read2Cycles)

public function convertSectionToString(): string
{
return "[Reads]\n" . $this->read1Cycles . "\n" . $this->read2Cycles;
return $this->read1Cycles . "\n" . $this->read2Cycles;
}

public function sectionName(): string
{
return 'Reads';
}
}
7 changes: 6 additions & 1 deletion src/IlluminaSampleSheet/V1/SettingsSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(?string $adapter = null, ?string $adapterRead2 = nul

public function convertSectionToString(): string
{
$settingsLines = ['[Settings]'];
$settingsLines = [];

if ($this->adapter !== null) {
$settingsLines[] = 'Adapter,' . $this->adapter;
Expand All @@ -30,4 +30,9 @@ public function convertSectionToString(): string

return implode("\n", $settingsLines);
}

public function sectionName(): string
{
return 'Settings';
}
}
34 changes: 0 additions & 34 deletions src/IlluminaSampleSheet/V2/BclConvert/BclConvertSection.php

This file was deleted.

Loading