From faa1e6f1cbfd4216f1e3e0fcad4e963bbcd41ef5 Mon Sep 17 00:00:00 2001 From: Brent Pedersen Date: Fri, 9 Apr 2021 17:10:25 +0200 Subject: [PATCH] MT: don't uppercase all --- src/seqcoverpkg/transcript.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seqcoverpkg/transcript.nim b/src/seqcoverpkg/transcript.nim index f2f52eb..07d448c 100644 --- a/src/seqcoverpkg/transcript.nim +++ b/src/seqcoverpkg/transcript.nim @@ -161,14 +161,14 @@ proc `%`*[T](table: TableRef[string, T]): JsonNode = proc get_chrom(chrom:string, dp:var Cover, fai:Fai): string = ## add or remove "chr" to match chromosome names. - const MTs = ["MT", "CHRM", "CHRMT", "M"] + const MTs = ["MT", "chrM", "chrMT", "M"] var chroms = dp.chromosomes(fai) if chrom in chroms: return chrom if chrom[0] != 'c' and ("chr" & chrom) in chroms: result = "chr" & chrom elif chrom[0] == 'c' and chrom.len > 3 and chrom[1] == 'h' and chrom[2] == 'r' and chrom[3..chrom.high] in chroms: result = chrom[3..chrom.high] - elif chrom.toUpperAscii in MTs: # try all the MT chroms. + elif chrom in MTs: # try all the MT chroms. for c in MTs: if c in chroms: return c