Skip to content

Commit

Permalink
Allow 0 mismatch for all indexes that are shorter than 8nt
Browse files Browse the repository at this point in the history
  • Loading branch information
chuan-wang committed Oct 30, 2024
1 parent 91bb771 commit 21c0728
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions taca/illumina/NovaSeqXPlus_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def _generate_samplesheet_subset(
or "BarcodeMismatchesIndex" not in k
):
output += f"{k},{v}{os.linesep}"
# Allow 0 mismatch for all indexes that are shorter than 8nt
else:
if index1_size != 0 and index1_size < 8:
output += f"BarcodeMismatchesIndex1,0{os.linesep}"
if index2_size != 0 and index2_size < 8:
output += f"BarcodeMismatchesIndex2,0{os.linesep}"

Check warning on line 91 in taca/illumina/NovaSeqXPlus_Runs.py

View check run for this annotation

Codecov / codecov/patch

taca/illumina/NovaSeqXPlus_Runs.py#L88-L91

Added lines #L88 - L91 were not covered by tests
# Data
output += f"[Data]{os.linesep}"
datafields = []
Expand All @@ -107,11 +113,15 @@ def _generate_samplesheet_subset(
if field == "index2" and noindex_flag:
if software == "bclconvert":
line[field] = (

Check warning on line 115 in taca/illumina/NovaSeqXPlus_Runs.py

View check run for this annotation

Codecov / codecov/patch

taca/illumina/NovaSeqXPlus_Runs.py#L114-L115

Added lines #L114 - L115 were not covered by tests
"T" * index_cycles[1] if index_cycles[1] != 0 else ""
"T" * index_cycles[1]
if index_cycles[1] != 0
else ""
)
else:
line[field] = (

Check warning on line 121 in taca/illumina/NovaSeqXPlus_Runs.py

View check run for this annotation

Codecov / codecov/patch

taca/illumina/NovaSeqXPlus_Runs.py#L121

Added line #L121 was not covered by tests
"A" * index_cycles[1] if index_cycles[1] != 0 else ""
"A" * index_cycles[1]
if index_cycles[1] != 0
else ""
)
noindex_flag = False
# Case of IDT UMI
Expand Down

0 comments on commit 21c0728

Please sign in to comment.