Mercurial > repos > rmarenco > hubarchivecreator
comparison Datatype.py @ 26:df42241d3731 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit c11beb58525fe6453a2180fe7783f6e8b0151901-dirty
author | yating-l |
---|---|
date | Mon, 03 Jul 2017 17:30:20 -0400 |
parents | 2677f1899aa8 |
children |
comparison
equal
deleted
inserted
replaced
25:99dad5f9444c | 26:df42241d3731 |
---|---|
74 # TODO: Use default parameters for some, like visibility | 74 # TODO: Use default parameters for some, like visibility |
75 def createTrack(self, | 75 def createTrack(self, |
76 file_path=None, | 76 file_path=None, |
77 track_name=None, long_label=None, thick_draw_item='off', | 77 track_name=None, long_label=None, thick_draw_item='off', |
78 short_label=None, track_type=None, visibility=None, priority=None, | 78 short_label=None, track_type=None, visibility=None, priority=None, |
79 track_file=None, track_color='#000000', group_name="Default"): | 79 track_file=None, track_color='#000000', group_name="Default", database=""): |
80 | 80 |
81 # TODO: Remove the hardcoded "tracks" by the value used as variable from myTrackFolderPath | 81 # TODO: Remove the hardcoded "tracks" by the value used as variable from myTrackFolderPath |
82 data_url = "tracks/%s" % file_path | 82 data_url = "tracks/%s" % file_path |
83 | 83 |
84 if not short_label: | 84 if not short_label: |
95 rgb_array = [int(hexa_without_sharp[i:i+2], 16) for i in (0, 2, 4)] | 95 rgb_array = [int(hexa_without_sharp[i:i+2], 16) for i in (0, 2, 4)] |
96 rgb_ucsc = ','.join(map(str, rgb_array)) | 96 rgb_ucsc = ','.join(map(str, rgb_array)) |
97 | 97 |
98 #sanitize the track_name | 98 #sanitize the track_name |
99 sanitized_name = subtools.fixName(track_name) | 99 sanitized_name = subtools.fixName(track_name) |
100 | |
101 track_db = TrackDb( | 100 track_db = TrackDb( |
102 trackName=sanitized_name, | 101 trackName=sanitized_name, |
103 longLabel=long_label, | 102 longLabel=long_label, |
104 shortLabel=short_label, | 103 shortLabel=short_label, |
105 trackDataURL=data_url, | 104 trackDataURL=data_url, |
106 trackType=track_type, | 105 trackType=track_type, |
107 visibility=visibility, | 106 visibility=visibility, |
108 thickDrawItem=thick_draw_item, | 107 thickDrawItem=thick_draw_item, |
109 priority=priority, | 108 priority=priority, |
110 track_color=rgb_ucsc, | 109 track_color=rgb_ucsc, |
111 group_name=group_name | 110 group_name=group_name, |
111 database=database | |
112 ) | 112 ) |
113 | 113 |
114 # Return the Bam Track Object | 114 # Return the Bam Track Object |
115 self.track = Track( | 115 self.track = Track( |
116 trackFile=track_file, | 116 trackFile=track_file, |