# HG changeset patch # User jingchunzhu # Date 1442960179 25200 # Node ID 3e5680fecd7ab7a4a71a865d1a5bdd9a69d5f7bf # Parent eef100efcc4c9e0621f3e2a8fcbc4be410fb21a0 accept chr1 and 1 diff -r eef100efcc4c -r 3e5680fecd7a seg2matrix/CGData/GeneMap.py --- a/seg2matrix/CGData/GeneMap.py Fri Sep 18 11:11:15 2015 -0700 +++ b/seg2matrix/CGData/GeneMap.py Tue Sep 22 15:16:19 2015 -0700 @@ -24,6 +24,7 @@ """ if cmp_func is None: cmp_func = self.cmp_func + if not ref_gene.has_chrom(segment.chrom): return [] chromList = ref_gene.get_chrom(segment.chrom) diff -r eef100efcc4c -r 3e5680fecd7a seg2matrix/segToProbeMap.py --- a/seg2matrix/segToProbeMap.py Fri Sep 18 11:11:15 2015 -0700 +++ b/seg2matrix/segToProbeMap.py Tue Sep 22 15:16:19 2015 -0700 @@ -31,6 +31,10 @@ class probeseg: def __init__(self, name, chrom, chrom_start, chrom_end, strand): self.name = name + if chrom[0:3] in ["chr","CHR","Chr"]: + chrom = "chr"+chrom[3:] + else: + chrom = "chr"+chrom self.chrom = chrom self.chrom_start = chrom_start self.chrom_end = chrom_end