Mercurial > repos > rmarenco > hubarchivecreator
diff Datatype.py @ 16:3233451a3bd6 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit fc73ec22a0db3ab09c4ac13dc58f0b54ae37845c
author | rmarenco |
---|---|
date | Sun, 25 Sep 2016 11:25:38 -0400 |
parents | 25809f699cb3 |
children | c02720d1afee |
line wrap: on
line diff
--- a/Datatype.py Fri Sep 02 15:41:51 2016 -0400 +++ b/Datatype.py Sun Sep 25 11:25:38 2016 -0400 @@ -76,7 +76,7 @@ file_path=None, track_name=None, long_label=None, thick_draw_item='off', short_label=None, track_type=None, visibility=None, priority=None, - track_file=None): + track_file=None, track_color='#000000'): # TODO: Remove the hardcoded "tracks" by the value used as variable from myTrackFolderPath data_url = "tracks/%s" % file_path @@ -89,6 +89,12 @@ long_label = long_label.replace("_", " ") short_label = short_label.replace("_", " ") + #TODO: Check if rgb or hexa + # Convert hexa to rgb array + hexa_without_sharp = track_color.lstrip('#') + rgb_array = [int(hexa_without_sharp[i:i+2], 16) for i in (0, 2, 4)] + rgb_ucsc = ','.join(map(str, rgb_array)) + track_db = TrackDb( trackName=track_name, longLabel=long_label, @@ -98,6 +104,7 @@ visibility=visibility, thickDrawItem=thick_draw_item, priority=priority, + track_color=rgb_ucsc ) # Return the Bam Track Object