Skip to content

Commit 3de098a

Browse files
author
Lisa Fischer
committed
feat(illumina-sample-sheet)!: require BCL Convert version and pipeline from the caller
The library no longer decides which BCL Convert version a sample sheet uses. BREAKING CHANGE: BclConvertSettingsSection requires the software version and CloudSettingsSection requires the BCL Convert pipeline URN. BclConvertSoftwareVersion and CloudSettingsSection::BCL_CONVERT_PIPELINE are removed. 🤖 Generated with Claude Code
1 parent 95d8b77 commit 3de098a

5 files changed

Lines changed: 10 additions & 63 deletions

File tree

‎src/IlluminaSampleSheet/V2/BclConvertSoftwareVersion.php‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎src/IlluminaSampleSheet/V2/Sections/BclConvertSettingsSection.php‎

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@
33
namespace MLL\Utils\IlluminaSampleSheet\V2\Sections;
44

55
use Illuminate\Support\Collection;
6-
use MLL\Utils\IlluminaSampleSheet\V2\BclConvertSoftwareVersion;
76
use MLL\Utils\IlluminaSampleSheet\V2\Enums\FastQCompressionFormat;
87

98
final class BclConvertSettingsSection extends SimpleKeyValueSection
109
{
1110
use RequiresAnalysisLocationToBeSet;
1211

13-
private string $cloudSoftwareVersion;
14-
15-
public function __construct(string $cloudSoftwareVersion = BclConvertSoftwareVersion::V4_1_23)
12+
public function __construct(string $softwareVersion)
1613
{
17-
$this->cloudSoftwareVersion = $cloudSoftwareVersion;
18-
1914
$fields = new Collection([
2015
'FastqCompressionFormat' => FastQCompressionFormat::GZIP,
16+
'SoftwareVersion' => $softwareVersion,
2117
]);
2218

2319
parent::__construct($fields);
@@ -26,20 +22,9 @@ public function __construct(string $cloudSoftwareVersion = BclConvertSoftwareVer
2622
public function performAnalysisOn(AnalysisLocation $analysisLocation): void
2723
{
2824
$this->analysisLocation = $analysisLocation;
29-
$analysisLocation->value === AnalysisLocation::LOCAL_MACHINE
30-
? $this->performAnalysisOnLocalMachine()
31-
: $this->performAnalysisOnCloud();
32-
}
33-
34-
private function performAnalysisOnCloud(): void
35-
{
36-
$this->keyValues['SoftwareVersion'] = $this->cloudSoftwareVersion;
37-
}
38-
39-
private function performAnalysisOnLocalMachine(): void
40-
{
41-
$this->keyValues['SoftwareVersion'] = BclConvertSoftwareVersion::V4_4_6;
42-
$this->keyValues['GenerateFastqcMetrics'] = 'true';
25+
if ($analysisLocation->value === AnalysisLocation::LOCAL_MACHINE) {
26+
$this->keyValues['GenerateFastqcMetrics'] = 'true';
27+
}
4328
}
4429

4530
public function sectionName(): string

‎src/IlluminaSampleSheet/V2/Sections/CloudSettingsSection.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ final class CloudSettingsSection extends SimpleKeyValueSection
99
/** @var string */
1010
public const GENERATED_VERSION = '2.6.0.202308300002';
1111
public const CLOUD_WORKFLOW = 'ica_workflow_1';
12-
public const BCL_CONVERT_PIPELINE = 'urn:ilmn:ica:pipeline:d5c7e407-d439-48c8-bce5-b7aec225f6a7#BclConvert_v4_1_23_patch1';
13-
public const BCL_CONVERT_PIPELINE_V4_4_10 = 'urn:ilmn:ica:pipeline:4bdae602-abe4-4230-b0c6-f886af563b26#BclConvert_v4_4_10';
1412

15-
public function __construct(string $bclConvertPipeline = self::BCL_CONVERT_PIPELINE)
13+
public function __construct(string $bclConvertPipeline)
1614
{
1715
parent::__construct(new Collection([
1816
'GeneratedVersion' => self::GENERATED_VERSION,

‎tests/IlluminaSampleSheet/V2/BclConvertSettingsSectionTest.php‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace MLL\Utils\Tests\IlluminaSampleSheet\V2;
44

5-
use MLL\Utils\IlluminaSampleSheet\V2\BclConvertSoftwareVersion;
65
use MLL\Utils\IlluminaSampleSheet\V2\Sections\AnalysisLocation;
76
use MLL\Utils\IlluminaSampleSheet\V2\Sections\BclConvertSettingsSection;
87
use PHPUnit\Framework\TestCase;
@@ -11,19 +10,7 @@ final class BclConvertSettingsSectionTest extends TestCase
1110
{
1211
public function testToStringOnCloud(): void
1312
{
14-
$bclConvertSettingsSection = new BclConvertSettingsSection();
15-
$bclConvertSettingsSection->performAnalysisOn(AnalysisLocation::CLOUD());
16-
$expected = <<<'CSV'
17-
FastqCompressionFormat,gzip
18-
SoftwareVersion,4.1.23
19-
20-
CSV;
21-
self::assertSame($expected, $bclConvertSettingsSection->convertSectionToString());
22-
}
23-
24-
public function testToStringOnCloudWithSoftwareVersion(): void
25-
{
26-
$bclConvertSettingsSection = new BclConvertSettingsSection(BclConvertSoftwareVersion::V4_4_10);
13+
$bclConvertSettingsSection = new BclConvertSettingsSection('4.4.10');
2714
$bclConvertSettingsSection->performAnalysisOn(AnalysisLocation::CLOUD());
2815
$expected = <<<'CSV'
2916
FastqCompressionFormat,gzip
@@ -35,7 +22,7 @@ public function testToStringOnCloudWithSoftwareVersion(): void
3522

3623
public function testToStringLocal(): void
3724
{
38-
$bclConvertSettingsSection = new BclConvertSettingsSection();
25+
$bclConvertSettingsSection = new BclConvertSettingsSection('4.4.6');
3926
$bclConvertSettingsSection->performAnalysisOn(AnalysisLocation::LOCAL_MACHINE());
4027

4128
$expected = <<<'CSV'

‎tests/IlluminaSampleSheet/V2/IlluminaSampleSheetVersion2Test.php‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use MLL\Utils\Flowcells\NovaSeqX1_5B;
77
use MLL\Utils\IlluminaSampleSheet\V2\BclConvert\BclSample;
88
use MLL\Utils\IlluminaSampleSheet\V2\BclConvert\OverrideCycles;
9-
use MLL\Utils\IlluminaSampleSheet\V2\BclConvertSoftwareVersion;
109
use MLL\Utils\IlluminaSampleSheet\V2\IlluminaSampleSheetVersion2;
1110
use MLL\Utils\IlluminaSampleSheet\V2\IndexOrientation;
1211
use MLL\Utils\IlluminaSampleSheet\V2\InstrumentPlatform;
@@ -92,7 +91,7 @@ public function testNovaSeqXCloudSampleSheetToStringReturnsExpectedResult(): voi
9291
null
9392
);
9493

95-
$bclConvertSettingsSection = new BclConvertSettingsSection(BclConvertSoftwareVersion::V4_4_10);
94+
$bclConvertSettingsSection = new BclConvertSettingsSection('4.4.10');
9695

9796
$bclConvertDataSection = new BclConvertDataSection($bclSampleList);
9897

@@ -103,7 +102,7 @@ public function testNovaSeqXCloudSampleSheetToStringReturnsExpectedResult(): voi
103102
$readsSection,
104103
$bclConvertSettingsSection,
105104
$bclConvertDataSection,
106-
new CloudSettingsSection(CloudSettingsSection::BCL_CONVERT_PIPELINE_V4_4_10),
105+
new CloudSettingsSection('urn:ilmn:ica:pipeline:4bdae602-abe4-4230-b0c6-f886af563b26#BclConvert_v4_4_10'),
107106
new CloudDataSection(new Collection([
108107
new CloudDataItem($bclSample0->sampleID, 'test', 'foo'),
109108
new CloudDataItem($bclSample1->sampleID, 'test', 'foo'),

0 commit comments

Comments
 (0)