Mercurial > repos > yating-l > hubarchivecreator
comparison bigPsl.py @ 51:364b8db8de17 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 6ac76e7da539ca1773fb809054679f0bf8a06972-dirty
| author | yating-l |
|---|---|
| date | Wed, 12 Apr 2017 16:51:03 -0400 |
| parents | d5781fe7b782 |
| children | c66803bff0cc |
comparison
equal
deleted
inserted
replaced
| 50:47dc3e7470dd | 51:364b8db8de17 |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 import os | 3 import os |
| 4 import tempfile | 4 import tempfile |
| 5 import string | |
| 5 | 6 |
| 6 from Datatype import Datatype | 7 from Datatype import Datatype |
| 7 from Track import Track | 8 from Track import Track |
| 8 from TrackDb import TrackDb | 9 from TrackDb import TrackDb |
| 9 from util import subtools | 10 from util import subtools |
| 27 #subtools.sort(self.input_bigpsl_false_path, sortedBedFile.name) | 28 #subtools.sort(self.input_bigpsl_false_path, sortedBedFile.name) |
| 28 | 29 |
| 29 # bedToBigBed processing | 30 # bedToBigBed processing |
| 30 # TODO: Change the name of the bb, to tool + genome + .bb | 31 # TODO: Change the name of the bb, to tool + genome + .bb |
| 31 trackName = "".join( ( self.name_bigpsl, '.bb' ) ) | 32 trackName = "".join( ( self.name_bigpsl, '.bb' ) ) |
| 33 | |
| 32 myBigBedFilePath = os.path.join(self.myTrackFolderPath, trackName) | 34 myBigBedFilePath = os.path.join(self.myTrackFolderPath, trackName) |
| 33 | 35 |
| 34 auto_sql_option = os.path.join(self.tool_directory, 'bigPsl.as') | 36 auto_sql_option = os.path.join(self.tool_directory, 'bigPsl.as') |
| 35 | 37 |
| 36 with open(myBigBedFilePath, 'w') as bigBedFile: | 38 with open(myBigBedFilePath, 'w') as bigBedFile: |
| 39 bigBedFile.name, | 41 bigBedFile.name, |
| 40 typeOption='bed12+12', | 42 typeOption='bed12+12', |
| 41 tab='True', | 43 tab='True', |
| 42 autoSql=auto_sql_option) | 44 autoSql=auto_sql_option) |
| 43 | 45 |
| 44 # Create the Track Object | |
| 45 self.createTrack(file_path=trackName, | 46 self.createTrack(file_path=trackName, |
| 46 track_name=trackName, | 47 track_name=trackName, |
| 47 long_label=self.name_bigpsl, track_type='bigBed 12 +', visibility='dense', | 48 long_label=self.name_bigpsl, track_type='bigPsl', visibility='dense', |
| 48 priority=self.priority, | 49 priority=self.priority, |
| 49 track_file=myBigBedFilePath, | 50 track_file=myBigBedFilePath, |
| 50 track_color=self.track_color, | 51 track_color=self.track_color, |
| 51 group_name=self.group_name) | 52 group_name=self.group_name) |
| 53 | |
| 52 | 54 |
| 53 # dataURL = "tracks/%s" % trackName | 55 # dataURL = "tracks/%s" % trackName |
| 54 # | 56 # |
| 55 # trackDb = TrackDb( | 57 # trackDb = TrackDb( |
| 56 # trackName=trackName, | 58 # trackName=trackName, |
