comparison jbrowse2.xml @ 0:d78175596286 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit cd77dffaad652cfb75b98bde5231beaa6d63cd5b-dirty
author fubar
date Mon, 08 Jan 2024 09:20:33 +0000
parents
children 2de9f585505b
comparison
equal deleted inserted replaced
-1:000000000000 0:d78175596286
1 <tool id="jbrowse2" name="jbrowse2" version="@TOOL_VERSION@+@WRAPPER_VERSION@" profile="22.05">
2 <description>genome browser</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="edamInc"/>
7 <xrefs>
8 <xref type="bio.tools">jbrowse2</xref>
9 </xrefs>
10 <expand macro="requirements"/>
11 <version_command>python '${__tool_directory__}/jbrowse2.py' --version</version_command>
12 <command detect_errors="aggressive"><![CDATA[
13 mkdir -p '$output.files_path' &&
14 ## Copy the XML file into the directory, mostly for debugging
15 ## but nice if users want to reproduce locally
16 cp '$trackxml' '$output.files_path/galaxy.xml' &&
17 python '$__tool_directory__/jbrowse2.py'
18 --outdir '$output.files_path'
19 --xml '$trackxml' &&
20
21 cp '$output.files_path/index.html' '$output'
22
23 ## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph.
24 #if str($uglyTestingHack) == "enabled":
25 && cp '$trackxml' '$output'
26 #end if
27 ]]></command>
28 <configfiles>
29 <configfile name="trackxml"><![CDATA[<?xml version="1.0"?>
30 <root>
31 <metadata>
32 <genomes>
33 #if str($reference_genome.genome_type_select) == "indexed":
34 <genome path="${reference_genome.genomes.fields.path}" label="${reference_genome.genomes.fields.name}">
35 <metadata />
36 </genome>s
37 #else
38 <genome path="$reference_genome.genome" label="${reference_genome.genome.element_identifier}">
39 <metadata>
40 <dataset id="${__app__.security.encode_id($reference_genome.genome.id)}" hid="${reference_genome.genome.hid}"
41 size="${reference_genome.genome.get_size(nice_size=True)}"
42 edam_format="${reference_genome.genome.datatype.edam_format}"
43 file_ext="${reference_genome.genome.ext}"
44 dname = "${reference_genome.genome.element_identifier}" />
45 <history id="${__app__.security.encode_id($reference_genome.genome.history_id)}"
46 #if $reference_genome.genome.history.user:
47 user_email="${reference_genome.genome.history.user.email}"
48 user_id="${reference_genome.genome.history.user_id}"
49 display_name="${reference_genome.genome.history.get_display_name()}"/>
50 #else
51 user_email="anonymous"
52 user_id="-1"
53 display_name="Unnamed History"/>
54 #end if
55 <metadata
56 #for (key, value) in $reference_genome.genome.get_metadata().items():
57 #if "_types" not in $key:
58 #if isinstance($value, list):
59 #set value_str = "[%s]" % ','.join([str(val) for val in value])
60 ${key}="$value_str"
61 #else
62 ${key}="${value}"
63 #end if
64 #end if
65 #end for
66 />
67 <tool
68 tool_id="${reference_genome.genome.creating_job.tool_id}"
69 tool_version="${reference_genome.genome.creating_job.tool_version}"
70 />
71 </metadata>
72 </genome>
73 #end if
74 </genomes>
75 <general>
76 <defaultLocation>${jbgen.defaultLocation}</defaultLocation>
77 <analytics>${jbgen.enableAnalytics}</analytics>
78 <primary_color>${jbgen.primary_color}</primary_color>
79 <secondary_color>${jbgen.secondary_color}</secondary_color>
80 <tertiary_color>${jbgen.tertiary_color}</tertiary_color>
81 <quaternary_color>${jbgen.quaternary_color}</quaternary_color>
82 <font_size>${jbgen.font_size}</font_size>
83 <session_name>${jbgen.session_name}</session_name>
84 </general>
85 <galaxyUrl>${__app__.config.galaxy_infrastructure_url}</galaxyUrl>
86 </metadata>
87 <tracks>
88 #for $tg in $track_groups:
89 #for $track in $tg.data_tracks:
90 <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
91 #if $track.data_format.data_format_select != "sparql":
92 <files>
93 #for $dataset in $track.data_format.annotation:
94 <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.element_identifier}">
95 <metadata>
96 <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
97 size="${dataset.get_size(nice_size=True)}"
98 edam_format="${dataset.datatype.edam_format}"
99 file_ext="${dataset.ext}" />
100 <history id="${__app__.security.encode_id($dataset.history_id)}"
101 #if $dataset.history.user:
102 user_email="${dataset.history.user.email}"
103 user_id="${dataset.history.user_id}"
104 display_name="${dataset.history.get_display_name()}"/>
105 #else
106 user_email="anonymous"
107 user_id="-1"
108 display_name="Unnamed History"/>
109 #end if
110 <metadata
111 #for (key, value) in $dataset.get_metadata().items():
112 #if "_types" not in $key and $value is not None and len(str($value)) < 5000:
113 #if isinstance($value, list):
114 #set value_str = "[%s]" % ','.join([str(val) for val in value])
115 ${key}="$value_str"
116 #else
117 ${key}="${value}"
118 #end if
119 #end if
120 #end for
121 />
122 <tool
123 tool_id="${dataset.creating_job.tool_id}"
124 tool_version="${dataset.creating_job.tool_version}"
125 />
126 </metadata>
127 </trackFile>
128 #end for
129 </files>
130 #end if
131
132 <options>
133 <style>
134 <display>${track.data_format.jbstyle.track_style.display}</display>
135 ## TODO change this to a for loop?
136 #if 'show_labels' in $track.data_format.jbstyle.track_style
137 <trackShowLabels type="boolean">${track.data_format.jbstyle.track_style.show_labels}</trackShowLabels>
138 #end if
139 #if 'show_descriptions' in $track.data_format.jbstyle.track_style
140 <trackShowDescriptions type="boolean">${track.data_format.jbstyle.track_style.show_descriptions}</trackShowDescriptions>
141 #end if
142 #if 'display_mode' in $track.data_format.jbstyle.track_style
143 <trackDisplayMode>${track.data_format.jbstyle.track_style.display_mode}</trackDisplayMode>
144 #end if
145 #if 'max_height' in $track.data_format.jbstyle.track_style
146 <trackMaxHeight type="integer">${track.data_format.jbstyle.track_style.max_height}</trackMaxHeight>
147 #end if
148 #if 'autoscale' in $track.data_format.jbstyle.track_style
149 <autoscale>${track.data_format.jbstyle.track_style.autoscale}</autoscale>
150 #end if
151 #if 'resolution' in $track.data_format.jbstyle.track_style
152 <resolution type="integer">${track.data_format.jbstyle.track_style.resolution}</resolution>
153 #end if
154 #if 'summaryScoreMode' in $track.data_format.jbstyle.track_style
155 <summaryScoreMode>${track.data_format.jbstyle.track_style.summaryScoreMode}</summaryScoreMode>
156 #end if
157 #if 'scaleType' in $track.data_format.jbstyle.track_style
158 <scaleType>${track.data_format.jbstyle.track_style.scaleType}</scaleType>
159 #end if
160 #if 'filled' in $track.data_format.jbstyle.track_style
161 <filled type="boolean">${track.data_format.jbstyle.track_style.filled}</filled>
162 #end if
163 #if 'displayCrossHatches' in $track.data_format.jbstyle.track_style
164 <displayCrossHatches type="boolean">${track.data_format.jbstyle.track_style.displayCrossHatches}</displayCrossHatches>
165 #end if
166 #if 'minScore' in $track.data_format.jbstyle.track_style and $track.data_format.jbstyle.track_style.minScore
167 <minScore type="integer">${track.data_format.jbstyle.track_style.minScore}</minScore>
168 #end if
169 #if 'maxScore' in $track.data_format.jbstyle.track_style and $track.data_format.jbstyle.track_style.maxScore
170 <maxScore type="integer">${track.data_format.jbstyle.track_style.maxScore}</maxScore>
171 #end if
172 ## TODO other coloring/etc options in each renderer (e.g https://github.com/GMOD/jbrowse-components/blob/main/plugins/svg/src/SvgFeatureRenderer/configSchema.ts)
173 </style>
174 <style_labels>
175 ## TODO other label options: https://github.com/GMOD/jbrowse-components/blob/main/plugins/svg/src/SvgFeatureRenderer/configSchema.ts
176 #if 'label' in $track.data_format.jbstyle.track_style
177 <name>${track.data_format.jbstyle.track_style.label}</name>
178 #end if
179 #if 'description' in $track.data_format.jbstyle.track_style
180 <description>${track.data_format.jbstyle.track_style.description}</description>
181 #end if
182 </style_labels>
183 #if str($track.data_format.data_format_select) == "gene_calls" or str($track.data_format.data_format_select) == "blast" or str($track.data_format.data_format_select) == "sparql":
184 <scaling>
185 #if str($track.data_format.jbcolor_scale.color_score.color_score_select) == "none":
186 <method>ignore</method>
187 <scheme>
188 #if str($track.data_format.jbcolor_scale.color_score.color.color_select) == "automatic":
189 <color>__auto__</color>
190 #else
191 <color>${track.data_format.jbcolor_scale.color_score.color.style_color}</color>
192 #end if
193 </scheme>
194 #else
195 <method>score</method>
196 <algo>${track.data_format.jbcolor_scale.color_score.score_scaling}</algo>
197 <scales>
198 <type>${track.data_format.jbcolor_scale.color_score.score_scales.scale_select}</type>
199
200 #if str($track.data_format.jbcolor_scale.color_score.score_scales.scale_select) == "manual":
201 <min>${track.data_format.jbcolor_scale.color_score.score_scales.minimum}</min>
202 <max>${track.data_format.jbcolor_scale.color_score.score_scales.maximum}</max>
203 #end if
204 </scales>
205 <scheme>
206 <type>${track.data_format.jbcolor_scale.color_score.color_scheme.score_scheme}</type>
207 ## auto_color
208 #if str($track.data_format.jbcolor_scale.color_score.color_scheme.score_scheme) == "opacity":
209 #if str($track.data_format.jbcolor_scale.color_score.color_scheme.color.color_select) == "automatic":
210 <color>__auto__</color>
211 #else
212 <color>${track.data_format.jbcolor_scale.color_score.color_scheme.color.style_color}</color>
213 #end if
214 #end if
215 </scheme>
216 #end if
217 </scaling>
218 <menus>
219 #for $menu_item in $track.data_format.jbmenu.track_menu:
220 <menu>
221 <action>${menu_item.menu_action}</action>
222 #if str($menu_item.menu_label) != "":
223 <label>${menu_item.menu_label}</label>
224 #end if
225 #if str($menu_item.menu_title) != "":
226 <title>${menu_item.menu_title}</title>
227 #end if
228 #if str($menu_item.menu_url) != "":
229 <url>${menu_item.menu_url.replace("&", "&amp;").replace("\"", "&quot;")}</url>
230 #end if
231 #if str($menu_item.menu_icon) != "":
232 <iconClass>${menu_item.menu_icon}</iconClass>
233 #end if
234 </menu>
235 #end for
236 </menus>
237 #end if
238
239 #if str($track.data_format.data_format_select) == "wiggle":
240 <wiggle>
241 <type>${track.data_format.xyplot}</type>
242 <variance_band>${track.data_format.var_band}</variance_band>
243 #if str($track.data_format.scaling.scale_select) == "auto_local":
244 <autoscale>local</autoscale>
245 #else if str($track.data_format.scaling.scale_select) == "auto_global":
246 <autoscale>global</autoscale>
247 #else:
248 <min>${track.data_format.scaling.minimum}</min>
249 <max>${track.data_format.scaling.maximum}</max>
250 #end if
251 <scale>${track.data_format.scale_select2}</scale>
252
253 ## Wiggle tracks need special color config
254 #if str($track.data_format.jbcolor.color.color_select) != "automatic":
255 <color_pos>${track.data_format.jbcolor.color.style_pos_color}</color_pos>
256 <color_neg>${track.data_format.jbcolor.color.style_neg_color}</color_neg>
257 #else:
258 <color_pos>__auto__</color_pos>
259 <color_neg>__auto__</color_neg>
260 #end if
261
262 ## Bicolor pivot config
263 #if str($track.data_format.jbcolor.bicolor_pivot.bicolor_pivot_select) == "zero":
264 <bicolor_pivot>zero</bicolor_pivot>
265 #else if str($track.data_format.jbcolor.bicolor_pivot.bicolor_pivot_select) == "mean":
266 <bicolor_pivot>mean</bicolor_pivot>
267 #else:
268 <bicolor_pivot>${track.data_format.jbcolor.bicolor_pivot.pivot_point}</bicolor_pivot>
269 #end if
270 </wiggle>
271 #else if str($track.data_format.data_format_select) == "pileup":
272 <pileup>
273 <bam_indices>
274 #for $dataset in $track.data_format.annotation:
275 <bam_index>${dataset.metadata.bam_index}</bam_index>
276 #end for
277 </bam_indices>
278 </pileup>
279 #else if str($track.data_format.data_format_select) == "cram":
280 <cram>
281 <cram_indices>
282 #for $dataset in $track.data_format.annotation:
283 <cram_index>${dataset.metadata.cram_index}</cram_index>
284 #end for
285 </cram_indices>
286 </cram>
287 #else if str($track.data_format.data_format_select) == "blast":
288 <blast>
289 #if str($track.data_format.blast_parent) != "":
290 <parent>${track.data_format.blast_parent}</parent>
291 #end if
292 <protein>${track.data_format.is_protein}</protein>
293 <min_gap>${track.data_format.min_gap}</min_gap>
294 <index>${track.data_format.index}</index>
295 </blast>
296 #else if str($track.data_format.data_format_select) == "gene_calls":
297 <gff>
298 #if $track.data_format.match_part.match_part_select == "true":
299 <match>${track.data_format.match_part.name}</match>
300 #end if
301 <index>${track.data_format.index}</index>
302 </gff>
303 #else if str($track.data_format.data_format_select) == "synteny":
304 <synteny>
305 <genome>${track.data_format.synteny_genome}</genome>
306 <genome_label>${track.data_format.synteny_genome.element_identifier}</genome_label>
307 </synteny>
308 #else if str($track.data_format.data_format_select) == "hic":
309 <hic>
310 </hic>
311 #else if str($track.data_format.data_format_select) == "sparql":
312 <label>${track.data_format.label}</label>
313 <sparql>
314 <url>${track.data_format.url}</url>
315 <query>${track.data_format.query}</query>
316 <query_refnames>${track.data_format.query_refnames}</query_refnames>
317 </sparql>
318 #end if
319 </options>
320 </track>
321 #end for
322 #end for
323 </tracks>
324 </root>
325 ]]></configfile>
326 </configfiles>
327 <inputs>
328 <conditional name="reference_genome">
329 <param help="Built-in references" label="Reference genome to display" name="genome_type_select" type="select">
330 <option selected="True" value="indexed">Use a built-in genome</option>
331 <option value="history">Use a genome from history</option>
332 </param>
333 <when value="indexed">
334 <param
335 help="If your genome of interest is not listed, contact the Galaxy team"
336 label="Select a reference genome"
337 name="genome"
338 type="select">
339 <options from_data_table="all_fasta">
340 <filter column="2" type="sort_by"/>
341 <validator message="No genomes are available for the selected input dataset" type="no_options">
342 </validator>
343 </options>
344 </param>
345 </when>
346 <when value="history">
347 <param
348 format="fasta"
349 label="Select the reference genome"
350 name="genome"
351 type="data">
352 </param>
353 </when>
354 </conditional>
355
356 <repeat name="track_groups" title="Track Group">
357 <param label="Track Category"
358 name="category"
359 type="text"
360 value="Default"
361 help="Organise your tracks into Categories for a nicer end-user experience. You can use #date# and it will be replaced with the current date in 'yyyy-mm-dd' format, which is very useful for repeatedly updating a JBrowse instance when member databases / underlying tool versions are updated." optional="False"/>
362 <repeat name="data_tracks" title="Annotation Track">
363 <conditional name="data_format" label="Track Options">
364 <param type="select" label="Track Type" name="data_format_select">
365 <option value="pileup">BAM Pileup track</option>
366 <option value="wiggle">BigWig XY track</option>
367 <option value="blast">Blast XML track - converted to GFF with actual gaps between hits</option>
368 <option value="cram">CRAM</option>
369 <option value="gene_calls" selected="true">GFF/GFF3/BED feature tracks</option>
370 <option value="hic">HiC binary data. Existing cool format must be converted to binary hic - hic_matrix will NOT work.</option>
371 <option value="sparql">SPARQL</option>
372 <option value="synteny">Synteny</option>
373 <option value="vcf">VCF SNP annotation track</option>
374 </param>
375 <when value="blast">
376 <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" />
377
378 <param label="Features used in Blast Search"
379 help="in GFF3. This is used so we know where to map features. E.g. where results of which CDS Protein32 match up to. The query IDs in your blast results should MATCH some feature IDs in your GFF3 file. This is an optional field and is most useful if using JBrowse to display protein blast results on a DNA genome. blastn results don't need this, blastp results on a protein sequence don't need this."
380 format="gff3"
381 name="blast_parent"
382 optional="true"
383 type="data"/>
384
385 <param label="Minimum Gap Size"
386 help="before a new match_part feature is created"
387 name="min_gap"
388 type="integer"
389 value="10"
390 min="2" />
391 <param label="Is this a protein blast search?"
392 type="boolean"
393 name="is_protein"
394 truevalue="true"
395 falsevalue="false" />
396
397 <param label="Index this track" name="index" type="boolean" checked="false" truevalue="true" falsevalue="false" />
398
399 <expand macro="track_styling_feature"
400 classname="feature"
401 label="description"
402 description="Hit_titles"
403 height="600px"/>
404 <expand macro="color_selection"
405 token_scaling_lin_select="false"
406 token_scaling_log_select="true" />
407 <expand macro="track_menu" />
408 <expand macro="track_visibility" />
409 </when>
410 <when value="vcf">
411 <expand macro="input_conditional" label="SNP Track Data" format="vcf,vcf_bgzip" />
412 <expand macro="track_styling_vcf"/>
413 <expand macro="track_visibility" />
414 </when>
415 <when value="gene_calls">
416 <expand macro="input_conditional" label="GFF/GFF3/BED Track Data" format="gff,gff3,bed" />
417 <conditional name="match_part" label="match/match_part data">
418 <param help="Match part data selection " label="This is match/match_part data" name="match_part_select" type="select">
419 <option selected="True" value="false">Not match/match part data</option>
420 <option value="true">Match/match part data</option>
421 </param>
422 <when value="true">
423 <param label="Match Part Feature Type"
424 name="name"
425 type="text"
426 value="match"
427 help="Match_parts have several options for the parent feature type, such as cDNA_match, match, translated_nucleotide_match, etc. Please select the appropriate one here. You can leave empty to try autodetection (only works with CanvasFeatures track type)."
428 optional="True"/>
429 </when>
430 <when value="false" />
431 </conditional>
432
433 <param label="Index this track" name="index" type="boolean" checked="false" truevalue="true" falsevalue="false" />
434
435 <expand macro="track_styling_feature"
436 classname="feature"
437 label="product,name,id"
438 description="note,description"
439 height="10px"/>
440 <expand macro="color_selection" />
441 <expand macro="track_menu" />
442 <expand macro="track_visibility" />
443 </when>
444 <when value="pileup">
445 <expand macro="input_conditional" label="BAM Track Data" format="bam" />
446 <expand macro="track_styling_xam"/>
447 <expand macro="track_visibility" />
448 </when>
449 <when value="cram">
450 <expand macro="input_conditional" label="CRAM Track Data" format="cram" />
451 <expand macro="track_styling_xam"/>
452 <expand macro="track_visibility" />
453 </when>
454 <when value="wiggle">
455 <expand macro="input_conditional" label="BigWig Track Data" format="bigwig" />
456
457 <param label="Use XYPlot"
458 help="instead of continuous colored band"
459 type="boolean"
460 name="xyplot"
461 truevalue="JBrowse/View/Track/Wiggle/XYPlot"
462 falsevalue="JBrowse/View/Track/Wiggle/Density" />
463 <param label="Show variance band"
464 help="Only for XYPlots"
465 type="boolean"
466 name="var_band"
467 truevalue="true"
468 falsevalue="false" />
469
470 <conditional name="scaling" label="Scaling">
471 <param type="select" label="Track Scaling" name="scale_select">
472 <option value="auto_local" selected="true">Autoscale (local)</option>
473 <option value="auto_global">Autoscale (global)</option>
474 <option value="fixed">Specify Min/Max</option>
475 </param>
476 <when value="auto_local"></when>
477 <when value="auto_global"></when>
478 <when value="fixed">
479 <param label="Track minimum" name="minimum"
480 type="integer" value="0" />
481 <param label="Track maximum" name="maximum"
482 type="integer" value="100" />
483 </when>
484 </conditional>
485 <param type="select" label="Visual Scaling" name="scale_select2">
486 <option value="linear" selected="true">Linear</option>
487 <option value="log">Logarithmic (Dynamically Calculated)</option>
488 </param>
489
490 <expand macro="color_selection_minmax" />
491
492 <expand macro="track_styling_bigwig"/>
493 <expand macro="track_visibility" />
494 </when>
495
496 <when value="synteny">
497 <param label="Other genome sequence"
498 format="fasta"
499 name="synteny_genome"
500 type="data" />
501 <!-- TODO add .out (MashMap) .chain (UCSC), .delta (mummer) and .anchors (mcscan) inputs -->
502 <expand macro="input_conditional" label="Synteny data" format="paf" />
503 <expand macro="track_visibility" />
504 </when>
505
506 <when value="hic">
507 <!-- TODO no hic datatype by default, but input for hicConvertFormat? hic_matrix datatype on .eu -->
508 <expand macro="input_conditional" label="HiC data" format="hic" />
509 <expand macro="track_visibility" />
510 </when>
511
512 <when value="sparql">
513 <param type="text" label="SPARQL Server URL" name="url" />
514 <param type="text" label="Track Label" name="label" value="SPARQL Genes" />
515 <param type="text" label="SPARQL Query" name="query" area="true">
516 <sanitizer>
517 <mapping initial="galaxy.util.mapped_chars">
518 <add source="&#10;" target=" " />
519 <add source="&gt;" target="__gt__" />
520 <add source="&lt;" target="__lt__" />
521 </mapping>
522 <valid initial="default">
523 <add value="|" />
524 <add value="#" />
525 <add value="{"/>
526 <add value="}"/>
527 <add value="!"/>
528 <add value="?"/>
529 <add value="&amp;"/>
530 <add value="+"/>
531 <add value="="/>
532 <add value="'"/>
533 <add value='"'/>
534 </valid>
535 </sanitizer>
536 </param>
537 <param type="text" label="SPARQL reference names query" help="This query should return a line for each reference name in a `refName` column" name="query_refnames" area="true">
538 <sanitizer>
539 <mapping initial="galaxy.util.mapped_chars">
540 <add source="&#10;" target=" " />
541 <add source="&gt;" target="__gt__" />
542 <add source="&lt;" target="__lt__" />
543 </mapping>
544 <valid initial="default">
545 <add value="|" />
546 <add value="#" />
547 <add value="{"/>
548 <add value="}"/>
549 <add value="!"/>
550 <add value="?"/>
551 <add value="&amp;"/>
552 <add value="+"/>
553 <add value="="/>
554 <add value="'"/>
555 <add value='"'/>
556 </valid>
557 </sanitizer>
558 </param>
559 <expand macro="track_visibility" />
560 </when>
561 </conditional>
562 </repeat>
563 </repeat>
564
565 <expand macro="general_options" />
566
567 <param type="hidden" name="uglyTestingHack" value="" />
568 </inputs>
569 <outputs>
570 <data format="html" name="output" label="JBrowse2 on $reference_genome.genome.element_identifier"/>
571 </outputs>
572 <tests>
573 <test>
574 <param name="reference_genome|genome_type_select" value="history"/>
575 <param name="reference_genome|genome" value="merlin.fa"/>
576 <repeat name="track_groups">
577 <param name="category" value="Default" />
578 <repeat name="data_tracks">
579 <conditional name="data_format">
580 <param name="data_format_select" value="wiggle"/>
581 <param name="annotation" value="bw/merlin.bw"/>
582 </conditional>
583 </repeat>
584 </repeat>
585 <param name="uglyTestingHack" value="enabled" />
586 <output name="output">
587 <assert_contents>
588 <has_text text="genome path="></has_text>
589 <has_text text="dataset id="></has_text>
590 <has_text text="history id="></has_text>
591 <has_text text="metadata"></has_text>
592 <has_text text="tool_id"></has_text>
593 <has_text text="trackFile path="></has_text>
594 <has_text text="file_ext=&quot;bigwig&quot;"></has_text>
595 <has_text text="format=&quot;wiggle&quot;"></has_text>
596 <has_text text="LinearWiggleDisplay"></has_text>
597 </assert_contents>
598 </output>
599 </test>
600 <test>
601 <param name="reference_genome|genome_type_select" value="history"/>
602 <param name="reference_genome|genome" value="merlin.fa"/>
603 <repeat name="track_groups">
604 <param name="category" value="Default" />
605 <repeat name="data_tracks">
606 <conditional name="data_format">
607 <param name="data_format_select" value="vcf"/>
608 <param name="annotation" value="vcf/merlin.vcf"/>
609 </conditional>
610 </repeat>
611 </repeat>
612 <param name="uglyTestingHack" value="enabled" />
613 <output name="output">
614 <assert_contents>
615 <has_text text="genome path="></has_text>
616 <has_text text="dataset id="></has_text>
617 <has_text text="history id="></has_text>
618 <has_text text="metadata"></has_text>
619 <has_text text="tool_id"></has_text>
620 <has_text text="trackFile path="></has_text>
621 <has_text text="ext=&quot;vcf&quot; label=&quot;merlin.vcf&quot;"></has_text>
622 </assert_contents>
623 </output>
624 </test>
625 <test>
626 <param name="reference_genome|genome_type_select" value="history"/>
627 <param name="reference_genome|genome" value="merlin.fa"/>
628 <param name="uglyTestingHack" value="enabled" />
629 <output name="output">
630 <assert_contents>
631 <has_text text="genome path="></has_text>
632 <has_text text="dataset id="></has_text>
633 <has_text text="history id="></has_text>
634 <has_text text="metadata"></has_text>
635 <has_text text="tool_id"></has_text>
636 </assert_contents>
637 </output>
638 </test>
639 <test>
640 <param name="reference_genome|genome_type_select" value="history"/>
641 <param name="reference_genome|genome" value="merlin.fa"/>
642 <repeat name="track_groups">
643 <param name="category" value="Default" />
644 <repeat name="data_tracks">
645 <conditional name="data_format">
646 <param name="data_format_select" value="gene_calls"/>
647 <param name="annotation" value="bed/test-3.bed,bed/test-6.bed"/>
648 </conditional>
649 </repeat>
650 </repeat>
651 <param name="uglyTestingHack" value="enabled" />
652 <output name="output">
653 <assert_contents>
654 <has_text text="genome path="></has_text>
655 <has_text text="dataset id="></has_text>
656 <has_text text="history id="></has_text>
657 <has_text text="metadata"></has_text>
658 <has_text text="tool_id"></has_text>
659 <has_text text="trackFile path="></has_text>
660 <has_text text="ext=&quot;bed&quot; label=&quot;test-3.bed&quot;"></has_text>
661 </assert_contents>
662 </output>
663 </test>
664 <test>
665 <param name="reference_genome|genome_type_select" value="history"/>
666 <param name="reference_genome|genome" value="merlin.fa"/>
667 <repeat name="track_groups">
668 <param name="category" value="Auto Coloured" />
669 <repeat name="data_tracks">
670 <conditional name="data_format">
671 <param name="data_format_select" value="gene_calls"/>
672 <param name="annotation" value="gff3/A.gff,gff3/B.gff,gff3/C.gff,gff3/D.gff"/>
673 <conditional name="match_part">
674 <param name="match_part_select" value="false"/>
675 </conditional>
676 <section name="jbcolor_scale">
677 <conditional name="color_score">
678 <param name="color_score_select" value="none"/>
679 </conditional>
680 <conditional name="color">
681 <param name="color_select" value="automatic"/>
682 </conditional>
683 </section>
684 </conditional>
685 </repeat>
686 </repeat>
687
688 <repeat name="track_groups">
689 <param name="category" value="Ignore Scale" />
690 <repeat name="data_tracks">
691 <conditional name="data_format">
692 <param name="data_format_select" value="gene_calls"/>
693 <param name="annotation" value="gff3/1.gff"/>
694 <conditional name="match_part">
695 <param name="match_part_select" value="false"/>
696 </conditional>
697 <section name="jbcolor_scale">
698 <conditional name="color_score">
699 <param name="color_score_select" value="none"/>
700 <conditional name="color">
701 <param name="color_select" value="manual"/>
702 <param name="style_color" value="#ff00ff"/>
703 </conditional>
704 </conditional>
705 </section>
706 </conditional>
707 </repeat>
708 </repeat>
709
710 <repeat name="track_groups">
711 <param name="category" value="Scaled Colour" />
712 <repeat name="data_tracks">
713 <conditional name="data_format">
714 <param name="data_format_select" value="gene_calls"/>
715 <param name="annotation" value="gff3/1.gff"/>
716 <conditional name="match_part">
717 <param name="match_part_select" value="false"/>
718 </conditional>
719 <section name="jbcolor_scale">
720 <conditional name="color_score">
721 <param name="color_score_select" value="score"/>
722 <param name="score_scaling" value="linear"/>
723 <conditional name="score_scales">
724 <param name="scale_select" value="automatic"/>
725 </conditional>
726 <conditional name="color_scheme">
727 <param name="score_scheme" value="opacity"/>
728 <conditional name="color">
729 <param name="color_select" value="automatic"/>
730 </conditional>
731 </conditional>
732 </conditional>
733 </section>
734 </conditional>
735 </repeat>
736 <repeat name="data_tracks">
737 <conditional name="data_format">
738 <param name="data_format_select" value="gene_calls"/>
739 <param name="annotation" value="gff3/1.gff"/>
740 <conditional name="match_part">
741 <param name="match_part_select" value="false"/>
742 </conditional>
743 <section name="jbcolor_scale">
744 <conditional name="color_score">
745 <param name="color_score_select" value="score"/>
746 <param name="score_scaling" value="linear"/>
747 <conditional name="score_scales">
748 <param name="scale_select" value="automatic"/>
749 </conditional>
750 <conditional name="color_scheme">
751 <param name="score_scheme" value="opacity"/>
752 <conditional name="color">
753 <param name="color_select" value="manual"/>
754 <param name="style_color" value="#0000ff"/>
755 </conditional>
756 </conditional>
757 </conditional>
758 </section>
759 </conditional>
760 </repeat>
761 <repeat name="data_tracks">
762 <conditional name="data_format">
763 <param name="data_format_select" value="gene_calls"/>
764 <param name="annotation" value="gff3/1.gff"/>
765 <conditional name="match_part">
766 <param name="match_part_select" value="false"/>
767 </conditional>
768 <section name="jbcolor_scale">
769 <conditional name="color_score">
770 <param name="color_score_select" value="score"/>
771 <param name="score_scaling" value="linear"/>
772 <conditional name="score_scales">
773 <param name="scale_select" value="manual"/>
774 <param name="minimum" value="0"/>
775 <param name="maximum" value="1000"/>
776 </conditional>
777 <conditional name="color_scheme">
778 <param name="score_scheme" value="opacity"/>
779 <conditional name="color">
780 <param name="color_select" value="automatic"/>
781 </conditional>
782 </conditional>
783 </conditional>
784 </section>
785 </conditional>
786 </repeat>
787 <repeat name="data_tracks">
788 <conditional name="data_format">
789 <param name="data_format_select" value="gene_calls"/>
790 <param name="annotation" value="gff3/1.gff"/>
791 <conditional name="match_part">
792 <param name="match_part_select" value="false"/>
793 </conditional>
794 <section name="jbcolor_scale">
795 <conditional name="color_score">
796 <param name="color_score_select" value="score"/>
797 <param name="score_scaling" value="linear"/>
798 <conditional name="score_scales">
799 <param name="scale_select" value="manual"/>
800 <param name="minimum" value="0"/>
801 <param name="maximum" value="1000"/>
802 </conditional>
803 <conditional name="color_scheme">
804 <param name="score_scheme" value="opacity"/>
805 <conditional name="color">
806 <param name="color_select" value="manual"/>
807 <param name="style_color" value="#ff0000"/>
808 </conditional>
809 </conditional>
810 </conditional>
811 </section>
812 </conditional>
813 </repeat>
814 </repeat>
815
816 <repeat name="track_groups">
817 <param name="category" value="Realistic" />
818 <repeat name="data_tracks">
819 <conditional name="data_format">
820 <param name="data_format_select" value="gene_calls"/>
821 <param name="annotation" value="gff3/interpro.gff"/>
822 <conditional name="match_part">
823 <param name="match_part_select" value="false"/>
824 </conditional>
825 <section name="jbcolor_scale">
826 <conditional name="color_score">
827 <param name="color_score_select" value="none"/>
828 </conditional>
829 <conditional name="color">
830 <param name="color_select" value="automatic"/>
831 </conditional>
832 </section>
833 </conditional>
834 </repeat>
835 <repeat name="data_tracks">
836 <conditional name="data_format">
837 <param name="data_format_select" value="gene_calls"/>
838 <param name="annotation" value="gff3/2.gff"/>
839 <conditional name="match_part">
840 <param name="match_part_select" value="true"/>
841 <param name="name" value="cDNA_match"/>
842 </conditional>
843 <section name="jbcolor_scale">
844 <conditional name="color_score">
845 <param name="color_score_select" value="none"/>
846 </conditional>
847 <conditional name="color">
848 <param name="color_select" value="automatic"/>
849 </conditional>
850 </section>
851 </conditional>
852 </repeat>
853 </repeat>
854
855 <param name="uglyTestingHack" value="enabled" />
856 <output name="output">
857 <assert_contents>
858 <has_text text="Auto Coloured"/>
859 <has_text text="A.gff"/>
860 <has_text text="B.gff"/>
861 <has_text text="C.gff"/>
862 <has_text text="D.gff"/>
863 <has_text text="Scaled Colour"/>
864 <has_text text="1.gff"/>
865 <has_text text="2.gff"/>
866 </assert_contents>
867 </output>
868 </test>
869 <test>
870 <param name="reference_genome|genome_type_select" value="history"/>
871 <param name="reference_genome|genome" value="merlin.fa"/>
872
873 <repeat name="track_groups">
874 <param name="category" value="With menu or index" />
875 <repeat name="data_tracks">
876 <conditional name="data_format">
877 <param name="data_format_select" value="gene_calls"/>
878 <param name="annotation" value="gff3/1.gff"/>
879 <conditional name="match_part">
880 <param name="match_part_select" value="false"/>
881 </conditional>
882 <section name="jbcolor_scale">
883 <conditional name="color_score">
884 <param name="color_score_select" value="none"/>
885 </conditional>
886 <conditional name="color">
887 <param name="color_select" value="automatic"/>
888 </conditional>
889 </section>
890 <section name="jbmenu">
891 <repeat name="track_menu">
892 <param name="menu_action" value="iframeDialog"/>
893 <param name="menu_label" value="Some menu item"/>
894 <param name="menu_title" value="Frame title"/>
895 <param name="menu_url" value="https://example.com/#!/?id={name}&amp;q={type}&amp;z=&quot;{end}&quot;"/>
896 <param name="menu_icon" value="dijitIconNewTask"/>
897 </repeat>
898 <repeat name="track_menu">
899 <param name="menu_action" value="newWindow"/>
900 <param name="menu_label" value="Another menu item"/>
901 <param name="menu_title" value="Frame title 2"/>
902 <param name="menu_url" value="https://example.com/#!/?id={name}&amp;q={type}&amp;z=&quot;{end}&quot;"/>
903 </repeat>
904 </section>
905 </conditional>
906 </repeat>
907 <repeat name="data_tracks">
908 <conditional name="data_format">
909 <param name="data_format_select" value="gene_calls"/>
910 <param name="annotation" value="gff3/1.gff"/>
911 <param name="index" value="true"/>
912 <conditional name="match_part">
913 <param name="match_part_select" value="false"/>
914 </conditional>
915 <section name="jbcolor_scale">
916 <conditional name="color_score">
917 <param name="color_score_select" value="none"/>
918 </conditional>
919 <conditional name="color">
920 <param name="color_select" value="automatic"/>
921 </conditional>
922 </section>
923 </conditional>
924 </repeat>
925 </repeat>
926
927 <param name="uglyTestingHack" value="enabled" />
928 <output name="output">
929 <assert_contents>
930 <has_text text="With menu or index"/>
931 <has_text text="Some menu item"/>
932 <has_text text="Frame title"/>
933 <has_text text="dijitIconNewTask"/>
934 </assert_contents>
935 </output>
936 </test>
937
938 <!-- TODO add a synteny test -->
939 <!-- TODO add a bam and a cram test -->
940 <!-- TODO add an hic test -->
941 <!-- TODO add a vcf_bgzip test -->
942 </tests>
943 <help><![CDATA[
944
945 JBrowse2-in-Galaxy
946 ==================
947
948 JBrowse2-in-Galaxy offers a highly configurable, workflow-compatible
949 alternative to JBrowse1-in-Galaxy and Trackster.
950
951 Compared to JBrowse1-in-Galaxy, there is no support for alternative codons for unusual genomes,
952 and detailed track styling is not yet implemented. Send code.
953 JBrowse1 development has now ceased in favour of JBrowse2.
954
955 Use and local viewing
956 =====================
957
958 A JBrowse2 history item can be opened by viewing it (the "eye" icon).
959 They can also be downloaded as archives ("floppy disk" icon) to share and for local viewing.
960 One extra step is required before they can be viewed. A local python web server must be started using a script included in each archive.
961 Unzip the archive (*unzip [filename].zip*) and change to the first level directory. It contains a file named "servejb2.py"
962
963 Assuming you have python3 installed, running:
964
965 *python3 servjb2.py*
966
967 will serve the unarchived JBrowse2 configuration, so it can be browsed by pointing a web browser to localhost:8080
968
969 Overview
970 --------
971
972 JBrowse is a fast, embeddable genome browser built completely with
973 JavaScript and HTML5.
974
975 The JBrowse-in-Galaxy (JiG) tool was written to help build complex
976 JBrowse installations straight from Galaxy, taking advantage of the
977 latest Galaxy features such as dataset collections, sections, and colour
978 pickers. It allows you to build up a JBrowse instance without worrying
979 about how to run the command line tools to format your data, and which
980 options need to be supplied and where. Additionally it comes with many
981 javascript functions to handle colouring of features which would be
982 nearly impossible to write without the assistance of this tool.
983
984 The JBrowse-in-Galaxy tool is maintained by `the Galaxy IUC
985 <https://github.com/galaxyproject/tools-iuc/issues>`__, who you can help you
986 with missing features or bugs in the tool.
987
988 Options
989 -------
990
991 The first option you encounter is the **Fasta Sequence(s)**. This option
992 now accepts multiple fasta files, allowing you to build JBrowse
993 instances that contain data for multiple genomes or chrosomomes
994 (generally known as "landmark features" in gff3 terminology.)
995
996 **Track Groups** represent a set of tracks in a single category. These
997 can be used to let your users understand relationships between large
998 groups of tracks.
999
1000 .. image:: sections.png
1001
1002 Annotation Tracks
1003 -----------------
1004
1005 There are a few different types of tracks supported, each with their own
1006 set of options:
1007
1008 GFF3/BED
1009 ~~~~~~~~
1010
1011 These are standard feature tracks. They usually highlight genes,
1012 mRNAs and other features of interest along a genomic region.
1013
1014 BAM Pileups
1015 ~~~~~~~~~~~
1016
1017 We support BAM files and can automatically generate SNP tracks based on
1018 that bam data.
1019
1020
1021 BlastXML
1022 ~~~~~~~~
1023
1024 .. image:: blast.png
1025
1026 JiG now supports both blastn and blastp datasets. JiG internally uses a
1027 blastXML to gapped GFF3 tool to convert your blastxml datasets into a
1028 format amenable to visualization in JBrowse. This tool is also
1029 available separately from the IUC on the toolshed.
1030
1031 **Minimum Gap Size** reflects how long a gap must be before it becomes a
1032 real gap in the processed gff3 file. In the picture above, various sizes
1033 of gaps can be seen. If the minimum gap size was set much higher, say
1034 100nt, many of the smaller gaps would disappear, and the features on
1035 both sides would be merged into one, longer feature. This setting is
1036 inversely proportional to runtime and output file size. *Do not set this
1037 to a low value for large datasets*. By setting this number lower, you
1038 will have extremely large outputs and extremely long runtimes. The
1039 default was configured based off of the author's experience, but the
1040 author only works on small viruses. It is *strongly* recommended that
1041 you filter your blast results before display, e.g. picking out the top
1042 10 hits or so.
1043
1044 **Protein blast search** option merely informs underlying tools that
1045 they should adjust feature locations by 3x.
1046
1047 Bigwig XY
1048 ~~~~~~~~~
1049
1050 .. image:: bigwig.png
1051
1052
1053
1054 VCFs/SNPs
1055 ~~~~~~~~~
1056
1057 These tracks do not support any special configuration.
1058
1059 @ATTRIBUTION@
1060 ]]></help>
1061 <expand macro="citations"/>
1062 </tool>