comparison jbrowse2.xml @ 0:61add3f58f26 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 4fa86613193c985e0cb9a8fc795c56b8bc7b8532
author iuc
date Thu, 02 Oct 2025 10:19:44 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:61add3f58f26
1 <tool id="jbrowse2" name="JBrowse2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="25.0">
2 <description>genome browser</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <edam_topics>
7 <edam_topic>topic_3307</edam_topic>
8 <edam_topic>topic_0092</edam_topic>
9 </edam_topics>
10 <edam_operations>
11 <edam_operation>operation_0573</edam_operation>
12 <edam_operation>operation_0564</edam_operation>
13 </edam_operations>
14 <xrefs>
15 <xref type="bio.tools">jbrowse_2</xref>
16 </xrefs>
17 <expand macro="requirements"/>
18 <command><![CDATA[
19 mkdir -p '$output.files_path/data';
20
21 #if $action.action_select == "update":
22 cp -R '$action.update_jbrowse.extra_files_path/data' '$output.files_path/';
23 #end if
24
25 ## Copy the XML file into the directory, mostly for debugging
26 ## but nice if users want to reproduce locally
27 cp '$trackxml' '$output.files_path/galaxy.xml';
28
29 export JBROWSE2_SOURCE_DIR=\$(dirname \$(which jbrowse))/../opt/jbrowse2;
30
31 ## Once that's done, we run the python script to handle the real work
32 python '$__tool_directory__/jbrowse2.py'
33 --jbrowse \${JBROWSE2_SOURCE_DIR}
34
35 #if $action.action_select == "update":
36 --update
37 #end if
38
39 --outdir '$output.files_path'
40 '$trackxml';
41
42 cp '$output.files_path/index.html' '$output';
43 ]]></command>
44 <configfiles>
45 <configfile name="trackxml"><![CDATA[<?xml version="1.0"?>
46 #import json
47 <root>
48 <metadata>
49 <general>
50 <analytics>${jbgen.enableAnalytics}</analytics>
51 <primary_color>${jbgen.primary_color}</primary_color>
52 <secondary_color>${jbgen.secondary_color}</secondary_color>
53 <tertiary_color>${jbgen.tertiary_color}</tertiary_color>
54 <quaternary_color>${jbgen.quaternary_color}</quaternary_color>
55 <font_size>${jbgen.font_size}</font_size>
56 </general>
57 <galaxyUrl>${__app__.config.galaxy_infrastructure_url}</galaxyUrl>
58 </metadata>
59 #for $assembly in $assemblies:
60 <assembly>
61 #if str($assembly.reference_genome.genome_type_select) == "indexed":
62 <genome path="${assembly.reference_genome.genomes.fields.path}" label="${assembly.reference_genome.genomes.fields.name}">
63 <metadata />
64 </genome>
65 #else if str($assembly.reference_genome.genome_type_select) == "remote":
66 <genome path="${assembly.reference_genome.uri}" label="${assembly.reference_genome.label}" remote="true">
67 <metadata />
68 </genome>
69 #else
70 <genome path="$assembly.reference_genome.genome" label="${assembly.reference_genome.genome.element_identifier}">
71 <metadata>
72 <dataset id="${__app__.security.encode_id($assembly.reference_genome.genome.id)}" hid="${assembly.reference_genome.genome.hid}"
73 size="${assembly.reference_genome.genome.get_size(nice_size=True)}"
74 edam_format="${assembly.reference_genome.genome.datatype.edam_format}"
75 file_ext="${assembly.reference_genome.genome.ext}"
76 dname = "${assembly.reference_genome.genome.element_identifier}" />
77 <history id="${__app__.security.encode_id($assembly.reference_genome.genome.history_id)}"
78 #if $assembly.reference_genome.genome.history.user:
79 user_email="${assembly.reference_genome.genome.history.user.email}"
80 user_id="${assembly.reference_genome.genome.history.user_id}"
81 display_name="${assembly.reference_genome.genome.history.get_display_name()}"/>
82 #else
83 user_email="anonymous"
84 user_id="-1"
85 display_name="Unnamed History"/>
86 #end if
87 <metadata
88 #for (key, value) in $assembly.reference_genome.genome.get_metadata().items():
89 #if "_types" not in $key:
90 #if isinstance($value, list):
91 #set value_str = "[%s]" % ','.join([str(val) for val in value])
92 ${key}="$value_str"
93 #else
94 ${key}="${value}"
95 #end if
96 #end if
97 #end for
98 />
99 <tool
100 tool_id="${assembly.reference_genome.genome.creating_job.tool_id}"
101 tool_version="${assembly.reference_genome.genome.creating_job.tool_version}"
102 />
103 </metadata>
104 #if $assembly.ref_name_aliases:
105 <ref_name_aliases path="${assembly.ref_name_aliases}" />
106 #end if
107 #if $assembly.cytobands:
108 <cytobands path="${assembly.cytobands}" />
109 #end if
110 </genome>
111 #end if
112 <defaultLocation>${assembly.defaultLocation}</defaultLocation>
113 <tracks>
114 #for $tg in $assembly.track_groups:
115 #for $track in $tg.data_tracks:
116 <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
117 #if $track.data_format.data_format_select not in ("sparql", "gc"):
118
119 #if $track.data_format.annotation_cond.annotation_source == "history":
120
121 #if not isinstance($track.data_format.annotation_cond.annotation, list):
122 ## Synteny tracks allow only one file
123 #set $annotations = [$track.data_format.annotation_cond.annotation]
124 #else
125 #set $annotations = $track.data_format.annotation_cond.annotation
126 #end if
127 <files>
128 #for $dataset in $annotations:
129 <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.element_identifier}">
130 <metadata>
131 #if $track.data_format.metadata.galaxy_metadata:
132 <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
133 size="${dataset.get_size(nice_size=True)}"
134 edam_format="${dataset.datatype.edam_format}"
135 file_ext="${dataset.ext}" />
136 <history id="${__app__.security.encode_id($dataset.history_id)}"
137 #if $dataset.history.user:
138 user_email="${dataset.history.user.email}"
139 user_id="${dataset.history.user_id}"
140 display_name="${dataset.history.get_display_name()}"/>
141 #else
142 user_email="anonymous"
143 user_id="-1"
144 display_name="Unnamed History"/>
145 #end if
146 <metadata
147 #for (key, value) in $dataset.get_metadata().items():
148 #if "_types" not in $key and $value is not None and len(str($value)) < 5000:
149 #if isinstance($value, list) or isinstance($value, dict):
150 #set value_str = json.dumps(value).replace('"', "&quot;")
151 ${key}="${value_str}"
152 #else
153 ${key}="${value}"
154 #end if
155 #end if
156 #end for
157 />
158 <tool
159 tool_id="${dataset.creating_job.tool_id}"
160 tool_version="${dataset.creating_job.tool_version}"
161 />
162 #end if
163 #if $track.data_format.metadata.metadata_bonus:
164 <bonus src="${track.data_format.metadata.metadata_bonus}" />
165 #end if
166 </metadata>
167 </trackFile>
168 #end for
169 </files>
170 #else
171
172 #set $annotations = $track.data_format.annotation_cond.uri
173 <files>
174 <trackFile path="${track.data_format.annotation_cond.uri}" ext="${track.data_format.annotation_cond.format}" label="${track.data_format.annotation_cond.label}" remote="true">
175 <metadata>
176 #if $track.data_format.metadata.metadata_bonus:
177 <bonus src="${track.data_format.metadata.metadata_bonus}" />
178 #end if
179 </metadata>
180 </trackFile>
181 </files>
182 #end if
183 #end if
184
185 <options>
186 <style>
187 #if str($track.data_format.data_format_select) in ("gene_calls", "pileup", "cram", "wiggle", "vcf", "synteny"):
188 <display>${track.data_format.jbstyle.track_style.display}</display>
189 #else if str($track.data_format.data_format_select) in ("hic", "gc", "maf"):
190 <display>${track.data_format.track_display}</display>
191 #end if
192
193 #if str($track.data_format.data_format_select) in ("gene_calls"):
194 #if str($track.data_format.jbstyle.track_style.display) == "LinearBasicDisplay":
195 <show_labels type="boolean">${track.data_format.jbstyle.track_style.show_labels}</show_labels>
196 <show_descriptions type="boolean">${track.data_format.jbstyle.track_style.show_descriptions}</show_descriptions>
197 <labels_name>${track.data_format.jbstyle.track_style.labels_name}</labels_name>
198 <descriptions_name>${track.data_format.jbstyle.track_style.descriptions_name}</descriptions_name>
199 <display_mode>${track.data_format.jbstyle.track_style.display_mode}</display_mode>
200 <max_height type="integer">${track.data_format.jbstyle.track_style.max_height}</max_height>
201 #else if str($track.data_format.jbstyle.track_style.display) == "LinearArcDisplay":
202 <labels_name>${track.data_format.jbstyle.track_style.labels_name}</labels_name>
203 <display_mode>${track.data_format.jbstyle.track_style.display_mode}</display_mode>
204 #end if
205 #end if
206
207 #if str($track.data_format.data_format_select) in ("pileup", "cram"):
208 #if str($track.data_format.jbstyle.track_style.display) == "LinearSNPCoverageDisplay":
209 <scale_type>${track.data_format.jbstyle.track_style.scale_type}</scale_type>
210 #if str($track.data_format.jbstyle.track_style.min_score) != "":
211 <min_score type="integer">${track.data_format.jbstyle.track_style.min_score}</min_score>
212 #end if
213 #if str($track.data_format.jbstyle.track_style.max_score) != "":
214 <max_score type="integer">${track.data_format.jbstyle.track_style.max_score}</max_score>
215 #end if
216 #end if
217 #end if
218
219 #if str($track.data_format.data_format_select) in ("wiggle"):
220 <renderer>${track.data_format.jbstyle.track_style.wig_renderer}</renderer>
221 #end if
222 </style>
223
224 #if str($track.data_format.data_format_select) in ("gene_calls"):
225 <formatdetails>
226 #if str($track.data_format.formatdetails.formatdetails_feature) != "":
227 <feature>${track.data_format.formatdetails.formatdetails_feature}</feature>
228 #end if
229 #if str($track.data_format.formatdetails.formatdetails_subfeature) != "":
230 <subfeature>${track.data_format.formatdetails.formatdetails_subfeature}</subfeature>
231 #end if
232 #if str($track.data_format.formatdetails.formatdetails_depth) != "":
233 <depth>${track.data_format.formatdetails.formatdetails_depth}</depth>
234 #end if
235 </formatdetails>
236 #end if
237
238 #if str($track.data_format.data_format_select) in ("wiggle"):
239 #if str($track.data_format.jbstyle.track_style.display) == "MultiLinearWiggleDisplay":
240 <multitrack type="boolean">True</multitrack>
241 #end if
242 #end if
243
244 #if str($track.data_format.data_format_select) == "pileup":
245 <pileup>
246 #if $track.data_format.annotation_cond.annotation_source == "history":
247 <bam_indices>
248 #for $dataset in $track.data_format.annotation_cond.annotation:
249 <bam_index>${dataset.metadata.bam_index}</bam_index>
250 #end for
251 </bam_indices>
252 #end if
253 </pileup>
254 #else if str($track.data_format.data_format_select) == "cram":
255 <cram>
256 #if $track.data_format.annotation_cond.annotation_source == "history":
257 <cram_indices>
258 #for $dataset in $track.data_format.annotation_cond.annotation:
259 <cram_index>${dataset.metadata.cram_index}</cram_index>
260 #end for
261 </cram_indices>
262 #end if
263 </cram>
264 #else if str($track.data_format.data_format_select) == "gene_calls":
265 <gff>
266 <index>${track.data_format.index}</index>
267 </gff>
268 #else if str($track.data_format.data_format_select) == "synteny":
269 <synteny>
270 </synteny>
271 #else if str($track.data_format.data_format_select) == "hic":
272 <hic>
273 </hic>
274 #else if str($track.data_format.data_format_select) == "maf":
275 <maf>
276 <assembly_name>${track.data_format.assembly_name}</assembly_name>
277 </maf>
278 #else if str($track.data_format.data_format_select) == "sparql":
279 <label>${track.data_format.label}</label>
280 <sparql>
281 <url>${track.data_format.url}</url>
282 <query>${track.data_format.query}</query>
283 <query_refnames>${track.data_format.query_refnames}</query_refnames>
284 </sparql>
285 #else if str($track.data_format.data_format_select) == "wiggle":
286 <wiggle>
287 </wiggle>
288 #else if str($track.data_format.data_format_select) == "gc":
289 <label>GC Content</label>
290 #end if
291 </options>
292 </track>
293 #end for
294 #end for
295 </tracks>
296 </assembly>
297 #end for
298 </root>
299 ]]></configfile>
300 </configfiles>
301 <inputs>
302 <conditional name="action">
303 <param type="select" label="Action" name="action_select">
304 <option value="create">New JBrowse Instance</option>
305 <option value="update">Update exising JBrowse Instance</option>
306 </param>
307 <when value="create" />
308 <when value="update">
309 <param name="update_jbrowse" type="data" format="html" label="Previous JBrowse Instance" />
310 </when>
311 </conditional>
312
313 <repeat name="assemblies" min="1" title="Genome Assemblies">
314 <conditional name="reference_genome">
315 <param label="Reference genome to display" name="genome_type_select" type="select">
316 <option selected="True" value="indexed">Use a built-in genome</option>
317 <option value="history">Use a genome from history</option>
318 <option value="remote">Use a genome from a remote source (not recommended)</option>
319 </param>
320 <when value="indexed">
321 <param
322 help="If your genome of interest is not listed, contact the Galaxy team"
323 label="Select a reference genome"
324 name="genomes"
325 type="select"
326 >
327 <options from_data_table="all_fasta">
328 <filter column="2" type="sort_by" />
329 <validator message="No genomes are available for the selected input dataset" type="no_options" />
330 </options>
331 </param>
332 </when>
333 <when value="history">
334 <param
335 format="fasta"
336 label="Select the reference genome"
337 name="genome"
338 type="data" />
339 </when>
340 <when value="remote">
341 <param name="label" type="text" label="Display name of the genome"/>
342 <param name="uri" type="text" label="URI pointing to a bgzip compressed fasta (.fai and .gzi files expected to be present)"
343 help="⚠️ WARNING: If this URI is not available for any reason, your JBrowse dataset will be unusable." />
344 </when>
345 </conditional>
346
347 <!-- TODO genetic code not yet supported in jbrowse2
348 https://github.com/GMOD/jbrowse-components/issues/1765
349 -->
350
351 <param label="Default region to display" type="text" name="defaultLocation" value="" help="e.g. 'ctgA:1234..5678'"/>
352
353 <param name="ref_name_aliases" type="data" format="tsv,tabular" label="Reference sequence name aliases" help="Use when chromosomes have alternate names (TSV file: first column is the names from your genome sequence, the rest of the columns are aliases." optional="true" />
354
355 <param name="cytobands" type="data" format="bed" label="cytobands data" help="BED file containing cytobands locations" optional="true" />
356
357 <repeat name="track_groups" title="Track Group">
358 <param label="Track Category"
359 name="category"
360 type="text"
361 value="Default"
362 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"/>
363 <repeat name="data_tracks" title="Annotation Track">
364 <conditional name="data_format" label="Track Options">
365 <param type="select" label="Track Type" name="data_format_select">
366 <option value="gene_calls">GFF/GFF3/BED Features</option>
367 <option value="pileup">BAM Pileups</option>
368 <option value="cram">CRAM</option>
369 <option value="wiggle">BigWig</option>
370 <option value="vcf">VCF SNPs</option>
371 <option value="hic">HiC</option>
372 <option value="maf">MAF</option>
373 <option value="synteny">Synteny</option>
374 <option value="sparql">SPARQL</option>
375 <option value="gc">GC content</option>
376 </param>
377 <when value="gene_calls">
378 <expand macro="input_conditional" label="GFF/GFF3/BED Track Data" format="gff,gff3,bed" />
379
380 <param label="Index this track" name="index" type="boolean" checked="false" truevalue="true" falsevalue="false" />
381
382 <expand macro="track_styling_feature"/>
383 <expand macro="details_panel" />
384 <expand macro="track_metadata" />
385 <expand macro="track_visibility" />
386 </when>
387 <when value="pileup">
388 <expand macro="input_conditional" label="BAM Track Data" format="bam" />
389 <expand macro="track_styling_xam"/>
390 <expand macro="track_metadata" />
391 <expand macro="track_visibility" />
392 </when>
393 <when value="cram">
394 <expand macro="input_conditional" label="CRAM Track Data" format="cram" />
395 <expand macro="track_styling_xam"/>
396 <expand macro="track_metadata" />
397 <expand macro="track_visibility" />
398 </when>
399 <when value="wiggle">
400 <expand macro="input_conditional" label="BigWig Track Data" format="bigwig" />
401 <expand macro="track_styling_bigwig"/>
402 <expand macro="track_metadata" />
403 <expand macro="track_visibility" />
404 </when>
405 <when value="vcf">
406 <expand macro="input_conditional" label="SNP Track Data" format="vcf,vcf_bgzip" />
407 <expand macro="track_styling_vcf"/>
408 <expand macro="details_panel" />
409 <expand macro="track_metadata" />
410 <expand macro="track_visibility" />
411 </when>
412 <when value="hic">
413 <expand macro="input_conditional" label="HiC data" format="hic" help="Cool files can be converted to hic format with hictk tool" />
414 <expand macro="track_styling_hic"/>
415 <expand macro="track_metadata" />
416 <expand macro="track_visibility" />
417 </when>
418 <when value="maf">
419 <expand macro="input_conditional_no_remote" label="MAF Track Data" format="maf" />
420 <param name="assembly_name" type="text" label="Assembly name" optional="True" help="As used when creating the MAF file (default: guessed from selected genome assembly)" />
421 <expand macro="track_styling_maf"/>
422 <expand macro="track_metadata" />
423 <expand macro="track_visibility" />
424 </when>
425 <when value="synteny">
426 <expand macro="input_conditional" label="PAF Alignment Data" format="paf" multiple="False" help="Query is current assembly, and target is the next assembly. You should not fill this field on the last assembly." />
427 <expand macro="track_styling_synteny"/>
428 <expand macro="track_metadata" />
429 <expand macro="track_visibility" />
430 </when>
431 <when value="sparql">
432 <!-- Not totally sure it works in real life, probably very rare use case -->
433 <param type="text" label="SPARQL Server URL" name="url" />
434 <param type="text" label="Track Label" name="label" value="SPARQL Genes" />
435 <param type="text" label="SPARQL Query" name="query" area="true">
436 <sanitizer>
437 <mapping initial="galaxy.util.mapped_chars">
438 <add source="&#10;" target=" " />
439 <add source="&gt;" target="__gt__" />
440 <add source="&lt;" target="__lt__" />
441 </mapping>
442 <valid initial="default">
443 <add value="|" />
444 <add value="#" />
445 <add value="{"/>
446 <add value="}"/>
447 <add value="!"/>
448 <add value="?"/>
449 <add value="&amp;"/>
450 <add value="+"/>
451 <add value="="/>
452 <add value="'"/>
453 <add value='"'/>
454 </valid>
455 </sanitizer>
456 </param>
457 <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">
458 <sanitizer>
459 <mapping initial="galaxy.util.mapped_chars">
460 <add source="&#10;" target=" " />
461 <add source="&gt;" target="__gt__" />
462 <add source="&lt;" target="__lt__" />
463 </mapping>
464 <valid initial="default">
465 <add value="|" />
466 <add value="#" />
467 <add value="{"/>
468 <add value="}"/>
469 <add value="!"/>
470 <add value="?"/>
471 <add value="&amp;"/>
472 <add value="+"/>
473 <add value="="/>
474 <add value="'"/>
475 <add value='"'/>
476 </valid>
477 </sanitizer>
478 </param>
479 <expand macro="track_visibility" />
480 </when>
481
482 <when value="gc">
483 <expand macro="track_styling_gc"/>
484 <expand macro="track_metadata" />
485 <expand macro="track_visibility" />
486 </when>
487 </conditional>
488 </repeat>
489 </repeat>
490 </repeat>
491 <expand macro="general_options" />
492 </inputs>
493 <outputs>
494 <data format="html" name="output" label="JBrowse2 on $on_string"/>
495 </outputs>
496 <tests>
497 <test>
498 <repeat name="assemblies">
499 <conditional name="reference_genome">
500 <param name="genome_type_select" value="history"/>
501 <param name="genome" value="merlin.fa"/>
502 </conditional>
503 <repeat name="track_groups">
504 <repeat name="data_tracks">
505 <conditional name="data_format">
506 <param name="data_format_select" value="gene_calls" />
507 <conditional name="annotation_cond">
508 <param name="annotation_source" value="history" />
509 <param name="annotation" value="gff3/merlin.gff" />
510 </conditional>
511 </conditional>
512 </repeat>
513 <repeat name="data_tracks">
514 <conditional name="data_format">
515 <param name="data_format_select" value="gene_calls"/>
516 <conditional name="annotation_cond">
517 <param name="annotation_source" value="history" />
518 <param name="annotation" value="bed/test-3.bed,bed/test-6.bed"/>
519 </conditional>
520 </conditional>
521 </repeat>
522 <repeat name="data_tracks">
523 <conditional name="data_format">
524 <param name="data_format_select" value="pileup" />
525 <conditional name="annotation_cond">
526 <param name="annotation_source" value="history" />
527 <param name="annotation" value="bam/merlin-sample.bam" />
528 </conditional>
529 </conditional>
530 </repeat>
531 <repeat name="data_tracks">
532 <conditional name="data_format">
533 <param name="data_format_select" value="wiggle"/>
534 <conditional name="annotation_cond">
535 <param name="annotation_source" value="history" />
536 <param name="annotation" value="bw/data.bw"/>
537 </conditional>
538 </conditional>
539 </repeat>
540 </repeat>
541 <repeat name="track_groups">
542 <param name="category" value="Second category" />
543 <repeat name="data_tracks">
544 <conditional name="data_format">
545 <param name="data_format_select" value="cram" />
546 <conditional name="annotation_cond">
547 <param name="annotation_source" value="history" />
548 <param name="annotation" value="cram/merlin-sample.cram" />
549 </conditional>
550 </conditional>
551 </repeat>
552 <repeat name="data_tracks">
553 <conditional name="data_format">
554 <param name="data_format_select" value="wiggle"/>
555 <conditional name="annotation_cond">
556 <param name="annotation_source" value="history" />
557 <param name="annotation" value="bw/data.bw,bw/smaller2.bw"/>
558 </conditional>
559 </conditional>
560 </repeat>
561 <repeat name="data_tracks">
562 <conditional name="data_format">
563 <param name="data_format_select" value="vcf" />
564 <conditional name="annotation_cond">
565 <param name="annotation_source" value="history" />
566 <param name="annotation" value="vcf/test.vcf" />
567 </conditional>
568 </conditional>
569 </repeat>
570 <repeat name="data_tracks">
571 <conditional name="data_format">
572 <param name="data_format_select" value="hic" />
573 <conditional name="annotation_cond">
574 <param name="annotation_source" value="history" />
575 <param name="annotation" value="hic/merlin.hic" />
576 </conditional>
577 </conditional>
578 </repeat>
579 <repeat name="data_tracks">
580 <conditional name="data_format">
581 <param name="data_format_select" value="maf" />
582 <conditional name="annotation_cond">
583 <param name="annotation_source" value="history" />
584 <param name="annotation" value="maf/merlinlastz.maf" />
585 </conditional>
586 </conditional>
587 </repeat>
588 <repeat name="data_tracks">
589 <conditional name="data_format">
590 <param name="data_format_select" value="gc" />
591 </conditional>
592 </repeat>
593 </repeat>
594 </repeat>
595 <output name="output">
596 <extra_files name="galaxy.xml" type="file" value="out/01_all_tracks/galaxy.xml" compare="sim_size" />
597 <extra_files name="config.json" type="file" value="out/01_all_tracks/config.json" compare="sim_size" />
598 </output>
599 </test>
600 <test> <!-- Remote data -->
601 <repeat name="assemblies">
602 <conditional name="reference_genome">
603 <param name="genome_type_select" value="remote"/>
604 <param name="uri" value="https://jbrowse.org/genomes/hg19/fasta/hg19.fa.gz"/>
605 <param name="label" value="hg19"/>
606 </conditional>
607 <repeat name="track_groups">
608 <repeat name="data_tracks">
609 <conditional name="data_format">
610 <param name="data_format_select" value="wiggle" />
611 <conditional name="annotation_cond">
612 <param name="annotation_source" value="remote" />
613 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.regions.bw" />
614 <param name="label" value="SKBR3 pacbio coverage (NGMLR)" />
615 </conditional>
616 </conditional>
617 </repeat>
618 <repeat name="data_tracks">
619 <conditional name="data_format">
620 <param name="data_format_select" value="wiggle" />
621 <conditional name="annotation_cond">
622 <param name="annotation_source" value="remote" />
623 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/hg19/reads_lr_skbr3.fa_ngmlr-0.2.3_mapped.bam.regions.bw" />
624 <param name="label" value="SKBR3 pacbio coverage (NGMLR)" />
625 </conditional>
626 <section name="jbstyle">
627 <conditional name="track_style">
628 <param name="display" value="MultiLinearWiggleDisplay" />
629 </conditional>
630 </section>
631 </conditional>
632 </repeat>
633 <repeat name="data_tracks">
634 <conditional name="data_format">
635 <param name="data_format_select" value="pileup" />
636 <conditional name="annotation_cond">
637 <param name="annotation_source" value="remote" />
638 <param name="uri" value="https://s3.amazonaws.com/1000genomes/phase3/data/NA12878/exome_alignment/NA12878.mapped.ILLUMINA.bwa.CEU.exome.20121211.bam" />
639 <param name="label" value="NA12878 Exome" />
640 </conditional>
641 </conditional>
642 </repeat>
643 <repeat name="data_tracks">
644 <conditional name="data_format">
645 <param name="data_format_select" value="cram" />
646 <conditional name="annotation_cond">
647 <param name="annotation_source" value="remote" />
648 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/hg19/alzheimers_isoseq/hq_isoforms.fasta.cram" />
649 <param name="label" value="hg_isoforms.fasta_cram" />
650 </conditional>
651 </conditional>
652 </repeat>
653 <repeat name="data_tracks">
654 <conditional name="data_format">
655 <param name="data_format_select" value="hic" />
656 <conditional name="annotation_cond">
657 <param name="annotation_source" value="remote" />
658 <param name="uri" value="https://jbrowse.org/genomes/hg19/intra_nofrag_30.hic" />
659 <param name="label" value="hg_isoforms.fasta_cram" />
660 </conditional>
661 </conditional>
662 </repeat>
663 <repeat name="data_tracks">
664 <conditional name="data_format">
665 <param name="data_format_select" value="vcf" />
666 <conditional name="annotation_cond">
667 <param name="annotation_source" value="remote" />
668 <param name="uri" value="https://ftp.ncbi.nlm.nih.gov/pub/dbVar/data/Homo_sapiens/by_study/vcf/nstd175.GRCh37.variant_call.vcf.gz" />
669 <param name="label" value="HG002 dbVar variant calls" />
670 </conditional>
671 </conditional>
672 </repeat>
673 <repeat name="data_tracks">
674 <conditional name="data_format">
675 <param name="data_format_select" value="vcf" />
676 <conditional name="annotation_cond">
677 <param name="annotation_source" value="remote" />
678 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/hg19/COLO829/truthset_somaticSVs_COLO829.vcf" />
679 <param name="label" value="truthset_somaticSVs_COLO829" />
680 </conditional>
681 </conditional>
682 </repeat>
683 <repeat name="data_tracks">
684 <conditional name="data_format">
685 <param name="data_format_select" value="gene_calls" />
686 <conditional name="annotation_cond">
687 <param name="annotation_source" value="remote" />
688 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/hg19/gencode/gencode.v36lift37.annotation.sort.gff3.gz" />
689 <param name="label" value="Gencode v36 (GRCh37 liftover)" />
690 </conditional>
691 </conditional>
692 </repeat>
693 <repeat name="data_tracks">
694 <conditional name="data_format">
695 <param name="data_format_select" value="gene_calls" />
696 <conditional name="annotation_cond">
697 <param name="annotation_source" value="remote" />
698 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/hg19/mappability/wgEncodeDukeMapabilityRegionsExcludable.bed.gz" />
699 <param name="label" value="wgEncodeDukeMapabilityRegionsExcludable" />
700 </conditional>
701 </conditional>
702 </repeat>
703 </repeat>
704 </repeat>
705 <output name="output">
706 <extra_files name="galaxy.xml" type="file" value="out/02_remote/galaxy.xml" compare="sim_size" />
707 <extra_files name="config.json" type="file" value="out/02_remote/config.json" compare="sim_size" />
708 </output>
709 </test>
710 <test> <!-- Synteny merlin -->
711 <repeat name="assemblies">
712 <conditional name="reference_genome">
713 <param name="genome_type_select" value="history"/>
714 <param name="genome" value="merlun.fa"/>
715 </conditional>
716 <repeat name="track_groups">
717 <repeat name="data_tracks">
718 <conditional name="data_format">
719 <param name="data_format_select" value="synteny"/>
720 <conditional name="annotation_cond">
721 <param name="annotation_source" value="history" />
722 <param name="annotation" value="paf/merlun_on_merlon.paf"/>
723 </conditional>
724 </conditional>
725 </repeat>
726 </repeat>
727 </repeat>
728 <repeat name="assemblies">
729 <conditional name="reference_genome">
730 <param name="genome_type_select" value="history"/>
731 <param name="genome" value="merlon.fa"/>
732 </conditional>
733 <repeat name="track_groups">
734 <repeat name="data_tracks">
735 <conditional name="data_format">
736 <param name="data_format_select" value="synteny"/>
737 <conditional name="annotation_cond">
738 <param name="annotation_source" value="history" />
739 <param name="annotation" value="paf/merlon_on_merlin.paf"/>
740 </conditional>
741 </conditional>
742 </repeat>
743 </repeat>
744 </repeat>
745 <repeat name="assemblies">
746 <conditional name="reference_genome">
747 <param name="genome_type_select" value="history"/>
748 <param name="genome" value="merlin.fa"/>
749 </conditional>
750 <repeat name="track_groups">
751 <repeat name="data_tracks">
752 <conditional name="data_format">
753 <param name="data_format_select" value="wiggle"/>
754 <conditional name="annotation_cond">
755 <param name="annotation_source" value="history" />
756 <param name="annotation" value="bw/data.bw"/>
757 </conditional>
758 </conditional>
759 </repeat>
760 </repeat>
761 </repeat>
762 <output name="output">
763 <extra_files name="galaxy.xml" type="file" value="out/03_synteny/galaxy.xml" compare="sim_size" />
764 <extra_files name="config.json" type="file" value="out/03_synteny/config.json" compare="sim_size" />
765 </output>
766 </test>
767 <test> <!-- Synteny with remote genomes -->
768 <repeat name="assemblies">
769 <conditional name="reference_genome">
770 <param name="genome_type_select" value="remote"/>
771 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/peach/Ppersica_298_v2.0.fa.gz"/>
772 <param name="label" value="Peach"/>
773 </conditional>
774 <repeat name="track_groups">
775 <repeat name="data_tracks">
776 <conditional name="data_format">
777 <param name="data_format_select" value="synteny"/>
778 <conditional name="annotation_cond">
779 <param name="annotation_source" value="history" />
780 <param name="annotation" value="paf/peach-grape-map.paf"/>
781 </conditional>
782 </conditional>
783 </repeat>
784 </repeat>
785 </repeat>
786 <repeat name="assemblies">
787 <conditional name="reference_genome">
788 <param name="genome_type_select" value="remote"/>
789 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/grape/Vvinifera_145_Genoscope.12X.fa.gz"/>
790 <param name="label" value="Grape"/>
791 </conditional>
792 </repeat>
793 <output name="output">
794 <extra_files name="galaxy.xml" type="file" value="out/04_synteny_remote/galaxy.xml" compare="sim_size" />
795 <extra_files name="config.json" type="file" value="out/04_synteny_remote/config.json" compare="sim_size" />
796 </output>
797 </test>
798 <test> <!-- Synteny with remote genomes *and* paf -->
799 <repeat name="assemblies">
800 <conditional name="reference_genome">
801 <param name="genome_type_select" value="remote"/>
802 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/peach/Ppersica_298_v2.0.fa.gz"/>
803 <param name="label" value="Peach"/>
804 </conditional>
805 <repeat name="track_groups">
806 <repeat name="data_tracks">
807 <conditional name="data_format">
808 <param name="data_format_select" value="synteny"/>
809 <conditional name="annotation_cond">
810 <param name="annotation_source" value="remote" />
811 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/synteny/peach_grape.paf.gz" />
812 <param name="label" value="Peach vs grape" />
813 </conditional>
814 </conditional>
815 </repeat>
816 </repeat>
817 </repeat>
818 <repeat name="assemblies">
819 <conditional name="reference_genome">
820 <param name="genome_type_select" value="remote"/>
821 <param name="uri" value="https://s3.amazonaws.com/jbrowse.org/genomes/grape/Vvinifera_145_Genoscope.12X.fa.gz"/>
822 <param name="label" value="Grape"/>
823 </conditional>
824 </repeat>
825 <output name="output">
826 <extra_files name="galaxy.xml" type="file" value="out/05_synteny_full_remote/galaxy.xml" compare="sim_size" />
827 <extra_files name="config.json" type="file" value="out/05_synteny_full_remote/config.json" compare="sim_size" />
828 </output>
829 </test>
830 <test> <!-- various options, cytobands, ref name aliases -->
831 <repeat name="assemblies">
832 <conditional name="reference_genome">
833 <param name="genome_type_select" value="history"/>
834 <param name="genome" value="merlin.fa"/>
835 </conditional>
836 <param name="ref_name_aliases" value="aliases.tsv"/>
837 <param name="cytobands" value="cytobands.bed"/>
838 <param name="defaultLocation" value="Merlin:1000..2000"/>
839 <repeat name="track_groups">
840 <repeat name="data_tracks">
841 <conditional name="data_format">
842 <param name="data_format_select" value="gene_calls" />
843 <conditional name="annotation_cond">
844 <param name="annotation_source" value="history" />
845 <param name="annotation" value="gff3/merlin.gff" />
846 </conditional>
847 <param name="index" value="true" />
848 <section name="jbstyle">
849 <conditional name="track_style">
850 <param name="display" value="LinearBasicDisplay" />
851 <param name="display_mode" value="reducedRepresentation" />
852 <param name="labels_name" value="jexl:get(feature,'id')" />
853 </conditional>
854 </section>
855 <section name="metadata">
856 <param name="galaxy_metadata" value="false" />
857 <param name="metadata_bonus" value="metadata.tsv" />
858 </section>
859 <section name="formatdetails">
860 <param name="formatdetails_feature" value="jexl:{newfield:'Top custom contents here: '+feature.name}"/>
861 <param name="formatdetails_subfeature" value="jexl:{newfield:'Sub custom contents here: '+feature.name}"/>
862 <param name="formatdetails_depth" value="2"/>
863 </section>
864 </conditional>
865 </repeat>
866 <repeat name="data_tracks">
867 <conditional name="data_format">
868 <param name="data_format_select" value="gene_calls" />
869 <conditional name="annotation_cond">
870 <param name="annotation_source" value="history" />
871 <param name="annotation" value="gff3/1.gff" />
872 </conditional>
873 <param name="index" value="true" />
874 <section name="jbstyle">
875 <conditional name="track_style">
876 <param name="display" value="LinearArcDisplay" />
877 <param name="display_mode" value="semicircles" />
878 </conditional>
879 </section>
880 <param name="track_visibility" value="default_off" />
881 </conditional>
882 </repeat>
883 </repeat>
884 </repeat>
885 <section name="jbgen">
886 <param name="enableAnalytics" value="true" />
887 <param name="primary_color" value="#9d233f"/>
888 <param name="secondary_color" value="#421e63"/>
889 <param name="tertiary_color" value="#935560"/>
890 <param name="quaternary_color" value="#9fb11d"/>
891 <param name="font_size" value="15" />
892 </section>
893 <output name="output">
894 <extra_files name="galaxy.xml" type="file" value="out/06_various_options/galaxy.xml" compare="sim_size" />
895 <extra_files name="config.json" type="file" value="out/06_various_options/config.json" compare="sim_size" />
896 </output>
897 </test>
898 <test> <!-- Synteny, mixed basic / viewer -->
899 <repeat name="assemblies">
900 <conditional name="reference_genome">
901 <param name="genome_type_select" value="history"/>
902 <param name="genome" value="merlun.fa"/>
903 </conditional>
904 <repeat name="track_groups">
905 <repeat name="data_tracks">
906 <conditional name="data_format">
907 <param name="data_format_select" value="synteny"/>
908 <conditional name="annotation_cond">
909 <param name="annotation_source" value="history" />
910 <param name="annotation" value="paf/merlun_on_merlon.paf"/>
911 </conditional>
912 </conditional>
913 </repeat>
914 <repeat name="data_tracks">
915 <conditional name="data_format">
916 <param name="data_format_select" value="synteny"/>
917 <conditional name="annotation_cond">
918 <param name="annotation_source" value="history" />
919 <param name="annotation" value="paf/merlun_on_merlon.paf"/>
920 </conditional>
921 <section name="jbstyle">
922 <conditional name="track_style">
923 <param name="display" value="LinearBasicDisplay" />
924 </conditional>
925 </section>
926 </conditional>
927 </repeat>
928 </repeat>
929 </repeat>
930 <repeat name="assemblies">
931 <conditional name="reference_genome">
932 <param name="genome_type_select" value="history"/>
933 <param name="genome" value="merlon.fa"/>
934 </conditional>
935 <repeat name="track_groups">
936 <repeat name="data_tracks">
937 <conditional name="data_format">
938 <param name="data_format_select" value="synteny"/>
939 <conditional name="annotation_cond">
940 <param name="annotation_source" value="history" />
941 <param name="annotation" value="paf/merlon_on_merlin.paf"/>
942 </conditional>
943 </conditional>
944 </repeat>
945 <repeat name="data_tracks">
946 <conditional name="data_format">
947 <param name="data_format_select" value="synteny"/>
948 <conditional name="annotation_cond">
949 <param name="annotation_source" value="history" />
950 <param name="annotation" value="paf/merlon_on_merlin.paf"/>
951 </conditional>
952 <section name="jbstyle">
953 <conditional name="track_style">
954 <param name="display" value="LinearBasicDisplay" />
955 </conditional>
956 </section>
957 </conditional>
958 </repeat>
959 </repeat>
960 </repeat>
961 <repeat name="assemblies">
962 <conditional name="reference_genome">
963 <param name="genome_type_select" value="history"/>
964 <param name="genome" value="merlin.fa"/>
965 </conditional>
966 <repeat name="track_groups">
967 <repeat name="data_tracks">
968 <conditional name="data_format">
969 <param name="data_format_select" value="wiggle"/>
970 <conditional name="annotation_cond">
971 <param name="annotation_source" value="history" />
972 <param name="annotation" value="bw/data.bw"/>
973 </conditional>
974 </conditional>
975 </repeat>
976 </repeat>
977 </repeat>
978 <output name="output">
979 <extra_files name="galaxy.xml" type="file" value="out/07_synteny_mixed/galaxy.xml" compare="sim_size" />
980 <extra_files name="config.json" type="file" value="out/07_synteny_mixed/config.json" compare="sim_size" />
981 </output>
982 </test>
983 </tests>
984 <help format="markdown"><![CDATA[
985 # JBrowse2
986
987 JBrowse2 (or simply JBrowse) is a fast, embeddable genome browser built completely with
988 JavaScript and HTML5.
989
990 The JBrowse2 Galaxy tool was written to help build complex
991 JBrowse installations straight from Galaxy, taking advantage of the
992 latest Galaxy features such as dataset collections and sections.
993 It allows you to build up a JBrowse instance without worrying
994 about how to run the command line tools to format your data, and which
995 options need to be supplied and where.
996
997 With this tool, you can easily generate a standalone JBrowse browser,
998 that you can download, share with collaborators or even publish publicly.
999 You can even deposit it as an archive on data repositories for long term
1000 archival and reuse.
1001
1002 ## Options
1003
1004 ### Action
1005
1006 The default action of this tool is to create a new JBrowse dataset from scratch.
1007 However, you have the possibility to add new data (genomes and tracks) to a JBrowse2
1008 dataset previously generated with the same tool. Note however that mixing synteny and
1009 non-synteny dataset can give unwanted results.
1010
1011 ### Genome assemblies
1012
1013 In JBrowse2 you can as many genome assemblies as needed, each one having its specific
1014 set of tracks.
1015
1016 To add an assembly, you will need to input its sequence, either from a FASTA file in your history
1017 or from a genome pre-installed by your server administrators.
1018
1019 ### Track Groups
1020
1021 Track groups represent a set of tracks in a single category. These
1022 can be used to let your users understand relationships between large
1023 groups of tracks.
1024
1025 ### Annotation Tracks
1026
1027 Within Track Groups, you have one or more **Annotation Tracks**. Each
1028 Annotation Track is a dataset, or a group of datasets which have similar styling.
1029 This allows you to rapidly build up JBrowse instances without having to
1030 configure tracks individually. For example, if you have five different GFF3 files from
1031 various gene callers that you wish to display, you can take advantage of
1032 this feature to style all of them similarly.
1033
1034 For each track, or group of tracks, you will need to select the corresponding data type
1035 (GFF, BED, VCF, BAM, CRAM, ...) and the corresponding input files. Depending on the selected
1036 track type, you will get access to advanced configuration sections where you will be able to
1037 change the styling of the track. Please consult the [JBrowse2 documentation](https://jbrowse.org/jb2/docs/)
1038 for more details on all the possibilities. These options will only change the default styling
1039 of your JBrowse dataset: when visualising it, you will be able to use the JBrowse menus to switch to different
1040 styling.
1041
1042 When clicking on features in JBrowse (like genes from a GFF), JBrowse opens a panel with detailed
1043 information about this feature. This panel can also be customized directly from this Galaxy tool, by
1044 adding new fields, or modifying/removing existing ones.
1045
1046 On different type of tracks, you also have the possiblity to customize metadata associated to tracks.
1047 Metadata is used by JBrowse to easily sort track in its Faceted Track Selector.
1048
1049 ## Special data
1050
1051 ### Synteny
1052
1053 JBrowse2 allows to display synteny relationships between different genomes. To use it with this tool,
1054 generate alignement data between your different genomes (with minimap2 for example), then add the different genomes
1055 one by one, and a synteny track to the each genome corresponding to alignements to the
1056 next one.
1057
1058 For example, say you have 3 genomes : A, B and C
1059 - align genome B on genome A, and genome C on genome B
1060 - add genome C, B, and A in the Galaxy tool
1061 - add a synteny track on genome C where you input the alignement against genome B
1062 - add a synteny track on genome B where you input the alignement against genome A
1063
1064 Multiway synteny representation is not yet possible.
1065
1066 ### Remote data sources
1067
1068 We have made the choice to allow selecting data from remote sources (HTTP) instead of datasets from your history.
1069 Please be **very careful** when using this feature: by using it, your dataset will no longer be standalone, it will
1070 depend on the existence of the remote data. If for any reason the remote server administrator decides to remove or change
1071 the access rights to the corresponding file, your JBrowse dataset will become unusable.
1072
1073 Using remote data sources can be useful when using this tool for specific projects with associated reliable data
1074 repositories, but for most other use cases, selecting datasets from history is much more recommended.
1075 ]]></help>
1076 <expand macro="citations"/>
1077 </tool>