Mercurial > repos > melissacline > ucsc_cancer_utilities
diff seg2matrix/segToMatrixGalaxy.py @ 60:bf57076e27b9 default tip
change genomicSegment input data
author | jingchunzhu@gmail.com |
---|---|
date | Tue, 27 Oct 2015 16:07:09 -0700 |
parents | 59dbe857f5d4 |
children |
line wrap: on
line diff
--- a/seg2matrix/segToMatrixGalaxy.py Tue Sep 22 15:41:03 2015 -0700 +++ b/seg2matrix/segToMatrixGalaxy.py Tue Oct 27 16:07:09 2015 -0700 @@ -1,6 +1,6 @@ #!/usr/bin/env python -import sys,os +import sys,os, string import CGData.GenomicSegment import CGData.SegToMatrix import CGData.RefGene @@ -15,7 +15,7 @@ self.buff += s if s.endswith("\n"): tmp = self.buff.split("\t") - if tmp[0] != "probe": + if string.strip(tmp[0]) != "probe": tmp2 = tmp[0].split("_") p = probeseg(tmp[0], tmp2[0], int(tmp2[1]), int(tmp2[2])) self.probes.append(p) @@ -31,14 +31,13 @@ self.chrom_end = chrom_end self.strand = "." - if __name__ == "__main__": if len(sys.argv[:])!= 6: print "python segToMatrixGalaxy.py inputSegmentFile refGeneFile outputMatrix outputProbeMap NORMAL_CNV\n" sys.exit() seg = CGData.GenomicSegment.GenomicSegment() seg.load(sys.argv[1]) - + refgene = CGData.RefGene.RefGene() refgene.load(os.path.dirname(sys.argv[0])+"/"+os.path.basename(sys.argv[2]))