changeset 58:3e5680fecd7a

accept chr1 and 1
author jingchunzhu
date Tue, 22 Sep 2015 15:16:19 -0700
parents eef100efcc4c
children b88b95642f59
files seg2matrix/CGData/GeneMap.py seg2matrix/segToProbeMap.py
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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