diff BigWig.py @ 11:d05236b15f81 draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
author rmarenco
date Wed, 27 Jul 2016 10:10:49 -0400
parents acc233161f50
children 747475757cb0
line wrap: on
line diff
--- a/BigWig.py	Thu Jul 21 05:58:51 2016 -0400
+++ b/BigWig.py	Wed Jul 27 10:10:49 2016 -0400
@@ -19,7 +19,7 @@
         self.name_bigwig = data_bigwig["name"]
         self.priority = data_bigwig["order_index"]
 
-        print "Creating TrackHub BigWig from (falsePath: %s; name: %s)" % ( self.input_bigwig_path, self.name_bigwig )
+        #print "Creating TrackHub BigWig from (falsePath: %s; name: %s)" % ( self.input_bigwig_path, self.name_bigwig )
 
         trackName = "".join( ( self.name_bigwig, ".bigwig" ) )
 
@@ -27,22 +27,30 @@
         shutil.copy(self.input_bigwig_path, myBigWigFilePath)
 
         # Create the Track Object
-        dataURL = "tracks/%s" % trackName
+        self.createTrack(file_path=trackName,
+                         track_name=trackName,
+                         long_label=self.name_bigwig, track_type='bigwig', visibility='full',
+                         priority=self.priority,
+                         track_file=myBigWigFilePath)
 
-        # Return the BigBed track
-        trackDb = TrackDb(
-            trackName=trackName,
-            longLabel=self.name_bigwig,
-            shortLabel=self.getShortName( self.name_bigwig ),
-            trackDataURL=dataURL,
-            trackType='bigWig',
-            visibility='full',
-            priority=self.priority,
-        )
+        # dataURL = "tracks/%s" % trackName
+        #
+        # # Return the BigBed track
+        #
+        # trackDb = TrackDb(
+        #     trackName=trackName,
+        #     longLabel=self.name_bigwig,
+        #     shortLabel=self.getShortName( self.name_bigwig ),
+        #     trackDataURL=dataURL,
+        #     trackType='bigWig',
+        #     visibility='full',
+        #     priority=self.priority,
+        # )
+        #
+        # self.track = Track(
+        #     trackFile=myBigWigFilePath,
+        #     trackDb=trackDb,
+        # )
 
-        self.track = Track(
-            trackFile=myBigWigFilePath,
-            trackDb=trackDb,
-        )
-
-        print("- %s created in %s" % (trackName, myBigWigFilePath))
+        print("- BigWig %s created" % self.name_bigwig)
+        #print("- %s created in %s" % (trackName, myBigWigFilePath))