comparison vt_normalize.xml @ 0:26babe3a66f1 draft default tip

planemo upload for repository https://github.com/atks/vt commit d4f5de5f229f503deb66a708f864cf380c900ce0
author bgruening
date Sat, 04 Jun 2016 10:41:29 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26babe3a66f1
1 <tool id="vt_@BINARY@" name="VT @BINARY@" version="@VERSION@.0">
2 <description>normalizes variants in a VCF file</description>
3 <macros>
4 <import>vt_macros.xml</import>
5 <token name="@BINARY@">normalize</token>
6 </macros>
7 <expand macro="requirements" />
8 <expand macro="stdio" />
9 <expand macro="version_command" />
10 <command>
11 <![CDATA[
12 vt @BINARY@
13 #if str($output_format) == 'bcf':
14 -o normalised.bcf
15 #else:
16 -o normalised.vcf
17 #end if
18 ##-q do not print options and summary []
19 -w $window
20
21 #if str( $intervals_file ) != 'None':
22 -I "${intervals_file}"
23 #end if
24 $n
25 ##-i intervals []
26
27 #if $reference_source.reference_source_selector != "history":
28 -r "${reference_source.reference_genome.fields.path}"
29 #else:
30 -r "${reference_source.reference_genome}"
31 #end if
32
33 "${ infile }"
34
35 &&
36 ## For some reason, the file move will randomly produce empty files.
37 ## Wait two seconds to let the system close file handlers and clean up.
38 sleep 2
39 &&
40
41 #if str($output_format) == 'bcf':
42 mv normalised.bcf "${ outfile }";
43 #else:
44 mv normalised.vcf "${ outfile }";
45 #end if
46
47 ]]>
48 </command>
49 <inputs>
50 <param name="infile" type="data" format="vcf" label="VCF file to be normalised" />
51
52 <conditional name="reference_source">
53 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
54 <option value="cached" selected="True">Locally cached</option>
55 <option value="history">History</option>
56 </param>
57 <when value="cached">
58 <param name="reference_genome" type="select" label="Using reference genome">
59 <options from_data_table="fasta_indexes">
60 <filter type="data_meta" ref="infile" key="dbkey" column="1" />
61 <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" />
62 </options>
63 </param>
64 </when>
65 <when value="history">
66 <param name="reference_genome" type="data" format="fasta" label="Using reference file" />
67 </when>
68 </conditional>
69 <param name="intervals_file" type="data" format="bed" optional="True" label="File containing list of intervals" />
70 <param name="window" type="integer" value="10000" label="Window size for local sorting of variants"
71 help="(-w)">
72 <validator type="in_range" min="0"/>
73 </param>
74 <param argument="-n" type="boolean" truevalue="-n" falsevalue=""
75 label="Do not fail when REF is inconsistent with reference sequence for non SNPs"
76 help=""/>
77 <param name="output_format" type="select" label="Choose the output format" help="">
78 <option value="bcf">BCF</option>
79 <option value="vcf" selected="true">VCF</option>
80 </param>
81 </inputs>
82 <outputs>
83 <data name="outfile" format="vcf" label="${tool.name} on ${on_string}">
84 <change_format>
85 <when input="output_format" value="bcf" format="bcf" />
86 </change_format>
87 </data>
88 </outputs>
89 <tests>
90 <test>
91 <param name="infile" value="infile01.vcf" />
92 <param name="reference_source_selector" value="history" />
93 <param name="reference_genome" value="20.fa.bz2" />
94 <param name="n" value="True" />
95 <output name="outfile" file="normalize_result01.vcf" ftype="vcf" />
96 </test>
97 </tests>
98 <help>
99 <![CDATA[
100 **What it does**
101
102 Normalize variants in a VCF file. Normalized variants may have their positions changed; in such cases,
103 the normalized variants are reordered and output in an ordered fashion. The local reordering takes place over a window of 10000 base pairs.
104
105 @CITATION@
106 ]]>
107 </help>
108 <expand macro="citations"/>
109 </tool>