Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ont-logbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed Sep 10, 2024
2 parents 21b84ea + 85a4663 commit b31f692
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 3 deletions.
28 changes: 28 additions & 0 deletions VERSIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@

Add logbook for PromethION and MinION.

## 20240910.1

Downprioritize column 3 of PromethION (used by CG), when running script to suggest ports.

## 20240909.1

Fix bug with zika module import cont; Change project format for AVITI run manifest

## 20240902.4

Also include Project name and sequencing setup in AVITI run manifest for PhiX

## 20240902.3

Include Project name and sequencing setup in AVITI run manifest

## 20240902.2

Ruff format

## 20240902.1

Fix bug with zika module import

## 20240901.1

Fix bug with AVITI process

## 20240830.2

Make ONT volume calculations script case-agnostic for concentration units.
Expand Down
3 changes: 3 additions & 0 deletions scilifelab_epps/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""Module for reusable utility functions, within the repo scilifelab/scilifelab_epps.
Alfred Kedhammar, 2023
"""

from . import formula as formula
from . import udf_tools as udf_tools
2 changes: 2 additions & 0 deletions scilifelab_epps/zika/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import methods as methods
from . import utils as utils
12 changes: 12 additions & 0 deletions scripts/generate_aviti_run_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,21 @@ def get_samples_section(process: Process) -> str:
index1 = label_seq
index2 = ""

# Project name and sequencing setup
if sample.project:
project = sample.project.name.replace(".", "__").replace(",", "")
seq_setup = sample.project.udf.get("Sequencing setup", "0-0")
else:
project = "Control"
seq_setup = "0-0"

row = {}
row["SampleName"] = sample.name
row["Index1"] = index1
row["Index2"] = index2
row["Lane"] = lane
row["Project"] = project
row["Recipe"] = seq_setup

lane_rows.append(row)

Expand All @@ -143,6 +153,8 @@ def get_samples_section(process: Process) -> str:
row["Index1"] = phix_idx_pair[0]
row["Index2"] = phix_idx_pair[1]
row["Lane"] = lane
row["Project"] = "PhiX"
row["Recipe"] = "0-0"
lane_rows.append(row)

# Check for index collision within lane, across samples and PhiX
Expand Down
2 changes: 1 addition & 1 deletion scripts/manage_demux_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ def main(process_lims_id, demux_id, log_id):
fill_process_fields(demux_process, process_stats)

# Create the demux output file
if "AVITI" in demux_process.process.type.name:
if "AVITI" in demux_process.type.name:
parser_struct = write_demuxfile_aviti(process_stats, demux_id)
else:
parser_struct = write_demuxfile(process_stats, demux_id)
Expand Down
6 changes: 4 additions & 2 deletions scripts/ont_suggest_ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def main(lims, args):

# Sort ports (a sort of port sort, if you will)
ports_list = list(ports.items())
ports_list.sort(key=lambda x: x[1])
ports_list.sort(
key=lambda x: x[1] + 1000 if x[0][0] == "3" else x[1]
) # Sort by port usage, but send column 3 to the end since it's reserved for Clinical Genomics

# Collect which ports are already specified in UDFs
ports_used = []
Expand Down Expand Up @@ -79,7 +81,7 @@ def main(lims, args):
ports_used.append(port_tuple[0])

# Print ports to stdout, starting with the least used
message = f'Listing ports, from least to most used: {", ".join([port[0] for port in ports_list])}'
message = f'Listing ports, from least to most used, down-prioritizing column 3: {", ".join([port[0] for port in ports_list])}'
sys.stdout.write(message)

except AssertionError as e:
Expand Down

0 comments on commit b31f692

Please sign in to comment.