From 21c072811839de069c570d9ed10aca80392c2637 Mon Sep 17 00:00:00 2001 From: chuan-wang Date: Wed, 30 Oct 2024 09:30:02 +0100 Subject: [PATCH] Allow 0 mismatch for all indexes that are shorter than 8nt --- taca/illumina/NovaSeqXPlus_Runs.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/taca/illumina/NovaSeqXPlus_Runs.py b/taca/illumina/NovaSeqXPlus_Runs.py index cc067a1d..c32381bc 100644 --- a/taca/illumina/NovaSeqXPlus_Runs.py +++ b/taca/illumina/NovaSeqXPlus_Runs.py @@ -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}" # Data output += f"[Data]{os.linesep}" datafields = [] @@ -107,11 +113,15 @@ def _generate_samplesheet_subset( if field == "index2" and noindex_flag: if software == "bclconvert": line[field] = ( - "T" * index_cycles[1] if index_cycles[1] != 0 else "" + "T" * index_cycles[1] + if index_cycles[1] != 0 + else "" ) else: line[field] = ( - "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