diff TrackHub.py @ 70:39a32cb31623 draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 159730602ff500b59aefc7080fb49b726c88d655-dirty
author yating-l
date Tue, 26 Sep 2017 18:46:02 -0400
parents 4ca7cbf2d9b8
children
line wrap: on
line diff
--- a/TrackHub.py	Tue Sep 26 17:56:42 2017 -0400
+++ b/TrackHub.py	Tue Sep 26 18:46:02 2017 -0400
@@ -11,6 +11,7 @@
 # Internal dependencies
 from datatypes.Datatype import Datatype
 from util import subtools
+from util import santitizer
 
 
 
@@ -84,11 +85,12 @@
         trackDbTxtFilePath = os.path.join(self.mySpecieFolderPath, 'trackDb.txt')
         # Append to trackDbTxtFilePath the trackDbTemplate populate with the newTrack object
         with open(trackDbTxtFilePath, 'a+') as trackDbFile:
+            group_name = trackDbObject["group"]
+            trackDbObject["group"] = santitizer.sanitize_group_name(trackDbObject["group"])
             trackDbs = [trackDbObject]
-
             # TODO: The addGroup does not belong here. Move it when the group becomes more than just a label
             # Add the group as well, if exists in trackDbObject
-            self.addGroup(trackDbObject["group"])
+            self.addGroup(group_name)
 
             htmlMakoRendered = self.trackDbTemplate.render(
                 trackDbs=trackDbs