comparison jbrowse.py @ 16:b5c5470d7c09 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse commit c306d242caf7e0447517c9749ca7656823f315e5
author iuc
date Wed, 13 Sep 2017 13:07:20 -0400
parents 18be2d72fdee
children ff11d442feed
comparison
equal deleted inserted replaced
15:4e11a688a635 16:b5c5470d7c09
434 if blastOpts.get('index', 'false') == 'true': 434 if blastOpts.get('index', 'false') == 'true':
435 self.tracksToIndex.append("%s" % trackData['label']) 435 self.tracksToIndex.append("%s" % trackData['label'])
436 436
437 def add_bigwig(self, data, trackData, wiggleOpts, **kwargs): 437 def add_bigwig(self, data, trackData, wiggleOpts, **kwargs):
438 dest = os.path.join('data', 'raw', trackData['label'] + '.bw') 438 dest = os.path.join('data', 'raw', trackData['label'] + '.bw')
439 cmd = ['ln', data, dest] 439 cmd = ['ln', '-s', data, dest]
440 self.subprocess_check_call(cmd) 440 self.subprocess_check_call(cmd)
441 441
442 url = os.path.join('raw', trackData['label'] + '.bw') 442 url = os.path.join('raw', trackData['label'] + '.bw')
443 trackData.update({ 443 trackData.update({
444 "urlTemplate": url, 444 "urlTemplate": url,
564 'description': track['style'].get('description', ''), 564 'description': track['style'].get('description', ''),
565 }, 565 },
566 'category': track['category'], 566 'category': track['category'],
567 } 567 }
568 568
569 mapped_chars = {
570 '>': '__gt__',
571 '<': '__lt__',
572 "'": '__sq__',
573 '"': '__dq__',
574 '[': '__ob__',
575 ']': '__cb__',
576 '{': '__oc__',
577 '}': '__cc__',
578 '@': '__at__',
579 '#': '__pd__'
580 }
581
569 for i, (dataset_path, dataset_ext, track_human_label) in enumerate(track['trackfiles']): 582 for i, (dataset_path, dataset_ext, track_human_label) in enumerate(track['trackfiles']):
583 # Unsanitize labels (element_identifiers are always sanitized by Galaxy)
584 for key, value in mapped_chars.items():
585 track_human_label = track_human_label.replace(value, key)
586
570 log.info('Processing %s / %s', track['category'], track_human_label) 587 log.info('Processing %s / %s', track['category'], track_human_label)
571 outputTrackConfig['key'] = track_human_label 588 outputTrackConfig['key'] = track_human_label
572 hashData = [dataset_path, track_human_label, track['category']] 589 hashData = [dataset_path, track_human_label, track['category']]
573 outputTrackConfig['label'] = hashlib.md5('|'.join(hashData).encode('utf-8')).hexdigest() + '_%s' % i 590 outputTrackConfig['label'] = hashlib.md5('|'.join(hashData).encode('utf-8')).hexdigest() + '_%s' % i
574 591