Skip to content

Commit

Permalink
Update NovaSeq X sequencing volumes (#419)(patch)
Browse files Browse the repository at this point in the history
### Added
- New Enum module
- New constants module for the udf/calculate EPPs
- New constant classes for flow cells and their properties

### Changed
- Updated the recommended volumes of reagents for preparing new NovaSeq X runs
  • Loading branch information
Karl-Svard authored Aug 10, 2023
1 parent 0afd1ce commit 6d3c535
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 22 deletions.
12 changes: 1 addition & 11 deletions cg_lims/EPPs/files/sample_sheet/models.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
from genologics.lims import Process
from typing import Optional
import logging
from enum import Enum
from cg_lims.enums import StrEnum, IntEnum

LOG = logging.getLogger(__name__)


class StrEnum(str, Enum):
def __str__(self) -> str:
return str.__str__(self)


class IntEnum(int, Enum):
def __int__(self) -> int:
return int.__int__(self)


class IndexSetup(IntEnum):
DUAL_INDEX: int = 2
SINGLE_INDEX: int = 1
Expand Down
2 changes: 2 additions & 0 deletions cg_lims/EPPs/udf/calculate/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
)
from cg_lims.EPPs.udf.calculate.novaseq_x_volumes import novaseq_x_volumes
from cg_lims.EPPs.udf.calculate.pool_normalization import pool_normalization
from cg_lims.EPPs.udf.calculate.novaseq_x_denaturation import novaseq_x_denaturation

# commands
from cg_lims.EPPs.udf.calculate.twist_pool import twist_pool
Expand Down Expand Up @@ -59,3 +60,4 @@ def calculate(ctx):
calculate.add_command(calculate_average_size_and_set_qc)
calculate.add_command(novaseq_x_volumes)
calculate.add_command(pool_normalization)
calculate.add_command(novaseq_x_denaturation)
22 changes: 22 additions & 0 deletions cg_lims/EPPs/udf/calculate/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from cg_lims.enums import IntEnum, FloatEnum, StrEnum


class FlowCellTypes(StrEnum):
"""Flow cell types available from Illumina"""

FLOW_CELL_10B: str = "10B"


class FlowCellSize(IntEnum):
"""The total number of lanes for a flow cell type."""

FLOW_CELL_10B: int = 8


class FlowCellLaneVolumes10B(FloatEnum):
"""The recommended volume of reagents per flow cell lane. All values are in ul."""

POOL_VOLUME: float = 34
PHIX_VOLUME: float = 1
NAOH_VOLUME: float = 8.5
BUFFER_VOLUME: float = 127.5
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@

from cg_lims.exceptions import LimsError, MissingUDFsError
from cg_lims.get.artifacts import get_artifacts
from cg_lims.EPPs.udf.calculate.constants import FlowCellTypes, FlowCellSize, FlowCellLaneVolumes10B

LOG = logging.getLogger(__name__)

DENATURATION_VOLUMES = {
"10B": {
"Volume of Pool to Denature (ul)": 40,
"PhiX Volume (ul)": 1,
"NaOH Volume (ul)": 10,
"Pre-load Buffer Volume (ul)": 150,
FlowCellTypes.FLOW_CELL_10B: {
"Volume of Pool to Denature (ul)": FlowCellLaneVolumes10B.POOL_VOLUME,
"PhiX Volume (ul)": FlowCellLaneVolumes10B.PHIX_VOLUME,
"NaOH Volume (ul)": FlowCellLaneVolumes10B.NAOH_VOLUME,
"Pre-load Buffer Volume (ul)": FlowCellLaneVolumes10B.BUFFER_VOLUME,
}
}

FLOW_CELL_SIZE = {"10B": 8}
FLOW_CELL_SIZE = {FlowCellTypes.FLOW_CELL_10B: FlowCellSize.FLOW_CELL_10B}


def get_flow_cell_type(process: Process) -> str:
Expand All @@ -37,7 +38,8 @@ def get_number_of_lanes(process: Process) -> int:
flow_cell_type: str = get_flow_cell_type(process=process)
if not number_of_lanes:
LOG.info(
f"Missing number of lanes to load from previous step, using default value and assuming a fully loaded flow cell ({FLOW_CELL_SIZE[flow_cell_type]} lanes)."
f"Missing number of lanes to load from previous step, "
f"using default value and assuming a fully loaded flow cell ({FLOW_CELL_SIZE[flow_cell_type]} lanes)."
)
return FLOW_CELL_SIZE[flow_cell_type]
return number_of_lanes
Expand Down
5 changes: 3 additions & 2 deletions cg_lims/EPPs/udf/calculate/novaseq_x_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

from cg_lims.exceptions import LimsError, MissingUDFsError, InvalidValueError
from cg_lims.get.artifacts import get_artifacts
from cg_lims.EPPs.udf.calculate.constants import FlowCellTypes, FlowCellSize, FlowCellLaneVolumes10B

LOG = logging.getLogger(__name__)


FLOW_CELL_LANE_VOLUMES = {"10B": 40}
FLOW_CELL_SIZE = {"10B": 8}
FLOW_CELL_LANE_VOLUMES = {FlowCellTypes.FLOW_CELL_10B: FlowCellLaneVolumes10B.POOL_VOLUME}
FLOW_CELL_SIZE = {FlowCellTypes.FLOW_CELL_10B: FlowCellSize.FLOW_CELL_10B}


def get_flow_cell_type(process: Process) -> str:
Expand Down
2 changes: 0 additions & 2 deletions cg_lims/EPPs/udf/set/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from cg_lims.EPPs.udf.set.set_sample_date import set_sample_date
from cg_lims.EPPs.udf.set.set_method import method_document
from cg_lims.EPPs.udf.set.set_barcode import assign_barcode
from cg_lims.EPPs.udf.set.novaseq_x_denaturation import novaseq_x_denaturation


@click.group(invoke_without_command=True)
Expand All @@ -18,4 +17,3 @@ def set(context: click.Context):
set.add_command(set_sample_date)
set.add_command(method_document)
set.add_command(assign_barcode)
set.add_command(novaseq_x_denaturation)
16 changes: 16 additions & 0 deletions cg_lims/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from enum import Enum


class StrEnum(str, Enum):
def __str__(self) -> str:
return str.__str__(self)


class IntEnum(int, Enum):
def __int__(self) -> int:
return int.__int__(self)


class FloatEnum(float, Enum):
def __int__(self) -> float:
return float.__int__(self)

0 comments on commit 6d3c535

Please sign in to comment.