Mercurial > repos > galaxyp > gffcompare_to_bed
comparison gffcompare_to_bed.py @ 3:ba5368c19dbd draft default tip
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/gffcompare_to_bed commit 98ac160e172e3a404163c1af8e2d5ae42a2b425d"
author | galaxyp |
---|---|
date | Wed, 13 Jan 2021 20:59:52 +0000 |
parents | 9a4cfc910674 |
children |
comparison
equal
deleted
inserted
replaced
2:9a4cfc910674 | 3:ba5368c19dbd |
---|---|
42 elif isinstance(blockStarts, list): | 42 elif isinstance(blockStarts, list): |
43 self.blockStarts = [int(x) for x in blockStarts] | 43 self.blockStarts = [int(x) for x in blockStarts] |
44 else: | 44 else: |
45 self.blockStarts = blockStarts | 45 self.blockStarts = blockStarts |
46 | 46 |
47 def sort_exons(self): | |
48 sorted_list = [i for i in sorted(zip(self.blockStarts,self.blockSizes))] | |
49 self.blockStarts = [i[0] for i in sorted_list] | |
50 self.blockSizes = [i[1] for i in sorted_list] | |
51 | |
47 def __str__(self): | 52 def __str__(self): |
53 self.sort_exons() | |
48 return '%s\t%d\t%d\t%s\t%d\t%s\t%d\t%d\t%s\t%d\t%s\t%s' % ( | 54 return '%s\t%d\t%d\t%s\t%d\t%s\t%d\t%d\t%s\t%d\t%s\t%s' % ( |
49 self.chrom, self.chromStart, self.chromEnd, | 55 self.chrom, self.chromStart, self.chromEnd, |
50 self.name, self.score, self.strand, | 56 self.name, self.score, self.strand, |
51 self.thickStart, self.thickEnd, str(self.itemRgb), self.blockCount, | 57 self.thickStart, self.thickEnd, str(self.itemRgb), self.blockCount, |
52 ','.join([str(x) for x in self.blockSizes]), | 58 ','.join([str(x) for x in self.blockSizes]), |