Mercurial > repos > yating-l > jbrowse_hub
diff TrackHub.py @ 45:15b4a74722d1 draft
planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit 73ede51a133dc8914812195a1b4cd512bfb8f23d
author | yating-l |
---|---|
date | Wed, 22 Mar 2017 12:07:32 -0400 |
parents | 37422f705e9b |
children | 6803152ea92a |
line wrap: on
line diff
--- a/TrackHub.py Mon Mar 20 13:15:34 2017 -0400 +++ b/TrackHub.py Wed Mar 22 12:07:32 2017 -0400 @@ -45,7 +45,7 @@ print "Cannot prepare reference error({0}): {1}".format(e.errno, e.strerror) #TODO: hard coded the bam and bigwig tracks. Need to allow users to customize the settings def addTrack(self, track): - print "false_path" , track['false_path'] + #print "false_path" , track['false_path'] if track['false_path'] in self.metaData.keys(): metadata = self.metaData[track['false_path']] else: @@ -58,7 +58,7 @@ self.BigWig(track, metadata) else: gff3_file = os.path.join(self.raw, track['fileName']) - if track['dataType'] == 'bedSpliceJunctions' or track['dataType'] == 'gtf': + if track['dataType'] == 'bedSpliceJunctions' or track['dataType'] == 'gtf' or track['dataType'] == 'blastxml': p = subprocess.Popen(['flatfile-to-json.pl', '--gff', gff3_file, '--trackType', metadata['type'], '--trackLabel', metadata['label'], '--Config', '{"glyph": "JBrowse/View/FeatureGlyph/Segments", "category" : "%s"}' % metadata['category'], '--clientConfig', '{"color" : "%s"}' % metadata['color'], '--out', self.json]) elif track['dataType'] == 'gff3_transcript': p = subprocess.Popen(['flatfile-to-json.pl', '--gff', gff3_file, '--trackType', metadata['type'], '--trackLabel', metadata['label'], '--Config', '{"transcriptType": "transcript", "category" : "%s"}' % metadata['category'], '--clientConfig', '{"color" : "%s"}' % metadata['color'], '--out', self.json]) @@ -128,7 +128,7 @@ #If the metadata is not set, use the default value def SetMetadata(self, track, metadata): - print metadata + #print metadata #track.update(metadata) if 'label' not in metadata.keys() or metadata['label'] == '': metadata['label'] = track['fileName']