# HG changeset patch # User iuc # Date 1480719534 18000 # Node ID 1a6d882d340d39c345b7dae46a54aa7121507ef1 # Parent f422ba2e9aa58984936996b48bde4fe88b5cfdd0 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse commit ac44b067ee08de23180e8b5030374cf362ac4524 diff -r f422ba2e9aa5 -r 1a6d882d340d jbrowse.py --- a/jbrowse.py Tue Nov 29 12:31:56 2016 -0500 +++ b/jbrowse.py Fri Dec 02 17:58:54 2016 -0500 @@ -264,11 +264,11 @@ if children: dd = defaultdict(list) for dc in map(etree_to_dict, children): - for k, v in dc.iteritems(): + for k, v in dc.items(): dd[k].append(v) - d = {t.tag: {k: v[0] if len(v) == 1 else v for k, v in dd.iteritems()}} + d = {t.tag: {k: v[0] if len(v) == 1 else v for k, v in dd.items()}} if t.attrib: - d[t.tag].update(('@' + k, v) for k, v in t.attrib.iteritems()) + d[t.tag].update(('@' + k, v) for k, v in t.attrib.items()) if t.text: text = t.text.strip() if children or t.attrib: @@ -370,7 +370,7 @@ self.subprocess_check_call(cmd) def _add_track_json(self, json_data): - if len(json_data.keys()) == 0: + if len(json_data) == 0: return tmp = tempfile.NamedTemporaryFile(delete=False) @@ -499,7 +499,6 @@ self.TN_TABLE.get(format, 'gff'), data, '--trackLabel', trackData['label'], - # '--trackType', 'JBrowse/View/Track/CanvasFeatures', '--key', trackData['key'] ] @@ -514,14 +513,21 @@ cmd += ['--clientConfig', json.dumps(clientConfig), ] + trackType = 'JBrowse/View/Track/CanvasFeatures' if 'trackType' in gffOpts: - cmd += [ - '--trackType', gffOpts['trackType'] - ] - else: - cmd += [ - '--trackType', 'JBrowse/View/Track/CanvasFeatures' - ] + trackType = gffOpts['trackType'] + + if trackType == 'JBrowse/View/Track/CanvasFeatures': + if 'transcriptType' in gffOpts and gffOpts['transcriptType']: + config['transcriptType'] = gffOpts['transcriptType'] + if 'subParts' in gffOpts and gffOpts['subParts']: + config['subParts'] = gffOpts['subParts'] + if 'impliedUTRs' in gffOpts and gffOpts['impliedUTRs']: + config['impliedUTRs'] = gffOpts['impliedUTRs'] + + cmd += [ + '--trackType', gffOpts['trackType'] + ] cmd.extend(['--config', json.dumps(config)]) @@ -544,7 +550,7 @@ log.info('Processing %s / %s', track['category'], track_human_label) outputTrackConfig['key'] = track_human_label hashData = [dataset_path, track_human_label, track['category']] - outputTrackConfig['label'] = hashlib.md5('|'.join(hashData)).hexdigest() + '_%s' % i + outputTrackConfig['label'] = hashlib.md5('|'.join(hashData).encode('utf-8')).hexdigest() + '_%s' % i # Colour parsing is complex due to different track types having # different colour options. @@ -640,7 +646,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description="", epilog="") - parser.add_argument('xml', type=file, help='Track Configuration') + parser.add_argument('xml', type=argparse.FileType('r'), help='Track Configuration') parser.add_argument('--jbrowse', help='Folder containing a jbrowse release') parser.add_argument('--outdir', help='Output directory', default='out') diff -r f422ba2e9aa5 -r 1a6d882d340d jbrowse.xml --- a/jbrowse.xml Tue Nov 29 12:31:56 2016 -0500 +++ b/jbrowse.xml Fri Dec 02 17:58:54 2016 -0500 @@ -216,7 +216,18 @@ #else if str($track.data_format.data_format_select) == "gene_calls": - ${track.data_format.track_class} + ${track.data_format.track_config.track_class} + #if $track.data_format.track_config.track_class == 'JBrowse/View/Track/CanvasFeatures': + #if str($track.data_format.track_config.canvas_options.transcriptType) != "": + ${track.data_format.track_config.canvas_options.transcriptType} + #end if + #if str($track.data_format.track_config.canvas_options.subParts) != "": + ${track.data_format.track_config.canvas_options.subParts} + #end if + #if str($track.data_format.track_config.canvas_options.impliedUTRs) != "false": + ${track.data_format.track_config.canvas_options.impliedUTRs} + #end if + #end if #if $track.data_format.match_part.match_part_select: ${track.data_format.match_part.name} #end if @@ -381,10 +392,36 @@ - - - - + + + + + + +
+ + + +
+
+ +
@@ -729,6 +766,43 @@ + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ + + + + + +
+
+
+
+ + + +
\$GALAXY_JBROWSE_SHARED_DIR - 0.5.1 + 0.5.2 @@ -265,7 +265,7 @@ + help="Will be displayed in the popup title bar if displayed ({id}, {type}, {start}, {end}, {strand} variables will be interpreted)"> + + + 11 + + /tmp/tmplFZ5li/files/000/dataset_14.dat + + + + 20 + + true + + true + true + true + true + false + + + + + + + + + + + + ignore + + __auto__ + + + + + + + JBrowse/View/Track/CanvasFeatures + false + + + + +