83b6e55d2e100cb7c6e92e5c57d934040d8a524d max Tue Jan 26 06:59:34 2021 -0800 adding * as a valid chrom name to chromToUcsc, refs #26839 diff --git src/utils/chromToUcsc/chromToUcsc src/utils/chromToUcsc/chromToUcsc index eb8b316..6e17808 100755 --- src/utils/chromToUcsc/chromToUcsc +++ src/utils/chromToUcsc/chromToUcsc @@ -123,31 +123,31 @@ elif row[0][0]== "@": fieldIdx = 2 # SAM format detected isSam = True if row[0]=="@SQ": # @SQ SN:1 LN:195471971 chrom = row[1].split(":")[1] if chrom not in ucscChroms: ucscChrom = toUcsc.get(chrom) if ucscChrom is None: logging.error("SAM format, header line %d: chrom name %s is not in chromAlias table" % (lineNo, repr(chrom))) exit(1) row[1] = "SN:%s" % ucscChrom else: # just pass through any UCSC chrom names chrom = row[fieldIdx] - if row[0].startswith("#") or chrom in ucscChroms: + if row[0].startswith("#") or chrom in ucscChroms or chrom=="*": ucscChrom = chrom else: ucscChrom = toUcsc.get(chrom) if ucscChrom is None: logging.error("line %d: chrom name %s is not in chromAlias table" % (lineNo, repr(chrom))) exit(1) if isSam: mateChrom = row[6] if mateChrom!="=": row[6] = toUcsc[mateChrom] row[fieldIdx] = ucscChrom line = sep.join(row) ofh.write(line)