comparison Bed.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 6aa28a85cc38
comparison
equal deleted inserted replaced
25:99dad5f9444c 26:df42241d3731
24 self.name_bed_generic = self.data_bed_generic["name"] 24 self.name_bed_generic = self.data_bed_generic["name"]
25 self.priority = self.data_bed_generic["order_index"] 25 self.priority = self.data_bed_generic["order_index"]
26 self.track_color = self.data_bed_generic["track_color"] 26 self.track_color = self.data_bed_generic["track_color"]
27 # TODO: Think about how to avoid repetition of the group_name everywhere 27 # TODO: Think about how to avoid repetition of the group_name everywhere
28 self.group_name = self.data_bed_generic["group_name"] 28 self.group_name = self.data_bed_generic["group_name"]
29 self.database = self.data_bed_generic["database"]
29 if self.data_bed_generic["long_label"]: 30 if self.data_bed_generic["long_label"]:
30 self.long_label = self.data_bed_generic["long_label"] 31 self.long_label = self.data_bed_generic["long_label"]
31 else: 32 else:
32 self.long_label = self.name_bed_generic 33 self.long_label = self.name_bed_generic
33 34
40 41
41 myBigBedFilePath = os.path.join(self.myTrackFolderPath, trackName) 42 myBigBedFilePath = os.path.join(self.myTrackFolderPath, trackName)
42 with open(myBigBedFilePath, 'w') as self.bigBedFile: 43 with open(myBigBedFilePath, 'w') as self.bigBedFile:
43 subtools.bedToBigBed(self.sortedBedFile.name, 44 subtools.bedToBigBed(self.sortedBedFile.name,
44 self.chromSizesFile.name, 45 self.chromSizesFile.name,
45 self.bigBedFile.name) 46 self.bigBedFile.name,
47 extraIndex='name'
48 )
46 49
47 # Create the Track Object 50 # Create the Track Object
48 self.createTrack(file_path=trackName, 51 self.createTrack(file_path=trackName,
49 track_name=trackName, 52 track_name=trackName,
50 long_label=self.long_label, track_type='bigBed', visibility='dense', 53 long_label=self.long_label, track_type='bigBed', visibility='dense',
51 priority=self.priority, 54 priority=self.priority,
52 track_file=myBigBedFilePath, 55 track_file=myBigBedFilePath,
53 track_color=self.track_color, 56 track_color=self.track_color,
54 group_name=self.group_name) 57 group_name=self.group_name,
58 database=self.database)
55 59
56 # dataURL = "tracks/%s" % trackName 60 # dataURL = "tracks/%s" % trackName
57 # 61 #
58 # trackDb = TrackDb( 62 # trackDb = TrackDb(
59 # trackName=trackName, 63 # trackName=trackName,