Skip to content

Commit

Permalink
add sequencing plate part numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Svard committed Dec 2, 2024
1 parent 2040c8f commit 25e8e3a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cg_lims/EPPs/files/smrt_link/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ class RevioRun:
pools: List[Artifact]
run_name: str
instrument_type: str
plate_1: str
plate_2: Optional[str]
plate_1_type: str
plate_2_type: Optional[str]
file_version: int = 1
run_comments: Optional[str]
movie_acquisition_time: int
Expand All @@ -207,17 +207,21 @@ def __init__(self, process: Process):
self.pools: List[Artifact] = get_artifacts(process=process)
self.run_name: str = process.udf.get("Run Name")
self.instrument_type: str = process.udf.get("Instrument Type")
self.run_comments: str = "Generated by automation in cg-lims.sys.scilifelab.se"
self.run_comments: str = (
f"Generated by automation in https://cg-lims-stage.sys.scilifelab.se/clarity/work-details/{process.id.split('-')[1]}"
)
self.movie_acquisition_time: str = process.udf.get("Movie Acquisition Time (hours)")
self.adaptive_loading: bool = process.udf.get("Adaptive Loading")
self.base_kinetics: bool = process.udf.get("Include Base Kinetics")
self.consensus_mode: bool = process.udf.get("Consensus Mode")
self.plate_1_type: str = process.udf.get("Plate 1 Type")
self.plate_2_type: str = process.udf.get("Plate 2 Type")

def _create_run_settings(self) -> str:
"""Return the [Run Settings] section of the run design."""
plate_rows: str = f"Plate 1,{self.plates[1]}\n"
plate_rows: str = f"Plate 1,{PLATE_PART_NUMBERS[self.plate_1_type]}\n"
if self.plates[2]:
plate_rows += f"Plate 2,{self.plates[2]}\n"
plate_rows += f"Plate 2,{PLATE_PART_NUMBERS[self.plate_2_type]}\n"
return (
f"{RunDesignHeader.RUN_SETTINGS}\n"
f"Instrument Type,{self.instrument_type}\n"
Expand Down

0 comments on commit 25e8e3a

Please sign in to comment.