comparison Bam.py @ 23:2677f1899aa8 draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 07210e24fe7d22f5dfc84061310280f67f781fb1-dirty
author yating-l
date Tue, 09 May 2017 15:42:43 -0400
parents 884ee2a71680
children df42241d3731
comparison
equal deleted inserted replaced
22:7ddf651457df 23:2677f1899aa8
35 # TODO: Think about how to avoid repetition of the color treatment 35 # TODO: Think about how to avoid repetition of the color treatment
36 self.track_color = self.data_bam["track_color"] 36 self.track_color = self.data_bam["track_color"]
37 37
38 # TODO: Think about how to avoid repetition of the group_name everywhere 38 # TODO: Think about how to avoid repetition of the group_name everywhere
39 self.group_name = self.data_bam["group_name"] 39 self.group_name = self.data_bam["group_name"]
40 40 if self.data_bam["long_label"]:
41 self.long_label = self.data_bam["long_label"]
42 else:
43 self.long_label = self.name_bam
41 # First: Add the bam file 44 # First: Add the bam file
42 # Second: Add the bam index file, in the same folder (https://genome.ucsc.edu/goldenpath/help/bam.html) 45 # Second: Add the bam index file, in the same folder (https://genome.ucsc.edu/goldenpath/help/bam.html)
43 46
44 bam_file_path = os.path.join(self.myTrackFolderPath, self.name_bam) 47 bam_file_path = os.path.join(self.myTrackFolderPath, self.name_bam)
45 shutil.copyfile(self.input_bam_false_path, bam_file_path) 48 shutil.copyfile(self.input_bam_false_path, bam_file_path)
50 shutil.copyfile(self.index_bam, bam_index_file_path) 53 shutil.copyfile(self.index_bam, bam_index_file_path)
51 54
52 # Create the Track Object 55 # Create the Track Object
53 self.createTrack(file_path=self.name_bam, 56 self.createTrack(file_path=self.name_bam,
54 track_name=self.name_bam, 57 track_name=self.name_bam,
55 long_label=self.name_bam, track_type='bam', visibility='pack', priority=self.priority, 58 long_label=self.long_label, track_type='bam', visibility='pack', priority=self.priority,
56 track_file=bam_index_file_path, 59 track_file=bam_index_file_path,
57 track_color=self.track_color, 60 track_color=self.track_color,
58 group_name=self.group_name 61 group_name=self.group_name
59 ) 62 )
60 # 63 #