Mercurial > repos > galaxyp > gffcompare_to_bed
comparison gffcompare_to_bed.py @ 2:2e24ff66228f draft default tip
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/gffcompare_to_bed commit 2a470e2c775a7427aa530e058510e4dc7b6d8e80"
| author | galaxyp | 
|---|---|
| date | Tue, 07 Apr 2020 15:30:58 +0000 | 
| parents | a873420ef833 | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 1:23f34d9dd8e6 | 2:2e24ff66228f | 
|---|---|
| 29 self.strand = '-' if str(strand).startswith('-') else '+' | 29 self.strand = '-' if str(strand).startswith('-') else '+' | 
| 30 self.thickStart = int(thickStart) if thickStart else self.chromStart | 30 self.thickStart = int(thickStart) if thickStart else self.chromStart | 
| 31 self.thickEnd = int(thickEnd) if thickEnd else self.chromEnd | 31 self.thickEnd = int(thickEnd) if thickEnd else self.chromEnd | 
| 32 self.itemRgb = str(itemRgb) if itemRgb is not None else r'100,100,100' | 32 self.itemRgb = str(itemRgb) if itemRgb is not None else r'100,100,100' | 
| 33 self.blockCount = int(blockCount) | 33 self.blockCount = int(blockCount) | 
| 34 if isinstance(blockSizes, str) or isinstance(blockSizes, unicode): | 34 if isinstance(blockSizes, str): | 
| 35 self.blockSizes = [int(x) for x in blockSizes.split(',')] | 35 self.blockSizes = [int(x) for x in blockSizes.split(',')] | 
| 36 elif isinstance(blockSizes, list): | 36 elif isinstance(blockSizes, list): | 
| 37 self.blockSizes = [int(x) for x in blockSizes] | 37 self.blockSizes = [int(x) for x in blockSizes] | 
| 38 else: | 38 else: | 
| 39 self.blockSizes = blockSizes | 39 self.blockSizes = blockSizes | 
| 40 if isinstance(blockStarts, str) or isinstance(blockSizes, unicode): | 40 if isinstance(blockStarts, str): | 
| 41 self.blockStarts = [int(x) for x in blockStarts.split(',')] | 41 self.blockStarts = [int(x) for x in blockStarts.split(',')] | 
| 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 | 
| 91 score, strand, frame, attributes) = fields | 91 score, strand, frame, attributes) = fields | 
| 92 attribute = {i[0]: i[1].strip('"') for i in [j.strip().split(' ') | 92 attribute = {i[0]: i[1].strip('"') for i in [j.strip().split(' ') | 
| 93 for j in attributes.rstrip(';').split(';')]} | 93 for j in attributes.rstrip(';').split(';')]} | 
| 94 if feature == 'transcript': | 94 if feature == 'transcript': | 
| 95 if args.debug: | 95 if args.debug: | 
| 96 print >> sys.stderr, "%s\t%s"\ | 96 sys.stderr.write("%s\t%s\n" % ('\t'.join([seqname, source, | 
| 97 % ('\t'.join([seqname, source, feature, | 97 feature, start, end, score, strand, frame]), | 
| 98 start, end, score, strand, frame]), | 98 attribute)) | 
| 99 attribute) | |
| 100 if bed is not None: | 99 if bed is not None: | 
| 101 write_bed_entry(bed) | 100 write_bed_entry(bed) | 
| 102 bed = None | 101 bed = None | 
| 103 class_code = attribute['class_code'].strip('"')\ | 102 class_code = attribute['class_code'].strip('"')\ | 
| 104 if 'class_code' in attribute else None | 103 if 'class_code' in attribute else None | 
