Skip to content
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
4 changes: 4 additions & 0 deletions VERSIONLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# TACA Version Log

## 20251015.1

Bugfix: Get all available samples in get_noindex_stats

## 20251010.2

Move Aviti Teton FlowcellPressureCheck directories into run directory before processing the run
Expand Down
2 changes: 1 addition & 1 deletion taca/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Main TACA module"""

__version__ = "1.6.10"
__version__ = "1.6.11"
24 changes: 15 additions & 9 deletions taca/element/Element_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,32 +1178,38 @@ def get_noindex_stats(self, sub_demux):
# read sub_demux_manifest into a string
with open(sub_demux_manifest) as f:
manifest_csv = f.read()
sample_row = (
manifest_csv.split("[SAMPLES]")[1].strip().split("\n")[-1]
sample_rows = (
manifest_csv.split("[SAMPLES]")[1].strip().split("\n")[1:]
) # ugh...
sample_name = sample_row.split(",")[0]
lane = sample_row.split(",")[3]
# Extract NumPolonies from RunStats.json
runstats_json_path = os.path.join(
self.run_dir, f"Demultiplexing_{sub_demux}", "RunStats.json"
)
if os.path.exists(runstats_json_path):
if not os.path.exists(runstats_json_path):
logger.error(
f"No RunStats.json file found for sub-demultiplexing {sub_demux}. Unable to process NoIndex samples. Skipping."
)
raise FileNotFoundError
samples = []
for sample_row in sample_rows:
sample_name = sample_row.split(",")[0]
lane = sample_row.split(",")[3]
# Extract NumPolonies from RunStats.json
with open(runstats_json_path) as json_file:
demux_info = json.load(json_file)
demuxed_lanes = demux_info.get("Lanes")
for demuxed_lane in demuxed_lanes:
if demuxed_lane.get("Lane") == int(lane):
polonies = demuxed_lane.get("NumPolonies")
break
return [
{
sample_info = {
"SampleName": sample_name,
"I1": "",
"I2": "",
"Lane": lane,
"NumPoloniesAssigned": polonies,
}
]
samples.append(sample_info)
return samples

# Aggregate stats in UnassignedSequences.csv
def aggregate_stats_unassigned(
Expand Down