comparison gffread.xml @ 9:3e436657dcd0 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gffread commit 0d019235fcfc835b99d5651b0bc4fd0da06707ac
author iuc
date Fri, 15 Dec 2023 19:39:24 +0000
parents 154d00cbbf2d
children
comparison
equal deleted inserted replaced
8:154d00cbbf2d 9:3e436657dcd0
1 <tool id="gffread" name="gffread" version="@GALAXY_TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> 1 <tool id="gffread" name="gffread" version="@GALAXY_TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05">
2 <description>Filters and/or converts GFF3/GTF2 records</description> 2 <description>Filters and/or converts GFF3/GTF2 records</description>
3 <xrefs>
4 <xref type="bio.tools">gffread</xref>
5 </xrefs>
6 <macros> 3 <macros>
7 <!-- the version of this tool must not be lowered since in the past 2.x was used 4 <!-- the version of this tool must not be lowered since in the past 2.x was used
8 lets use small increments and hope that gffread catches up one day --> 5 lets use small increments and hope that gffread catches up one day -->
9 <token name="@GALAXY_TOOL_VERSION@">2.2.1.3</token> 6 <token name="@GALAXY_TOOL_VERSION@">2.2.1.4</token>
10 <token name="@TOOL_VERSION@">0.12.7</token> 7 <token name="@TOOL_VERSION@">0.12.7</token>
11 <token name="@VERSION_SUFFIX@">0</token> 8 <token name="@VERSION_SUFFIX@">0</token>
12 <xml name="fasta_output_select"> 9 <xml name="fasta_output_select">
13 <param name="fa_outputs" type="select" display="checkboxes" multiple="true" label="Select fasta outputs"> 10 <param name="fa_outputs" type="select" display="checkboxes" multiple="true" label="Select fasta outputs">
14 <option value="-w exons.fa">fasta file with spliced exons for each GFF transcript (-w)</option> 11 <option value="-w exons.fa">fasta file with spliced exons for each GFF transcript (-w)</option>
53 <param name="merge_options" type="select" display="checkboxes" multiple="true" label="Cluster options"> 50 <param name="merge_options" type="select" display="checkboxes" multiple="true" label="Cluster options">
54 <expand macro="cluster_opts" /> 51 <expand macro="cluster_opts" />
55 </param> 52 </param>
56 </xml> 53 </xml>
57 </macros> 54 </macros>
55 <xrefs>
56 <xref type="bio.tools">gffread</xref>
57 </xrefs>
58 <requirements> 58 <requirements>
59 <requirement type="package" version="@TOOL_VERSION@">gffread</requirement> 59 <requirement type="package" version="@TOOL_VERSION@">gffread</requirement>
60 </requirements> 60 </requirements>
61 <version_command>gffread --version</version_command> 61 <version_command>gffread --version</version_command>
62 <command detect_errors="aggressive"> 62 <command detect_errors="aggressive">
114 #if $reference_genome.source != 'none': 114 #if $reference_genome.source != 'none':
115 #if $reference_genome.fa_outputs and str($reference_genome.fa_outputs) != '': 115 #if $reference_genome.fa_outputs and str($reference_genome.fa_outputs) != '':
116 #echo ' ' + ' '.join(str($reference_genome.fa_outputs).split(',')) 116 #echo ' ' + ' '.join(str($reference_genome.fa_outputs).split(','))
117 #end if 117 #end if
118 #end if 118 #end if
119
119 #if $gffs.gff_fmt != 'none': 120 #if $gffs.gff_fmt != 'none':
120 #if $gffs.gff_fmt != 'bed' and $gffs.tname: 121 #if $gffs.gff_fmt != 'bed' and $gffs.tname:
121 -t '$gffs.tname' 122 -t '$gffs.tname'
122 #end if 123 #end if
123 #if $gffs.gff_fmt == 'gff': 124 #if $gffs.gff_fmt == 'gff':
124 ## TODO bug 'gft' -> 'gtf' 125 #if $input.datatype.file_ext == 'gtf':
125 #if $input.datatype.file_ext == 'gft':
126 $gffs.ensembl 126 $gffs.ensembl
127 #end if 127 #end if
128 #end if 128 #end if
129 #if $gffs.gff_fmt == 'gtf' 129 #if $gffs.gff_fmt == 'gtf'
130 -T 130 -T
131 #elif $gffs.gff_fmt == 'bed' 131 #elif $gffs.gff_fmt == 'bed'
132 --bed 132 --bed
133 #end if 133 #end if
134 -o output.$gffs.gff_fmt 134 -o output.$gffs.gff_fmt
135 #else if 'fa_outputs' not in $reference_genome or '.fa' not in str($reference_genome['fa_outputs'])
136 -o output.gff
135 #end if 137 #end if
136 138
137 ## Missing options 139 ## Missing options
138 ## 140 ##
139 ## --ids 141 ## --ids
251 <!-- reference sequence file --> 253 <!-- reference sequence file -->
252 <!-- Error: -g option is required for options -w, -x, -y, -V, -N, -M --> 254 <!-- Error: -g option is required for options -w, -x, -y, -V, -N, -M -->
253 <conditional name="reference_genome"> 255 <conditional name="reference_genome">
254 <param name="source" type="select" label="Reference Genome" help="NOTE: Required for fasta outputs"> 256 <param name="source" type="select" label="Reference Genome" help="NOTE: Required for fasta outputs">
255 <option value="none">none</option> 257 <option value="none">none</option>
256 <option value="cached"></option> 258 <option value="cached">Cached reference data</option>
257 <option value="history">From your history</option> 259 <option value="history">From your history</option>
258 </param> 260 </param>
259 <when value="none"> 261 <when value="none"/>
260 </when>
261 <when value="cached"> 262 <when value="cached">
262 <param argument="-g" name="fasta_indexes" type="select" label="Source FASTA Sequence"> 263 <param argument="-g" name="fasta_indexes" type="select" label="Source FASTA Sequence">
263 <options from_data_table="all_fasta"/> 264 <options from_data_table="all_fasta"/>
264 </param> 265 </param>
265 <expand macro="ref_filtering_select" /> 266 <expand macro="ref_filtering_select" />
278 <option value="none">none</option> 279 <option value="none">none</option>
279 <option value="gff">GFF</option> 280 <option value="gff">GFF</option>
280 <option value="gtf">GTF</option> 281 <option value="gtf">GTF</option>
281 <option value="bed">BED</option> 282 <option value="bed">BED</option>
282 </param> 283 </param>
283 <when value="none"> 284 <when value="none"/>
284 </when>
285 <when value="gff"> 285 <when value="gff">
286 <param argument="-L" name="ensembl" type="boolean" truevalue="-L" falsevalue="" checked="false" label="Ensembl GTF to GFF3 conversion" help=""/> 286 <param argument="-L" name="ensembl" type="boolean" truevalue="-L" falsevalue="" checked="false" label="Ensembl GTF to GFF3 conversion" help=""/>
287 <expand macro="trackname" /> 287 <expand macro="trackname" />
288 </when> 288 </when>
289 <when value="gtf"> 289 <when value="gtf">
290 <expand macro="trackname" /> 290 <expand macro="trackname" />
291 </when> 291 </when>
292 <when value="bed"> 292 <when value="bed"/>
293 </when>
294 </conditional> 293 </conditional>
295 294
296 <param argument="-F" name="full_gff_attribute_preservation" type="boolean" truevalue="-F" falsevalue="" checked="false" 295 <param argument="-F" name="full_gff_attribute_preservation" type="boolean" truevalue="-F" falsevalue="" checked="false"
297 label="full GFF attribute preservation (all attributes are shown)" help=""/> 296 label="full GFF attribute preservation (all attributes are shown)" help=""/>
298 <param argument="-D" name="decode_url" type="boolean" truevalue="-D" falsevalue="" checked="false" 297 <param argument="-D" name="decode_url" type="boolean" truevalue="-D" falsevalue="" checked="false"
301 label="warn about duplicate transcript IDs and other potential problems with the given GFF/GTF records" help=""/> 300 label="warn about duplicate transcript IDs and other potential problems with the given GFF/GTF records" help=""/>
302 301
303 </inputs> 302 </inputs>
304 <outputs> 303 <outputs>
305 <data name="output_gff" format="gff3" metadata_source="input" label="${tool.name} on ${on_string}: gff3" from_work_dir="output.gff"> 304 <data name="output_gff" format="gff3" metadata_source="input" label="${tool.name} on ${on_string}: gff3" from_work_dir="output.gff">
306 <filter>gffs['gff_fmt'] == 'gff'</filter> 305 <!-- output gff also if the user deselected all outputs: none is selected and all .fa outputs are disabled -->
306 <filter>gffs['gff_fmt'] == 'gff' or (gffs['gff_fmt'] == 'none' and ('fa_outputs' not in reference_genome or '.fa' not in str(reference_genome['fa_outputs'])))</filter>
307 </data> 307 </data>
308 <data name="output_gtf" format="gtf" metadata_source="input" label="${tool.name} on ${on_string}: gtf" from_work_dir="output.gtf"> 308 <data name="output_gtf" format="gtf" metadata_source="input" label="${tool.name} on ${on_string}: gtf" from_work_dir="output.gtf">
309 <filter>gffs['gff_fmt'] == 'gtf'</filter> 309 <filter>gffs['gff_fmt'] == 'gtf'</filter>
310 </data> 310 </data>
311 <data name="output_bed" format="bed" metadata_source="input" label="${tool.name} on ${on_string}: bed" from_work_dir="output.bed"> 311 <data name="output_bed" format="bed" metadata_source="input" label="${tool.name} on ${on_string}: bed" from_work_dir="output.bed">
327 <tests> 327 <tests>
328 <test expect_num_outputs="1"> 328 <test expect_num_outputs="1">
329 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> 329 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
330 <param name="gff_fmt" value="gff"/> 330 <param name="gff_fmt" value="gff"/>
331 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" /> 331 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" />
332 <assert_stdout>
333 <has_n_lines n="0"/>
334 </assert_stdout>
335 </test>
336 <!-- mapping -->
337 <test expect_num_outputs="1">
338 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
339 <param name="gff_fmt" value="gff"/>
340 <param name="chr_replace" ftype="tabular" value="chr_replace"/>
341 <output name="output_gff" ftype="gff3">
342 <assert_contents>
343 <has_n_lines n="314"/>
344 <has_line_matching expression="^chr.*"/>
345 <has_line_matching expression="^1.*" negate="true"/>
346 </assert_contents>
347 </output>
348 <assert_stdout>
349 <has_n_lines n="0"/>
350 </assert_stdout>
351 </test>
352 <!-- none output and all .fa outputs deselected .. gff is produced anyway, since we need one output -->
353 <test expect_num_outputs="1">
354 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
355 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" />
356 <assert_stdout>
357 <has_n_lines n="0"/>
358 </assert_stdout>
359 </test>
360 <!-- test ensemble gtf to gff conversion -->
361 <test expect_num_outputs="1">
362 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
363 <conditional name="gffs">
364 <param name="gff_fmt" value="gff"/>
365 <param name="ensembl" value="true"/>
366 <param name="tname" value="track name"/>
367 </conditional>
368 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71_ensemble.gff3" ftype="gff3" lines_diff="4" />
369 <assert_command>
370 <has_text text="-L"/>
371 <has_text text="-t &#39;track name&#39;"/>
372 </assert_command>
373 <assert_stdout>
374 <has_n_lines n="0"/>
375 </assert_stdout>
332 </test> 376 </test>
333 <test expect_num_outputs="1"> 377 <test expect_num_outputs="1">
334 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> 378 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
335 <param name="gff_fmt" value="gff"/> 379 <param name="gff_fmt" value="gff"/>
336 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" /> 380 <output name="output_gff" file="Homo_sapiens.GRCh37_19.71.gff3" ftype="gff3" lines_diff="4" />
381 <assert_stdout>
382 <has_n_lines n="0"/>
383 </assert_stdout>
337 </test> 384 </test>
338 <test expect_num_outputs="1"> 385 <test expect_num_outputs="1">
339 <param name="input" ftype="gtf" value="ecoli-k12.gff3"/> 386 <param name="input" ftype="gtf" value="ecoli-k12.gff3"/>
340 <param name="gff_fmt" value="gff"/> 387 <param name="gff_fmt" value="gff"/>
341 <param name="full_gff_attribute_preservation" value="-F"/> 388 <param name="full_gff_attribute_preservation" value="-F"/>
342 <output name="output_gff" file="ecoli-k12.processed.gff3" ftype="gff3" lines_diff="4" /> 389 <output name="output_gff" file="ecoli-k12.processed.gff3" ftype="gff3" lines_diff="4" />
390 <assert_stdout>
391 <has_n_lines n="0"/>
392 </assert_stdout>
343 </test> 393 </test>
344 <!-- bed output --> 394 <!-- bed output -->
345 <test expect_num_outputs="1"> 395 <test expect_num_outputs="1">
346 <param name="input" ftype="gff3" value="Homo_sapiens.GRCh37_19.71.gff3"/> 396 <param name="input" ftype="gff3" value="Homo_sapiens.GRCh37_19.71.gff3"/>
347 <param name="gff_fmt" value="bed"/> 397 <param name="gff_fmt" value="bed"/>
349 <assert_contents> 399 <assert_contents>
350 <has_n_lines n="42"/> 400 <has_n_lines n="42"/>
351 <has_n_columns n="13"/> 401 <has_n_columns n="13"/>
352 </assert_contents> 402 </assert_contents>
353 </output> 403 </output>
404 <assert_stdout>
405 <has_n_lines n="0"/>
406 </assert_stdout>
354 </test> 407 </test>
355 <!-- bed input and test tname --> 408 <!-- bed input and test tname -->
356 <test expect_num_outputs="1"> 409 <test expect_num_outputs="1">
357 <param name="input" ftype="bed" value="Homo_sapiens.GRCh37_19.71.bed"/> 410 <param name="input" ftype="bed" value="Homo_sapiens.GRCh37_19.71.bed"/>
358 <param name="gff_fmt" value="gff"/> 411 <param name="gff_fmt" value="gff"/>
363 <!-- this will work with https://github.com/galaxyproject/galaxy/pull/12528 --> 416 <!-- this will work with https://github.com/galaxyproject/galaxy/pull/12528 -->
364 <!-- <has_n_columns n="9" comment="#"/> --> 417 <!-- <has_n_columns n="9" comment="#"/> -->
365 <has_text text="track name"/> 418 <has_text text="track name"/>
366 </assert_contents> 419 </assert_contents>
367 </output> 420 </output>
421 <assert_stdout>
422 <has_n_lines n="0"/>
423 </assert_stdout>
368 </test> 424 </test>
369 <test expect_num_outputs="1"> 425 <test expect_num_outputs="1">
370 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> 426 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
371 <param name="region_filter" value="filter"/> 427 <param name="region_filter" value="filter"/>
372 <param name="range" value="19:496500..504965"/> 428 <param name="range" value="19:496500..504965"/>
375 <assert_contents> 431 <assert_contents>
376 <has_text text="ENST00000587541" /> 432 <has_text text="ENST00000587541" />
377 <has_text text="ENST00000382683" /> 433 <has_text text="ENST00000382683" />
378 </assert_contents> 434 </assert_contents>
379 </output> 435 </output>
436 <assert_stdout>
437 <has_n_lines n="0"/>
438 </assert_stdout>
380 </test> 439 </test>
381 <test expect_num_outputs="1"> 440 <test expect_num_outputs="1">
382 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> 441 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
383 <param name="region_filter" value="filter"/> 442 <param name="region_filter" value="filter"/>
384 <param name="range" value="19:496500..504965"/> 443 <param name="range" value="19:496500..504965"/>
388 <assert_contents> 447 <assert_contents>
389 <not_has_text text="ENST00000587541" /> 448 <not_has_text text="ENST00000587541" />
390 <has_text text="ENST00000382683" /> 449 <has_text text="ENST00000382683" />
391 </assert_contents> 450 </assert_contents>
392 </output> 451 </output>
452 <assert_stdout>
453 <has_n_lines n="0"/>
454 </assert_stdout>
393 </test> 455 </test>
394 <test expect_num_outputs="1"> 456 <test expect_num_outputs="1">
395 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> 457 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
396 <param name="filtering" value="-C"/> 458 <param name="filtering" value="-C"/>
397 <param name="region_filter" value="filter"/> 459 <param name="region_filter" value="filter"/>
401 <assert_contents> 463 <assert_contents>
402 <not_has_text text="ENST00000587541" /> 464 <not_has_text text="ENST00000587541" />
403 <has_text text="ENST00000382683" /> 465 <has_text text="ENST00000382683" />
404 </assert_contents> 466 </assert_contents>
405 </output> 467 </output>
468 <assert_stdout>
469 <has_n_lines n="0"/>
470 </assert_stdout>
406 </test> 471 </test>
407 <test expect_num_outputs="4"> 472 <test expect_num_outputs="4">
408 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/> 473 <param name="input" ftype="gtf" value="Homo_sapiens.GRCh37_19.71.gtf"/>
409 <param name="source" value="history"/> 474 <param name="source" value="history"/>
410 <param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/> 475 <param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/>
434 <assert_contents> 499 <assert_contents>
435 <has_text text="ENST00000346144" /> 500 <has_text text="ENST00000346144" />
436 <has_text text="MDFGLALLLAGLLGLLLGQSLQVKPLQVEPPEPVVAVALGASRQLTCRLACADRGASVQWRGLDTSLGAV" /> 501 <has_text text="MDFGLALLLAGLLGLLLGQSLQVKPLQVEPPEPVVAVALGASRQLTCRLACADRGASVQWRGLDTSLGAV" />
437 </assert_contents> 502 </assert_contents>
438 </output> 503 </output>
504 <assert_stdout>
505 <has_n_lines n="0"/>
506 </assert_stdout>
439 </test> 507 </test>
440 <test expect_num_outputs="1"> 508 <test expect_num_outputs="1">
441 <param name="input" ftype="gtf" value="stop_codons.gtf"/> 509 <param name="input" ftype="gtf" value="stop_codons.gtf"/>
442 <param name="source" value="history"/> 510 <param name="source" value="history"/>
443 <param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/> 511 <param name="genome_fasta" ftype="fasta" value="Homo_sapiens.GRCh37.71.dna.chromosome.19.fa"/>
446 <assert_contents> 514 <assert_contents>
447 <has_text text="ENST00000269812" /> 515 <has_text text="ENST00000269812" />
448 <has_text text="PLRGLHPRV*LQTPLERCPCWPPAGGTGGCPHCLLHLRLLQSPTPTALSEGGGAGTEAQPVTDVDPGRG*" /> 516 <has_text text="PLRGLHPRV*LQTPLERCPCWPPAGGTGGCPHCLLHLRLLQSPTPTALSEGGGAGTEAQPVTDVDPGRG*" />
449 </assert_contents> 517 </assert_contents>
450 </output> 518 </output>
519 <assert_stdout>
520 <has_n_lines n="0"/>
521 </assert_stdout>
451 </test> 522 </test>
452 </tests> 523 </tests>
453 <help> 524 <help>
454 <![CDATA[ 525 <![CDATA[
455 **gffread Filters and/or converts GFF3/GTF2 records** 526 **gffread Filters and/or converts GFF3/GTF2 records**