Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support both single lane and dual lane of AVITI flowcell #356

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 VERSIONLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Scilifelab_epps Version Log

## 20240910.2

Support both single lane and dual lane of AVITI flowcell
Decide whether to include PhiX based on lane level UDF

## 20240910.1

Downprioritize column 3 of PromethION (used by CG), when running script to suggest ports.
Expand Down
19 changes: 12 additions & 7 deletions scripts/generate_aviti_run_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,16 @@ def get_settings_section() -> str:
def get_samples_section(process: Process) -> str:
"""Generate the [SAMPLES] section of the AVITI run manifest and return it as a string."""

phix_loaded: bool = process.udf["PhiX Loaded"]

# Assert two output analytes placed in either flowcell lane
# Assert output analytes loaded on flowcell
arts_out = [op for op in process.all_outputs() if op.type == "Analyte"]
assert len(arts_out) == 2, "Expected two output analytes."
lanes = [art_out.location[1].split(":")[1] for art_out in arts_out]
assert set(lanes) == {"1", "2"}, "Expected lanes 1 and 2."
assert (
len(arts_out) == 1 or len(arts_out) == 2
), "Expected one or two output analytes."
lanes = [art_out.location[1].split(":")[0] for art_out in arts_out]
assert set(lanes) == {"1"} or set(lanes) == {
"1",
"2",
}, "Expected a single-lane or dual-lane flowcell."

# Iterate over pools
all_rows = []
Expand Down Expand Up @@ -140,7 +143,9 @@ def get_samples_section(process: Process) -> str:

lane_rows.append(row)

# Add PhiX controls
# Add PhiX controls if added:
phix_loaded: bool = art_out.udf["% phiX"] != 0

if phix_loaded:
for phix_idx_pair in [
("ACGTGTAGC", "GCTAGTGCA"),
Expand Down
Loading