0
|
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' &&
|
10
|
17 export JBROWSE_SOURCE_DIR=\$(dirname \$(which jbrowse)) &&
|
0
|
18 ## Once that's done, we run the python script to handle the real work
|
|
19 python '$__tool_directory__/jbrowse2.py'
|
|
20 --jbrowse \${JBROWSE_SOURCE_DIR}
|
|
21 --outdir '$output.files_path'
|
10
|
22 --xml '$trackxml' &&
|
0
|
23
|
7
|
24 cp '$output.files_path/index.html' '$output'
|
0
|
25
|
|
26 ## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph.
|
|
27 #if str($uglyTestingHack) == "enabled":
|
|
28 && cp '$trackxml' '$output'
|
|
29 #end if
|
|
30 ]]></command>
|
|
31 <configfiles>
|
|
32 <configfile name="dummyIndex"><![CDATA[
|
|
33 <html>
|
|
34 <head>
|
|
35 </head>
|
|
36 <body>
|
4
|
37 <h1>JBrowse2 Data Directory</h1>
|
0
|
38 <p>
|
4
|
39 Hi! This is not a full JBrowse2 instance. JBrowse v0.4(+?)
|
0
|
40 started shipping with the ability to produce just the
|
|
41 "data" directory from a JBrowse instance, rather than a
|
|
42 complete, standalone instance. This was intended to be used
|
|
43 with the in-development Apollo integration, but may have other
|
|
44 uses as well.
|
|
45 </p>
|
|
46 </body>
|
|
47 </html>
|
|
48 ]]></configfile>
|
|
49 <configfile name="trackxml"><![CDATA[<?xml version="1.0"?>
|
|
50 <root>
|
|
51 <metadata>
|
|
52 <genomes>
|
|
53 #if str($reference_genome.genome_type_select) == "indexed":
|
|
54 <genome path="${reference_genome.genome.fields.path}">
|
|
55 <metadata>
|
|
56 <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
|
|
57 size="${dataset.get_size(nice_size=True)}"
|
|
58 edam_format="${dataset.datatype.edam_format}"
|
|
59 file_ext="${dataset.ext}" />
|
|
60 </metadata>
|
|
61 </genome>
|
6
|
62 #else:
|
0
|
63 <genome path="$reference_genome.genome">
|
|
64 <metadata>
|
|
65 <dataset id="${__app__.security.encode_id($reference_genome.genome.id)}" hid="${reference_genome.genome.hid}"
|
|
66 size="${reference_genome.genome.get_size(nice_size=True)}"
|
|
67 edam_format="${reference_genome.genome.datatype.edam_format}"
|
|
68 file_ext="${reference_genome.genome.ext}"
|
|
69 dname="${reference_genome.genome.element_identifier}" />
|
|
70 <history id="${__app__.security.encode_id($reference_genome.genome.history_id)}"
|
|
71 #if $reference_genome.genome.history.user:
|
|
72 user_email="${reference_genome.genome.history.user.email}"
|
|
73 user_id="${reference_genome.genome.history.user_id}"
|
|
74 display_name="${reference_genome.genome.history.get_display_name()}"/>
|
|
75 #else
|
|
76 user_email="anonymous"
|
|
77 user_id="-1"
|
|
78 display_name="Unnamed History"
|
|
79 />
|
|
80 #end if
|
|
81 <metadata
|
|
82 #for (key, value) in $reference_genome.genome.get_metadata().items():
|
|
83 #if "_types" not in $key:
|
|
84 ${key}="${value}"
|
|
85 #end if
|
|
86 #end for
|
|
87 />
|
|
88 <tool
|
|
89 tool_id="${reference_genome.genome.creating_job.tool_id}"
|
|
90 tool_version="${reference_genome.genome.creating_job.tool_version}"
|
|
91 />
|
|
92 </metadata>
|
|
93 </genome>
|
|
94 #end if
|
|
95 </genomes>
|
|
96 <galaxyUrl>${__app__.config.galaxy_infrastructure_url}</galaxyUrl>
|
|
97 </metadata>
|
|
98 <tracks>
|
|
99 #for $tg in $track_groups:
|
|
100 #for $track in $tg.data_tracks:
|
|
101 <track cat="${tg.category}" format="${track.data_format.data_format_select}" >
|
|
102 #if $track.data_format.data_format_select != "rest" and $track.data_format.data_format_select != "sparql":
|
|
103 <files>
|
|
104 #for $dataset in $track.data_format.annotation:
|
|
105 <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.element_identifier}">
|
|
106 <metadata>
|
|
107 <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
|
|
108 size="${dataset.get_size(nice_size=True)}"
|
|
109 edam_format="${dataset.datatype.edam_format}"
|
|
110 file_ext="${dataset.ext}" />
|
|
111 <history id="${__app__.security.encode_id($dataset.history_id)}"
|
|
112 #if $dataset.history.user:
|
|
113 user_email="${dataset.history.user.email}"
|
|
114 user_id="${dataset.history.user_id}"
|
|
115 display_name="${dataset.history.get_display_name()}"/>
|
|
116 #else
|
|
117 user_email="anonymous"
|
|
118 user_id="-1"
|
|
119 display_name="Unnamed History"/>
|
|
120 #end if
|
|
121 <metadata
|
|
122 #for (key, value) in $dataset.get_metadata().items():
|
|
123 #if "_types" not in $key and $value is not None and len(str($value)) < 5000:
|
|
124 ${key}="${value}"
|
|
125 #end if
|
|
126 #end for
|
|
127 />
|
|
128 <tool
|
|
129 tool_id="${dataset.creating_job.tool_id}"
|
|
130 tool_version="${dataset.creating_job.tool_version}"
|
|
131 />
|
|
132 </metadata>
|
|
133 </trackFile>
|
|
134 #end for
|
|
135 </files>
|
|
136 #end if
|
|
137
|
|
138 <options>
|
|
139 #if str($track.data_format.data_format_select) == "gene_calls" or str($track.data_format.data_format_select) == "blast" :
|
|
140 <style>
|
|
141 <className>${track.data_format.jbstyle.style_classname}</className>
|
|
142 <description>${track.data_format.jbstyle.style_description}</description>
|
|
143 <label>${track.data_format.jbstyle.style_label}</label>
|
|
144 <height>${track.data_format.jbstyle.style_height}</height>
|
|
145 <maxHeight>${track.data_format.jbstyle.max_height}</maxHeight>
|
|
146 </style>
|
|
147 #else if str($track.data_format.data_format_select) == "pileup":
|
|
148 <pileup>
|
|
149 <bam_indices>
|
|
150 #for $dataset in $track.data_format.annotation:
|
|
151 <bam_index>${dataset.metadata.bam_index}</bam_index>
|
|
152 #end for
|
|
153 </bam_indices>
|
|
154 <chunkSizeLimit>${track.data_format.chunkSizeLimit}</chunkSizeLimit>
|
|
155 </pileup>
|
|
156 #end if
|
|
157 #if str($track.data_format.data_format_select) == "blast":
|
|
158 <blast>
|
|
159 #if str($track.data_format.blast_parent) != "":
|
|
160 <parent>${track.data_format.blast_parent}</parent>
|
|
161 #end if
|
|
162 <protein>${track.data_format.is_protein}</protein>
|
|
163 <min_gap>${track.data_format.min_gap}</min_gap>
|
|
164 <index>${track.data_format.index}</index>
|
|
165 </blast>
|
|
166 #end if
|
|
167 </options>
|
|
168 </track>
|
|
169 #end for
|
|
170 #end for
|
|
171 </tracks>
|
|
172 <plugins>
|
|
173 </plugins>
|
|
174 </root>
|
|
175 ]]></configfile>
|
|
176 </configfiles>
|
|
177 <inputs>
|
|
178 <conditional name="reference_genome">
|
|
179 <param help="Built-in references" label="Reference genome to display" name="genome_type_select" type="select">
|
|
180 <option selected="True" value="indexed">Use a built-in genome</option>
|
|
181 <option value="history">Use a genome from history</option>
|
|
182 </param>
|
|
183 <when value="indexed">
|
|
184 <param
|
|
185 help="If your genome of interest is not listed, contact the Galaxy team"
|
|
186 label="Select a reference genome"
|
|
187 name="genome"
|
|
188 type="select">
|
|
189 <options from_data_table="all_fasta">
|
|
190 <filter column="2" type="sort_by"/>
|
|
191 <validator message="No genomes are available for the selected input dataset" type="no_options">
|
|
192 </validator>
|
|
193 </options>
|
|
194 </param>
|
|
195 </when>
|
|
196 <when value="history">
|
|
197 <param
|
|
198 format="fasta"
|
|
199 label="Select the reference genome"
|
|
200 name="genome"
|
|
201 type="data">
|
|
202 </param>
|
|
203 </when>
|
|
204 </conditional>
|
|
205
|
|
206 <repeat name="track_groups" title="Track Group">
|
|
207 <param label="Track Category"
|
|
208 name="category"
|
|
209 type="text"
|
|
210 value="Default"
|
|
211 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">
|
|
212 </param>
|
|
213 <repeat name="data_tracks" title="Annotation Track">
|
|
214 <conditional name="data_format" label="Track Options">
|
|
215 <param type="select" label="Track Type" name="data_format_select">
|
7
|
216 <option value="blast">Blast XML track - converted to GFF with actual gaps between hits</option>
|
|
217 <option value="gene_calls" selected="true">GFF/GFF3/BED feature tracks</option>
|
|
218 <option value="hic">HiC binary data. Existing cool format must be converted to binary hic - hic_matrix will NOT work.</option>
|
|
219 <option value="pileup">BAM Pileup track</option>
|
|
220 <option value="vcf">VCF SNP annotation track</option>
|
|
221 <option value="wiggle">BigWig XY track</option>
|
0
|
222 </param>
|
|
223 <when value="hic">
|
|
224 <expand macro="input_conditional" label="HiC Track Data" format="hic" help="Cool files must be converted first with hicexplorer" />
|
|
225 </when>
|
|
226 <when value="blast">
|
|
227 <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" />
|
|
228 <expand macro="track_styling"
|
|
229 classname="feature"
|
|
230 label="description"
|
|
231 description="Hit_titles"
|
|
232 height="600px"/>
|
|
233 <param label="Features used in Blast Search"
|
|
234 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."
|
|
235 format="gff3"
|
|
236 name="blast_parent"
|
|
237 optional="true"
|
|
238 type="data"/>
|
|
239
|
|
240 <param label="Minimum Gap Size"
|
|
241 help="before a new match_part feature is created"
|
|
242 name="min_gap"
|
|
243 type="integer"
|
|
244 value="10"
|
|
245 min="2" />
|
|
246 <param label="Is this a protein blast search?"
|
|
247 type="boolean"
|
|
248 name="is_protein"
|
|
249 truevalue="true"
|
|
250 falsevalue="false" />
|
|
251
|
|
252 <param label="Index this track" name="index" type="boolean" checked="false" truevalue="true" falsevalue="false" />
|
|
253 </when>
|
|
254 <when value="vcf">
|
|
255 <expand macro="input_conditional" label="SNP Track Data" format="vcf" />
|
|
256 </when>
|
|
257 <when value="gene_calls">
|
|
258 <expand macro="input_conditional" label="GFF/GFF3/BED Track Data" format="gff,gff3,bed" />
|
|
259 <expand macro="track_styling"
|
|
260 classname="feature"
|
|
261 label="product,name,id"
|
|
262 description="note,description"
|
|
263 height="10px"/>
|
|
264 <conditional name="match_part" label="match/match_part data">
|
|
265 <param type="select" label="Match part" name="matchp">
|
|
266 <option value="false" selected="True">"No"</option>
|
|
267 <option value="true">"Yes"</option>
|
|
268 </param>
|
|
269 <when value="true">
|
|
270 <param label="Match Part Feature Type"
|
|
271 name="name"
|
|
272 type="text"
|
|
273 value="match"
|
|
274 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)."
|
|
275 optional="True"/>
|
|
276 </when>
|
|
277 <when value="false" />
|
|
278 </conditional>
|
|
279 </when>
|
|
280 <when value="pileup">
|
|
281 <expand macro="input_conditional" label="BAM Track Data" format="bam" />
|
|
282 <param type="select" label="Autogenerate SNP Track"
|
|
283 help="Not recommended for deep coverage BAM files" name="autogen">
|
|
284 <option value="false" selected="True">"No"</option>
|
|
285 <option value="true">"Yes"</option>
|
|
286 </param>
|
|
287 <param label="Maximum size of BAM chunks"
|
|
288 name="chunkSizeLimit"
|
|
289 type="integer"
|
|
290 help="Maximum size in bytes of BAM chunks that the browser will try to deal with. When this is exceeded, most tracks will display 'Too much data' message."
|
|
291 value="5000000" />
|
|
292 </when>
|
|
293 <when value="wiggle">
|
|
294 <expand macro="input_conditional" label="BigWig Track Data" format="bigwig" />
|
|
295 </when>
|
|
296 </conditional>
|
|
297 </repeat>
|
|
298 </repeat>
|
|
299 <param type="hidden" name="uglyTestingHack" value="" />
|
|
300 </inputs>
|
|
301 <outputs>
|
7
|
302 <data format="html" name="output" label="JBrowse2 on $reference_genome.genome.element_identifier"/>
|
0
|
303 </outputs>
|
|
304 <tests>
|
|
305 <test>
|
|
306 <param name="reference_genome|genome_type_select" value="history"/>
|
|
307 <param name="reference_genome|genome" value="merlin.fa"/>
|
|
308 <param name="uglyTestingHack" value="enabled" />
|
|
309 <output name="output">
|
|
310 <assert_contents>
|
|
311 <has_text text="genome path="></has_text>
|
|
312 <has_text text="dataset id="></has_text>
|
|
313 <has_text text="history id="></has_text>
|
|
314 <has_text text="metadata"></has_text>
|
|
315 <has_text text="tool_id"></has_text>
|
|
316 </assert_contents>
|
|
317 </output>
|
|
318 </test>
|
|
319 <test>
|
|
320 <param name="reference_genome|genome_type_select" value="history"/>
|
|
321 <param name="reference_genome|genome" value="merlin.fa"/>
|
|
322 <repeat name="track_groups">
|
|
323 <param name="category" value="Default" />
|
|
324 <repeat name="data_tracks">
|
|
325 <conditional name="data_format">
|
|
326 <param name="data_format_select" value="gene_calls"/>
|
|
327 <param name="annotation" value="bed/test-3.bed,bed/test-6.bed"/>
|
|
328 </conditional>
|
|
329 </repeat>
|
|
330 </repeat>
|
|
331 <param name="uglyTestingHack" value="enabled" />
|
|
332 <output name="output">
|
|
333 <assert_contents>
|
|
334 <has_text text="genome path="></has_text>
|
|
335 <has_text text="dataset id="></has_text>
|
|
336 <has_text text="history id="></has_text>
|
|
337 <has_text text="metadata"></has_text>
|
|
338 <has_text text="tool_id"></has_text>
|
|
339 <has_text text="ext="bed" label="test-3.bed""></has_text>
|
|
340 </assert_contents>
|
|
341 </output>
|
|
342 </test>
|
|
343 <test>
|
|
344 <conditional name="reference_genome">
|
|
345 <param name="genome_type_select" value="history"/>
|
|
346 <param name="genome" value="merlin.fa"/>
|
|
347 </conditional>
|
|
348 <repeat name="track_groups">
|
|
349 <param name="category" value="Auto Coloured" />
|
|
350 <repeat name="data_tracks">
|
|
351 <conditional name="data_format">
|
|
352 <param name="data_format_select" value="pileup"/>
|
|
353 <param name="annotation" value="bam/merlin-sample.bam"/>
|
|
354 </conditional>
|
|
355 </repeat>
|
|
356 </repeat>
|
|
357
|
|
358 <param name="uglyTestingHack" value="enabled" />
|
|
359 <output name="output">
|
|
360 <assert_contents>
|
|
361 <has_text text="merlin-sample.bam"/>
|
|
362 <has_text text="dname="merlin.fa""/>
|
|
363 <has_text text="bam_index"/>
|
|
364 </assert_contents>
|
|
365 </output>
|
|
366 </test>
|
|
367
|
|
368 <test>
|
|
369 <param name="reference_genome|genome_type_select" value="history"/>
|
|
370 <param name="reference_genome|genome" value="merlin.fa"/>
|
|
371 <param name="uglyTestingHack" value="enabled" />
|
|
372 <output name="output">
|
|
373 <assert_contents>
|
|
374 <has_text text="merlin.fa"/>
|
|
375 </assert_contents>
|
|
376 </output>
|
|
377 </test>
|
|
378
|
|
379 </tests>
|
|
380 <help><![CDATA[
|
|
381
|
|
382 JBrowse2-in-Galaxy
|
|
383 ==================
|
|
384
|
|
385 JBrowse2-in-Galaxy offers a highly configurable, workflow-compatible
|
|
386 alternative to JBrowse1-in-Galaxy and Trackster.
|
|
387
|
|
388 Compared to JBrowse1-in-Galaxy, there is no support for alternative codons for unusual genomes,
|
|
389 and detailed track styling is not yet implemented. Send code.
|
|
390 JBrowse1 development has now ceased in favour of JBrowse2.
|
|
391
|
7
|
392 Use and local viewing
|
|
393 =====================
|
|
394
|
|
395 A JBrowse2 history item can be opened by viewing it (the "eye" icon).
|
|
396 They can also be downloaded as archives ("floppy disk" icon) to share and for local viewing.
|
|
397 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.
|
9
|
398 Unzip the archive (*unzip [filename].zip*) and change to the first level directory. It contains a file named "servejb2.py"
|
7
|
399
|
9
|
400 Assuming you have python3 installed, running:
|
7
|
401
|
|
402 *python3 servjb2.py*
|
|
403
|
|
404 will serve the unarchived JBrowse2 configuration, so it can be browsed by pointing a web browser to localhost:8080
|
0
|
405
|
|
406 Overview
|
|
407 --------
|
|
408
|
|
409 JBrowse is a fast, embeddable genome browser built completely with
|
|
410 JavaScript and HTML5.
|
|
411
|
|
412 The JBrowse-in-Galaxy (JiG) tool was written to help build complex
|
|
413 JBrowse installations straight from Galaxy, taking advantage of the
|
|
414 latest Galaxy features such as dataset collections, sections, and colour
|
|
415 pickers. It allows you to build up a JBrowse instance without worrying
|
|
416 about how to run the command line tools to format your data, and which
|
|
417 options need to be supplied and where. Additionally it comes with many
|
|
418 javascript functions to handle colouring of features which would be
|
|
419 nearly impossible to write without the assistance of this tool.
|
|
420
|
|
421 The JBrowse-in-Galaxy tool is maintained by `the Galaxy IUC
|
|
422 <https://github.com/galaxyproject/tools-iuc/issues>`__, who you can help you
|
|
423 with missing features or bugs in the tool.
|
|
424
|
|
425 Options
|
|
426 -------
|
|
427
|
|
428 The first option you encounter is the **Fasta Sequence(s)**. This option
|
|
429 now accepts multiple fasta files, allowing you to build JBrowse
|
|
430 instances that contain data for multiple genomes or chrosomomes
|
7
|
431 (generally known as "landmark features" in gff3 terminology.)
|
0
|
432
|
|
433 **Track Groups** represent a set of tracks in a single category. These
|
|
434 can be used to let your users understand relationships between large
|
|
435 groups of tracks.
|
|
436
|
|
437 .. image:: sections.png
|
|
438
|
|
439 Annotation Tracks
|
|
440 -----------------
|
|
441
|
|
442 There are a few different types of tracks supported, each with their own
|
|
443 set of options:
|
|
444
|
|
445 GFF3/BED
|
|
446 ~~~~~~~~
|
|
447
|
7
|
448 These are standard feature tracks. They usually highlight genes,
|
|
449 mRNAs and other features of interest along a genomic region.
|
0
|
450
|
|
451 BAM Pileups
|
|
452 ~~~~~~~~~~~
|
|
453
|
|
454 We support BAM files and can automatically generate SNP tracks based on
|
|
455 that bam data.
|
|
456
|
|
457
|
|
458 BlastXML
|
|
459 ~~~~~~~~
|
|
460
|
|
461 .. image:: blast.png
|
|
462
|
|
463 JiG now supports both blastn and blastp datasets. JiG internally uses a
|
|
464 blastXML to gapped GFF3 tool to convert your blastxml datasets into a
|
|
465 format amenable to visualization in JBrowse. This tool is also
|
|
466 available separately from the IUC on the toolshed.
|
|
467
|
|
468 **Minimum Gap Size** reflects how long a gap must be before it becomes a
|
|
469 real gap in the processed gff3 file. In the picture above, various sizes
|
|
470 of gaps can be seen. If the minimum gap size was set much higher, say
|
|
471 100nt, many of the smaller gaps would disappear, and the features on
|
|
472 both sides would be merged into one, longer feature. This setting is
|
|
473 inversely proportional to runtime and output file size. *Do not set this
|
|
474 to a low value for large datasets*. By setting this number lower, you
|
|
475 will have extremely large outputs and extremely long runtimes. The
|
|
476 default was configured based off of the author's experience, but the
|
|
477 author only works on small viruses. It is *strongly* recommended that
|
|
478 you filter your blast results before display, e.g. picking out the top
|
|
479 10 hits or so.
|
|
480
|
|
481 **Protein blast search** option merely informs underlying tools that
|
|
482 they should adjust feature locations by 3x.
|
|
483
|
|
484 Bigwig XY
|
|
485 ~~~~~~~~~
|
|
486
|
|
487 .. image:: bigwig.png
|
|
488
|
|
489
|
|
490
|
|
491 VCFs/SNPs
|
|
492 ~~~~~~~~~
|
|
493
|
|
494 These tracks do not support any special configuration.
|
|
495
|
|
496 @ATTRIBUTION@
|
|
497 ]]></help>
|
|
498 <expand macro="citations"/>
|
|
499 </tool>
|