comparison tracks/BamFeatures.py @ 6:237707a6b74d draft

planemo upload for repository https://github.com/Yating-L/jbrowse-archive-creator.git commit a500f7ab2119cc5faaf80393bd87428389d06880-dirty
author yating-l
date Thu, 15 Feb 2018 17:05:05 -0500
parents
children 62dee5369e80
comparison
equal deleted inserted replaced
5:e762f4b9e4bd 6:237707a6b74d
1 #!/usr/bin/env python
2 import os
3 import json
4 import logging
5
6 from TrackDb import TrackDb
7 from util import subtools
8 from util import santitizer
9
10
11 class BamFeatures(TrackDb):
12 def __init__(self, trackName, trackLabel, trackDataURL, trackType, dataType, extraSettings=None):
13 super(BamFeatures, self).__init__(trackName, trackLabel, trackDataURL, trackType, dataType, extraSettings)
14
15 def prepareExtraSetting(self):
16 if 'category' not in self.extraSettings or not self.extraSettings['category']:
17 self.extraSettings['category'] = "Default group"
18 bam_track = dict()
19 bam_track['type'] = 'JBrowse/View/Track/Alignments2'
20 bam_track['storeClass'] = 'JBrowse/Store/SeqFeature/BAM'
21 bam_track['urlTemplate'] = os.path.join('bbi', self.trackName)
22 bam_track['baiUrlTemplate'] = os.path.join('bbi', self.extraSettings['index'])
23 bam_track['label'] = self.trackLabel
24 bam_track['category'] = self.extraSettings['category']
25 #extraConfigs = json.dumps(bam_track)
26 extraConfigs = bam_track
27 return extraConfigs
28
29