Skip to content

Commit e3d45c0

Browse files
authored
reverted change from 2806 (#2853)(patch)
Reverts the check in function `validate_sample_sheet` introduced in #2806. This makes a `bcl2fastq` sample pass validation but fail in the dragen, which is more meaningful for production than having a warning in the demultiplexing. ### Fixed - Revert the check inside the method `validate_sample_sheet` of the class `FlowCellDirectoryData` that compares the sample sheet type extracted from the sample sheet itself and the bcl converter of the `FlowCellDirectoryData`.
1 parent 77e48ef commit e3d45c0

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

cg/models/flow_cell/flow_cell.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88
from pydantic import ValidationError
99
from typing_extensions import Literal
1010

11-
from cg.apps.demultiplex.sample_sheet.read_sample_sheet import (
12-
get_sample_sheet_from_file,
13-
get_sample_type,
14-
)
11+
from cg.apps.demultiplex.sample_sheet.read_sample_sheet import get_sample_sheet_from_file
1512
from cg.apps.demultiplex.sample_sheet.sample_models import (
16-
FlowCellSample,
1713
FlowCellSampleBcl2Fastq,
1814
FlowCellSampleBCLConvert,
1915
)
@@ -40,10 +36,6 @@
4036
Sequencers.NOVASEQ: RunParametersNovaSeq6000,
4137
Sequencers.NOVASEQX: RunParametersNovaSeqX,
4238
}
43-
SAMPLE_MODEL_TO_BCL_CONVERTER: dict[Type[FlowCellSample], str] = {
44-
FlowCellSampleBCLConvert: BclConverter.BCLCONVERT,
45-
FlowCellSampleBcl2Fastq: BclConverter.BCL2FASTQ,
46-
}
4739

4840

4941
class FlowCellDirectoryData:
@@ -221,16 +213,6 @@ def sample_sheet_exists(self) -> bool:
221213

222214
def validate_sample_sheet(self) -> bool:
223215
"""Validate if sample sheet is on correct format."""
224-
sample_type_from_sample_sheet: Type[FlowCellSample] = get_sample_type(
225-
self.sample_sheet_path
226-
)
227-
if SAMPLE_MODEL_TO_BCL_CONVERTER[sample_type_from_sample_sheet] != self.bcl_converter:
228-
LOG.warning(
229-
f"Detected {SAMPLE_MODEL_TO_BCL_CONVERTER[sample_type_from_sample_sheet]} sample "
230-
f"sheet for {self.bcl_converter} flow cell. "
231-
"Generate the correct sample sheet or use the correct bcl converter."
232-
)
233-
return False
234216
try:
235217
get_sample_sheet_from_file(self.sample_sheet_path)
236218
except (SampleSheetError, ValidationError) as error:

0 commit comments

Comments
 (0)