Mercurial > repos > melissacline > ucsc_cancer_utilities
comparison seg2matrix/segToProbeMap.py @ 58:3e5680fecd7a
accept chr1 and 1
| author | jingchunzhu |
|---|---|
| date | Tue, 22 Sep 2015 15:16:19 -0700 |
| parents | 61f03b481b0d |
| children |
comparison
equal
deleted
inserted
replaced
| 57:eef100efcc4c | 58:3e5680fecd7a |
|---|---|
| 29 | 29 |
| 30 | 30 |
| 31 class probeseg: | 31 class probeseg: |
| 32 def __init__(self, name, chrom, chrom_start, chrom_end, strand): | 32 def __init__(self, name, chrom, chrom_start, chrom_end, strand): |
| 33 self.name = name | 33 self.name = name |
| 34 if chrom[0:3] in ["chr","CHR","Chr"]: | |
| 35 chrom = "chr"+chrom[3:] | |
| 36 else: | |
| 37 chrom = "chr"+chrom | |
| 34 self.chrom = chrom | 38 self.chrom = chrom |
| 35 self.chrom_start = chrom_start | 39 self.chrom_start = chrom_start |
| 36 self.chrom_end = chrom_end | 40 self.chrom_end = chrom_end |
| 37 self.strand = strand | 41 self.strand = strand |
| 38 | 42 |
