comparison jbrowse2.xml @ 31:cb4b32ca9968 draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919-dirty
author fubar
date Fri, 23 Feb 2024 07:15:42 +0000
parents 8f02a84ee278
children 9aedb7f1cc77
comparison
equal deleted inserted replaced
30:8f02a84ee278 31:cb4b32ca9968
15 ## but nice if users want to reproduce locally 15 ## but nice if users want to reproduce locally
16 cp '$trackxml' '$output.files_path/galaxy.xml' && 16 cp '$trackxml' '$output.files_path/galaxy.xml' &&
17 python '$__tool_directory__/jbrowse2.py' 17 python '$__tool_directory__/jbrowse2.py'
18 --outdir '$output.files_path' 18 --outdir '$output.files_path'
19 --xml '$trackxml' && 19 --xml '$trackxml' &&
20 20 #if $jbgen.zipOut == "true":
21 cp '$output.files_path/index.html' '$output' 21 (cd '$output.files_path' && zip -r - . ) > JBrowse2.zip &&
22 22 mv JBrowse2.zip '$output'
23 #else
24 cp '$output.files_path/index.html' '$output'
25 #end if
23 ## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph. 26 ## Ugly testing hack since I cannot get <extra_files> to test the files I want to test. Hmph.
24 #if str($uglyTestingHack) == "enabled": 27 #if str($uglyTestingHack) == "enabled":
25 && cp '$trackxml' '$output' 28 && cp '$trackxml' '$output'
26 #end if 29 #end if
27 ]]></command> 30 ]]></command>
75 </genome> 78 </genome>
76 #end if 79 #end if
77 </genomes> 80 </genomes>
78 <general> 81 <general>
79 <defaultLocation>${jbgen.defaultLocation}</defaultLocation> 82 <defaultLocation>${jbgen.defaultLocation}</defaultLocation>
83 <zipOut>${jbgen.zipOut}</zipOut>
80 <analytics>${jbgen.enableAnalytics}</analytics> 84 <analytics>${jbgen.enableAnalytics}</analytics>
81 <primary_color>${jbgen.primary_color}</primary_color> 85 <primary_color>${jbgen.primary_color}</primary_color>
82 <secondary_color>${jbgen.secondary_color}</secondary_color> 86 <secondary_color>${jbgen.secondary_color}</secondary_color>
83 <tertiary_color>${jbgen.tertiary_color}</tertiary_color> 87 <tertiary_color>${jbgen.tertiary_color}</tertiary_color>
84 <quaternary_color>${jbgen.quaternary_color}</quaternary_color> 88 <quaternary_color>${jbgen.quaternary_color}</quaternary_color>
87 </general> 91 </general>
88 <galaxyUrl>${__app__.config.galaxy_infrastructure_url}</galaxyUrl> 92 <galaxyUrl>${__app__.config.galaxy_infrastructure_url}</galaxyUrl>
89 </metadata> 93 </metadata>
90 <tracks> 94 <tracks>
91 #for $tg in $track_groups: 95 #for $tg in $track_groups:
92 #for $track in $tg.data_tracks: 96 #for $track in $tg.data_tracks:
93 <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}"> 97 <track cat="${tg.category}" format="${track.data_format.data_format_select}" visibility="${track.data_format.track_visibility}">
94 #if $track.data_format.data_format_select != "sparql": 98 #if $track.data_format.data_format_select != "sparql":
95 <files> 99 <files>
96 #set dataset = $track.data_format.annotation 100 #set dataset = $track.data_format.annotation
97 <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.element_identifier}"> 101 <trackFile path="${dataset}" ext="${dataset.ext}" label="${dataset.element_identifier}">
98 <metadata> 102 <metadata>
99 <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}" 103 <dataset id="${__app__.security.encode_id($dataset.id)}" hid="${dataset.hid}"
100 size="${dataset.get_size(nice_size=True)}" 104 size="${dataset.get_size(nice_size=True)}"
101 edam_format="${dataset.datatype.edam_format}" 105 edam_format="${dataset.datatype.edam_format}"
102 file_ext="${dataset.ext}" /> 106 file_ext="${dataset.ext}" />
103 <history id="${__app__.security.encode_id($dataset.history_id)}" 107 <history id="${__app__.security.encode_id($dataset.history_id)}"
104 #if $dataset.history.user: 108 #if $dataset.history.user:
105 user_email="${dataset.history.user.email}" 109 user_email="${dataset.history.user.email}"
106 user_id="${dataset.history.user_id}" 110 user_id="${dataset.history.user_id}"
107 display_name="${dataset.history.get_display_name()}"/> 111 display_name="${dataset.history.get_display_name()}"/>
108 #else 112 #else
109 user_email="anonymous" 113 user_email="anonymous"
110 user_id="-1" 114 user_id="-1"
111 display_name="Unnamed History"/> 115 display_name="Unnamed History"/>
116 #end if
117 <metadata
118 #for (key, value) in $dataset.get_metadata().items():
119 #if "_types" not in $key and $value is not None and len(str($value)) < 5000:
120 #if isinstance($value, list):
121 #set value_str = "[%s]" % ','.join([str(val) for val in value])
122 ${key}="$value_str"
123 #else
124 ${key}="${value}"
125 #end if
126 #end if
127 #end for
128 />
129 <tool
130 tool_id="${dataset.creating_job.tool_id}"
131 tool_version="${dataset.creating_job.tool_version}"
132 />
133 </metadata>
134 </trackFile>
135 </files>
136 #else
137 <track cat="${tg.category}" format="sparql" visibility="off">
138 #end if
139
140 <options>
141
142 #if str($track.data_format.data_format_select) == "pileup":
143 <pileup>
144 <bam_indices>
145 <bam_index>${dataset.metadata.bam_index}</bam_index>
146 </bam_indices>
147 </pileup>
148 #else if str($track.data_format.data_format_select) == "cram":
149 <cram>
150 <cram_indices>
151 <cram_index>${dataset.metadata.cram_index}</cram_index>
152 </cram_indices>
153 </cram>
154 #else if str($track.data_format.data_format_select) == "blast":
155 <blast>
156 #if str($track.data_format.blast_parent) != "":
157 <parent>${track.data_format.blast_parent}</parent>
112 #end if 158 #end if
113 <metadata 159 <protein>${track.data_format.is_protein}</protein>
114 #for (key, value) in $dataset.get_metadata().items(): 160 <min_gap>${track.data_format.min_gap}</min_gap>
115 #if "_types" not in $key and $value is not None and len(str($value)) < 5000: 161 </blast>
116 #if isinstance($value, list): 162 #else if str($track.data_format.data_format_select) == "gene_calls":
117 #set value_str = "[%s]" % ','.join([str(val) for val in value]) 163 <gff>
118 ${key}="$value_str" 164 #if $track.data_format.match_part.match_part_select == "true":
119 #else 165 <match>${track.data_format.match_part.name}</match>
120 ${key}="${value}"
121 #end if 166 #end if
122 #end if 167 </gff>
123 #end for 168 #else if str($track.data_format.data_format_select) == "paf":
124 /> 169 <paf>
125 <tool 170 <genome>
126 tool_id="${dataset.creating_job.tool_id}" 171 #for gnome in $track.data_format.synteny_genome:
127 tool_version="${dataset.creating_job.tool_version}" 172 $gnome,
128 /> 173 #end for
129 </metadata> 174 </genome>
130 </trackFile> 175 <genome_label>
131 </files> 176 #for gnome in $track.data_format.synteny_genome:
132 #end if 177 $gnome.name,
133 178 #end for
134 <options> 179 </genome_label>
135 180 </paf>
136 181 #else if str($track.data_format.data_format_select) == "hic":
137 #if str($track.data_format.data_format_select) == "pileup": 182 <hic>
138 <pileup> 183 </hic>
139 <bam_indices> 184 #else if str($track.data_format.data_format_select) == "cool":
140 <bam_index>${dataset.metadata.bam_index}</bam_index> 185 <cool>
141 </bam_indices> 186 </cool>
142 </pileup> 187 #else if str($track.data_format.data_format_select) == "sparql":
143 #else if str($track.data_format.data_format_select) == "cram": 188 <label>${track.data_format.label}</label>
144 <cram> 189 <sparql>
145 <cram_indices> 190 <url>${track.data_format.url}</url>
146 <cram_index>${dataset.metadata.cram_index}</cram_index> 191 <query>${track.data_format.query}</query>
147 </cram_indices> 192 <query_refnames>${track.data_format.query_refnames}</query_refnames>
148 </cram> 193 </sparql>
149 #else if str($track.data_format.data_format_select) == "blast": 194 #end if
150 <blast> 195 </options>
151 #if str($track.data_format.blast_parent) != "": 196 </track>
152 <parent>${track.data_format.blast_parent}</parent>
153 #end if
154 <protein>${track.data_format.is_protein}</protein>
155 <min_gap>${track.data_format.min_gap}</min_gap>
156 </blast>
157 #else if str($track.data_format.data_format_select) == "gene_calls":
158 <gff>
159 #if $track.data_format.match_part.match_part_select == "true":
160 <match>${track.data_format.match_part.name}</match>
161 #end if
162 </gff>
163 #else if str($track.data_format.data_format_select) == "paf":
164 <paf>
165 <genome>${track.data_format.synteny_genome}</genome>
166 <genome_label>${track.data_format.synteny_genome.name}</genome_label>
167 </paf>
168 #else if str($track.data_format.data_format_select) == "hic":
169 <hic>
170 </hic>
171 #else if str($track.data_format.data_format_select) == "cool":
172 <cool>
173 </cool>
174 #else if str($track.data_format.data_format_select) == "sparql":
175 <label>${track.data_format.label}</label>
176 <sparql>
177 <url>${track.data_format.url}</url>
178 <query>${track.data_format.query}</query>
179 <query_refnames>${track.data_format.query_refnames}</query_refnames>
180 </sparql>
181 #end if
182 </options>
183 </track>
184 #end for 197 #end for
185 #end for 198 #end for
186 </tracks> 199 </tracks>
187 </root> 200 </root>
188 ]]></configfile> 201 ]]></configfile>
189 </configfiles> 202 </configfiles>
190 203
234 <option value="gene_calls" selected="true">GFF/GFF3/BED feature track</option> 247 <option value="gene_calls" selected="true">GFF/GFF3/BED feature track</option>
235 <option value="hic">HiC as juicebox_hic format file. Tabular hic_matrix will NOT work.</option> 248 <option value="hic">HiC as juicebox_hic format file. Tabular hic_matrix will NOT work.</option>
236 <option value="maf">Multiple alignment format. Reference name must match the MAF name exactly to work correctly</option> 249 <option value="maf">Multiple alignment format. Reference name must match the MAF name exactly to work correctly</option>
237 <option value="paf">PAF - approximate mapping positions between two set of sequences</option> 250 <option value="paf">PAF - approximate mapping positions between two set of sequences</option>
238 <option value="sparql">SPARQL</option> 251 <option value="sparql">SPARQL</option>
239 <option value="vcf">VCF SNP annotation</option> 252 <option value="vcf">VCF SNP</option>
240 </param> 253 </param>
241 <when value="blast"> 254 <when value="blast">
242 <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" /> 255 <expand macro="input_conditional" label="BlastXML Track Data" format="blastxml" />
243 256
244 <param label="Features used in Blast Search" 257 <param label="Features used in Blast Search"
300 <when value="wiggle"> 313 <when value="wiggle">
301 <expand macro="input_conditional" label="BigWig Track Data" format="bigwig" /> 314 <expand macro="input_conditional" label="BigWig Track Data" format="bigwig" />
302 <expand macro="track_visibility" /> 315 <expand macro="track_visibility" />
303 </when> 316 </when>
304 <when value="paf"> 317 <when value="paf">
305 <param label="Comparison genome sequence" help="Paf from this as the reference, using the real reference as the reads to map" 318 <param label="Comparison genome sequence" help="Paf from these as the references, using the real reference as the reads to map"
306 format="fasta" 319 format="fasta"
307 name="synteny_genome" 320 name="synteny_genome"
308 type="data" /> 321 type="data"
309 <expand macro="input_conditional" label="Synteny data" format="paf" help="Make paf with minimap2 mapping real reference onto desired syntenic reference"/> 322 multiple="True"/>
323 <expand macro="input_conditional" label="Synteny data" format="paf" help="Make paf with mashmap or minimap2 mapping real reference onto desired syntenic references"/>
310 <expand macro="track_visibility" /> 324 <expand macro="track_visibility" />
311 </when> 325 </when>
312 326
313 <when value="hic"> 327 <when value="hic">
314 <expand macro="input_conditional" label="Binary Juicebox HiC data" format="hic,juicebox_hic" /> 328 <expand macro="input_conditional" label="Binary Juicebox HiC data" format="hic,juicebox_hic" />
374 <expand macro="general_options" /> 388 <expand macro="general_options" />
375 389
376 <param type="hidden" name="uglyTestingHack" value="" /> 390 <param type="hidden" name="uglyTestingHack" value="" />
377 </inputs> 391 </inputs>
378 <outputs> 392 <outputs>
379 <data format="html" name="output" label="JBrowse2 on $reference_genome.genome.name"/> 393 <data format="html" name="output" label="JBrowse2 on $reference_genome.genome.name">
394 <change_format>
395 <when input="zipOut" value="true" format="zip" />
396 </change_format>
397 </data>
380 </outputs> 398 </outputs>
381 <tests> 399 <tests>
382 <test> 400 <test>
383 <param name="reference_genome|genome_type_select" value="history"/> 401 <param name="reference_genome|genome_type_select" value="history"/>
384 <param name="reference_genome|genome" value="merlin.fa"/> 402 <param name="reference_genome|genome" value="merlin.fa"/>
403 <has_text text="file_ext=&quot;bigwig&quot;"></has_text> 421 <has_text text="file_ext=&quot;bigwig&quot;"></has_text>
404 <has_text text="format=&quot;wiggle&quot;"></has_text> 422 <has_text text="format=&quot;wiggle&quot;"></has_text>
405 </assert_contents> 423 </assert_contents>
406 </output> 424 </output>
407 </test> 425 </test>
426
408 <test> 427 <test>
409 <param name="reference_genome|genome_type_select" value="history"/> 428 <param name="reference_genome|genome_type_select" value="history"/>
410 <param name="reference_genome|genome" value="merlin.fa"/> 429 <param name="reference_genome|genome" value="merlin.fa"/>
411 <repeat name="track_groups"> 430 <repeat name="track_groups">
412 <param name="category" value="Default" /> 431 <param name="category" value="Default" />
737 <has_text text="With menu or index"/> 756 <has_text text="With menu or index"/>
738 <has_text text="gene_calls"/> 757 <has_text text="gene_calls"/>
739 </assert_contents> 758 </assert_contents>
740 </output> 759 </output>
741 </test> 760 </test>
761
742 <!-- TODO add a synteny test --> 762 <!-- TODO add a synteny test -->
743 <!-- TODO add a bam and a cram test --> 763 <!-- TODO add a bam and a cram test -->
744 <!-- TODO add an hic test --> 764 <!-- TODO add an hic test -->
745 <!-- TODO add a vcf_bgzip test --> 765 <!-- TODO add a vcf_bgzip test -->
746 </tests> 766 </tests>