Mercurial > repos > yating-l > hubarchivecreator
comparison Bam.py @ 52:c66803bff0cc draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit adc1ac50269e02570e7ce12c732637bdd3f9a547-dirty
| author | yating-l |
|---|---|
| date | Thu, 11 May 2017 17:21:15 -0400 |
| parents | 364b8db8de17 |
| children | b39dd0b5a166 |
comparison
equal
deleted
inserted
replaced
| 51:364b8db8de17 | 52:c66803bff0cc |
|---|---|
| 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 # |
