diff 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
line wrap: on
line diff
--- a/gffcompare_to_bed.py	Tue Apr 07 11:36:42 2020 -0400
+++ b/gffcompare_to_bed.py	Wed Jan 13 20:59:52 2021 +0000
@@ -44,7 +44,13 @@
         else:
             self.blockStarts = blockStarts
 
+    def sort_exons(self):
+        sorted_list = [i for i in sorted(zip(self.blockStarts,self.blockSizes))]
+        self.blockStarts = [i[0] for i in sorted_list]
+        self.blockSizes = [i[1] for i in sorted_list]
+
     def __str__(self):
+        self.sort_exons()
         return '%s\t%d\t%d\t%s\t%d\t%s\t%d\t%d\t%s\t%d\t%s\t%s' % (
             self.chrom, self.chromStart, self.chromEnd,
             self.name, self.score, self.strand,