Skip to content

Commit

Permalink
Fix cases that MiSeq samplesheet misses index or index2
Browse files Browse the repository at this point in the history
  • Loading branch information
chuan-wang committed Mar 15, 2024
1 parent 2eb4fd0 commit df992ac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
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

## 20240315.1

Fix cases that MiSeq samplesheet misses index or index2

## 20240304.1

- Make sure TACA can handle runs that generate NO sequencing data at all
Expand Down
2 changes: 1 addition & 1 deletion taca/analysis/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _upload_to_statusdb(run):
# Check if I have NoIndex lanes
for element in parser.obj["samplesheet_csv"]:
if (
"NoIndex" in element["index"] or not element["index"]
"NoIndex" in element.get("index", "") or not element.get("index")
): # NoIndex in the case of HiSeq, empty in the case of HiSeqX
lane = element["Lane"] # This is a lane with NoIndex
# In this case PF Cluster is the number of undetermined reads
Expand Down
4 changes: 4 additions & 0 deletions taca/illumina/Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ def _classify_lanes(self, samplesheets):
# Prepare a list for lanes with NoIndex samples
noindex_lanes = []
for entry in self.runParserObj.samplesheet.data:
if not entry.get("index"):
entry["index"] = ""
if not entry.get("index2"):
entry["index2"] = ""
if entry["index"].upper() == "NOINDEX" or (
entry["index"] == "" and entry["index2"] == ""
):
Expand Down
4 changes: 4 additions & 0 deletions taca/illumina/Standard_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def _classify_samples(self, indexfile, ssparser, runSetup):
sample_name = sample.get("Sample_Name") or sample.get("SampleName")
umi_length = [0, 0]
read_length = read_cycles
if not sample.get("index"):
sample["index"] = ""
if not sample.get("index2"):
sample["index2"] = ""
# Read the length of read 1 and read 2 from the field Recipe
if sample.get("Recipe") and RECIPE_PAT.findall(sample.get("Recipe")):
ss_read_length = [
Expand Down

0 comments on commit df992ac

Please sign in to comment.