Mercurial > repos > rmarenco > hubarchivecreator
comparison 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 |
comparison
equal
deleted
inserted
replaced
10:acc233161f50 | 11:d05236b15f81 |
---|---|
17 | 17 |
18 self.input_bigwig_path = input_bigwig_path | 18 self.input_bigwig_path = input_bigwig_path |
19 self.name_bigwig = data_bigwig["name"] | 19 self.name_bigwig = data_bigwig["name"] |
20 self.priority = data_bigwig["order_index"] | 20 self.priority = data_bigwig["order_index"] |
21 | 21 |
22 print "Creating TrackHub BigWig from (falsePath: %s; name: %s)" % ( self.input_bigwig_path, self.name_bigwig ) | 22 #print "Creating TrackHub BigWig from (falsePath: %s; name: %s)" % ( self.input_bigwig_path, self.name_bigwig ) |
23 | 23 |
24 trackName = "".join( ( self.name_bigwig, ".bigwig" ) ) | 24 trackName = "".join( ( self.name_bigwig, ".bigwig" ) ) |
25 | 25 |
26 myBigWigFilePath = os.path.join(self.myTrackFolderPath, trackName) | 26 myBigWigFilePath = os.path.join(self.myTrackFolderPath, trackName) |
27 shutil.copy(self.input_bigwig_path, myBigWigFilePath) | 27 shutil.copy(self.input_bigwig_path, myBigWigFilePath) |
28 | 28 |
29 # Create the Track Object | 29 # Create the Track Object |
30 dataURL = "tracks/%s" % trackName | 30 self.createTrack(file_path=trackName, |
31 track_name=trackName, | |
32 long_label=self.name_bigwig, track_type='bigwig', visibility='full', | |
33 priority=self.priority, | |
34 track_file=myBigWigFilePath) | |
31 | 35 |
32 # Return the BigBed track | 36 # dataURL = "tracks/%s" % trackName |
33 trackDb = TrackDb( | 37 # |
34 trackName=trackName, | 38 # # Return the BigBed track |
35 longLabel=self.name_bigwig, | 39 # |
36 shortLabel=self.getShortName( self.name_bigwig ), | 40 # trackDb = TrackDb( |
37 trackDataURL=dataURL, | 41 # trackName=trackName, |
38 trackType='bigWig', | 42 # longLabel=self.name_bigwig, |
39 visibility='full', | 43 # shortLabel=self.getShortName( self.name_bigwig ), |
40 priority=self.priority, | 44 # trackDataURL=dataURL, |
41 ) | 45 # trackType='bigWig', |
46 # visibility='full', | |
47 # priority=self.priority, | |
48 # ) | |
49 # | |
50 # self.track = Track( | |
51 # trackFile=myBigWigFilePath, | |
52 # trackDb=trackDb, | |
53 # ) | |
42 | 54 |
43 self.track = Track( | 55 print("- BigWig %s created" % self.name_bigwig) |
44 trackFile=myBigWigFilePath, | 56 #print("- %s created in %s" % (trackName, myBigWigFilePath)) |
45 trackDb=trackDb, | |
46 ) | |
47 | |
48 print("- %s created in %s" % (trackName, myBigWigFilePath)) |