comparison bcftools_view.xml @ 0:94f98eb08abc draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit ef90c4602bdb83ea7455946c9d175ea27284e643
author iuc
date Wed, 06 Jul 2016 07:09:28 -0400
parents
children cc016cb332cd
comparison
equal deleted inserted replaced
-1:000000000000 0:94f98eb08abc
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
3 <description>VCF/BCF conversion, view, subset and filter VCF/BCF files</description>
4 <macros>
5 <token name="@EXECUTABLE@">view</token>
6 <import>macros.xml</import>
7 <xml name="macro_types_options">
8 <option value="snps">snps</option>
9 <option value="indels">indels</option>
10 <option value="mnps">mnps</option>
11 <option value="other">mnps</option>
12 </xml>
13 </macros>
14 <expand macro="requirements" />
15 <expand macro="version_command" />
16 <command detect_errors="aggressive"><![CDATA[
17 @PREPARE_ENV@
18 @PREPARE_INPUT_FILE@
19 #set $section = $sec_restrict
20 @PREPARE_TARGETS_FILE@
21
22 bcftools @EXECUTABLE@
23
24 ## Subset section
25 #set $section = $sec_subset
26 ${section.trim_alt_alleles}
27 ${section.no_update}
28 @SAMPLES@
29 ${section.force_samples}
30
31
32 ## Filter section
33 #set $section = $sec_filter
34 #if $section.min_ac:
35 --min-ac "${section.min_ac}"
36 #end if
37 #if $section.max_ac:
38 --max-ac "${section.max_ac}"
39 #end if
40 #if str($section.select_genotype) != "__none__":
41 --genotype "${section.select_genotype}"
42 #end if
43 ## known or novel
44 #if $section.known_or_novel:
45 ${section.known_or_novel}
46 #end if
47 #if $section.min_alleles:
48 --min-alleles "${section.min_alleles}"
49 #end if
50 #if $section.max_alleles:
51 --max-alleles "${section.max_alleles}"
52 #end if
53 #if $section.phased:
54 ${section.phased}
55 #end if
56 #if $section.min_af:
57 --min-af "${section.min_af}"
58 #end if
59 #if $section.max_af:
60 --max-af "${section.max_af}"
61 #end if
62 #if $section.uncalled:
63 ${section.uncalled}
64 #end if
65 #if $section.types:
66 --types "${section.types}"
67 #end if
68 #if $section.exclude_types:
69 --exclude-types "${section.exclude_types}"
70 #end if
71 #if $section.private:
72 ${section.private}
73 #end if
74
75 ## Output section
76 #set $section = $sec_output
77 ${section.drop_genotypes}
78 #if $section.header:
79 ${section.header}
80 #end if
81 #if $section.compression_level:
82 --compression-level "${section.compression_level}"
83 #end if
84
85 #set $section = $sec_restrict
86 @APPLY_FILTERS@
87 @INCLUDE@
88 @EXCLUDE@
89 @REGIONS@
90 @TARGETS@
91
92 @OUTPUT_TYPE@
93 @THREADS@
94
95 ## Primary Input/Outputs
96 @INPUT_FILE@
97 > "$output_file"
98 ]]>
99 </command>
100 <inputs>
101 <expand macro="macro_input" />
102 <section name="sec_restrict" expanded="false" title="Restrict to">
103 <expand macro="macro_apply_filters" />
104 <expand macro="macro_regions" />
105 <expand macro="macro_targets" />
106 <expand macro="macro_include" />
107 <expand macro="macro_exclude" />
108 </section>
109 <section name="sec_subset" expanded="false" title="Subset Options">
110 <expand macro="macro_samples" />
111 <param name="force_samples" type="boolean" truevalue="--force-samples" falsevalue="" label="Force Samples"
112 help="Only warn about unknown subset samples" />
113 <param name="no_update" type="boolean" truevalue="--no-update" falsevalue="" label="No Update"
114 help="Do not (re)calculate INFO fields for the subset (currently INFO/AC and INFO/AN)" />
115 <param name="trim_alt_alleles" type="boolean" truevalue="--trim-alt-alleles" falsevalue="" label="Trim Alt Alleles"
116 help="Trim alternate alleles not seen in the subset" />
117 </section>
118 <section name="sec_filter" expanded="false" title="Filter Options">
119 <param name="min_ac" type="integer" label="Min Ac" default="nref" optional="True"
120 help="(-c --min-ac) Minimum count for non-reference (nref), 1st alternate (alt1), least frequent (minor), most frequent (major) or sum of all but most frequent (nonmajor) alleles" />
121 <param name="max_ac" type="integer" label="Max Ac" default="nref" optional="True"
122 help="(-C --max-ac) Maximum count for non-reference (nref), 1st alternate (alt1), least frequent (minor), most frequent (major) or sum of all but most frequent (nonmajor) alleles" />
123 <param name="select_genotype" type="select">
124 <option value="__none__" selected="True">No selection</option>
125 <option value="require one or more hom/het/missing genotype or" />
126 <option value="if prefixed with &quot;^&quot;" />
127 <option value="exclude sites with hom/het/missing genotypes" />
128 </param>
129
130 <param name="types" type="select" label="Select Types" multiple="true" optional="True">
131 <help>
132 List of variant types to select. Site is selected if any of the ALT alleles is of the type requested.
133 Types are determined by comparing the REF and ALT alleles in the VCF record.
134 </help>
135 <expand macro="macro_types_options" />
136 </param>
137
138 <param name="exclude_types" type="select" label="Exclude Types" multiple="true" optional="True">
139 <help>
140 List of variant types to exclude. Site is excluded if any of the ALT alleles is of the type requested.
141 Types are determined by comparing the REF and ALT alleles in the VCF record.
142 </help>
143 <expand macro="macro_types_options" />
144 </param>
145
146
147 <param name="known_or_novel" type="select" label="filter known or novel ID" optional="true">
148 <option value="--novel">(-k) print novel sites only (ID column is ".")</option>
149 <option value="--known">(-n) print known sites only (ID column is not ".")</option>
150 </param>
151
152 <param name="min_alleles" type="integer" label="Min Alleles" optional="True"
153 help="(-m) Minimum number of alleles listed in REF and ALT (e.g. -m2)" />
154 <param name="max_alleles" type="integer" label="Max Alleles" optional="True"
155 help="(-M) Maximum number of alleles listed in REF and ALT (e.g. -M2 for biallelic sites)" />
156
157 <param name="phased" type="select" label="filter phased" optional="true">
158 <help>
159 Haploid genotypes are considered phased. Missing genotypes considered unphased unless the phased bit is set.
160 </help>
161 <option value="--phased">(-p) print sites where all samples are phased</option>
162 <option value="--exclude-phased">(-P) exclude sites where all samples are phased</option>
163 </param>
164
165 <!-- TODO optional select for type: nref,alt1,minor,major,sum -->
166 <param name="min_af" type="float" label="Min Af" default="nref" optional="True"
167 help="(-q) Minimum frequency for non-reference (nref), 1st alternate (alt1), least frequent (minor), most frequent (major) or sum of all but most frequent (nonmajor) alleles" />
168 <param name="max_af" type="float" label="Max Af" default="nref" optional="True"
169 help="(-Q) Maximum frequency for non-reference (nref), 1st alternate (alt1), least frequent (minor), most frequent (major) or sum of all but most frequent (nonmajor) alleles" />
170
171 <param name="uncalled" type="select" label="filter on genotype uncalled" optional="true">
172 <option value="--uncalled">uncalled - print sites without a called genotype</option>
173 <option value="--exclude-uncalled">exclude-uncalled - exclude sites without a called genotype</option>
174 </param>
175
176 <param name="private" type="select" label="filter on private" optional="true">
177 <help><![CDATA[
178 Private: Where only the subset samples carry an non-reference allele.
179 ( Ignored if samples are not included )
180 ]]></help>
181 <option value="--private">(-x) private - print sites where only the subset samples carry an non-reference allele</option>
182 <option value="--exclude-private">(-X) exclude-private - exclude sites where only the subset samples carry an non-reference allele</option>
183 </param>
184
185 </section>
186
187 <section name="sec_output" expanded="false" title="Output Options">
188 <param name="drop_genotypes" type="boolean" truevalue="--drop-genotypes" falsevalue="" label="Drop Genotypes"
189 help="Drop individual genotype information (after subsetting if -s option set)" />
190 <param name="header" type="select" label="output header" optional="true">
191 <option value="--no-header">(-h) no-header</option>
192 <option value="--header-only">(-H) header-only</option>
193 </param>
194 <param name="compression_level" type="integer" min="0" max="9" label="Compression Level" default="-1" optional="True"
195 help="Compression level: 0 uncompressed, 1 best speed, 9 best compression" />
196 <param name="invert_targets_file" type="boolean" truevalue="^" falsevalue="" label="Invert Targets File"
197 help="Inverts the query/filtering applied by Targets File" />
198 </section>
199 <expand macro="macro_select_output_type" />
200 </inputs>
201 <outputs>
202 <expand macro="macro_vcf_output" />
203 </outputs>
204 <tests>
205 <test>
206 <param name="input_file" ftype="vcf" value="view.vcf" />
207 <param name="min_ac" value="1" />
208 <param name="max_ac" value="1" />
209 <param name="samples" value="NA00002" />
210 <param name="types" value="snps" />
211 <param name="output_type" value="v" />
212 <output name="output_file">
213 <assert_contents>
214 <has_text text="rs2298108" />
215 <not_has_text text="rs6111385" />
216 </assert_contents>
217 </output>
218 </test>
219 <test>
220 <param name="input_file" ftype="vcf" value="view.vcf" />
221 <param name="known_or_novel" value="--novel" />
222 <param name="private" value="--exclude-private" />
223 <param name="samples" value="NA00003" />
224 <param name="regions" value="20,Y" />
225 <param name="output_type" value="v" />
226 <output name="output_file">
227 <assert_contents>
228 <has_text text="8657215" />
229 <not_has_text text="rs6111385" />
230 </assert_contents>
231 </output>
232 </test>
233 <test>
234 <param name="input_file" ftype="vcf" value="view.vcf" />
235 <param name="known_or_novel" value="--known" />
236 <param name="private" value="--exclude-private" />
237 <param name="apply_filters" value="PASS" />
238 <param name="samples" value="NA00003" />
239 <param name="regions" value="20,Y" />
240 <param name="output_type" value="v" />
241 <output name="output_file">
242 <assert_contents>
243 <has_text text="rs6111385" />
244 <not_has_text text="8657215" />
245 </assert_contents>
246 </output>
247 </test>
248 <test>
249 <param name="input_file" ftype="vcf" value="view.vcf" />
250 <param name="private" value="--private" />
251 <param name="samples" value="NA00003" />
252 <param name="output_type" value="v" />
253 <output name="output_file">
254 <assert_contents>
255 <has_text text="rs62584840" />
256 <not_has_text text="8657215" />
257 </assert_contents>
258 </output>
259 </test>
260 <test>
261 <param name="input_file" ftype="vcf" value="view.vcf" />
262 <param name="include" value="QUAL==999 &amp;&amp; (FS&lt;20 || FS&gt;=41.02) &amp;&amp; ICF&gt;-0.1 &amp;&amp; HWE*2&gt;1.2" />
263 <param name="output_type" value="v" />
264 <output name="output_file">
265 <assert_contents>
266 <has_text text="rs5939407" />
267 <not_has_text text="8657215" />
268 </assert_contents>
269 </output>
270 </test>
271 <test>
272 <param name="input_file" ftype="vcf" value="view.vcf" />
273 <param name="phased" value="--phased" />
274 <param name="output_type" value="v" />
275 <output name="output_file">
276 <assert_contents>
277 <has_text text="rs78249411" />
278 <not_has_text text="rs6111385" />
279 </assert_contents>
280 </output>
281 </test>
282 <test>
283 <param name="input_file" ftype="vcf" value="view.vcf" />
284 <param name="phased" value="--exclude-phased" />
285 <param name="output_type" value="v" />
286 <output name="output_file">
287 <assert_contents>
288 <has_text text="rs6111385" />
289 <not_has_text text="rs78249411" />
290 </assert_contents>
291 </output>
292 </test>
293 <test>
294 <param name="input_file" ftype="vcf" value="view.vcf" />
295 <param name="min_alleles" value="2" />
296 <param name="max_alleles" value="2" />
297 <param name="min_af" value="0.3" />
298 <param name="max_af" value="0.7" />
299 <param name="header" value="--header-only" />
300 <param name="output_type" value="v" />
301 <output name="output_file">
302 <assert_contents>
303 <has_text text="##bcftools_viewCommand" />
304 <not_has_text text="rs78249411" />
305 </assert_contents>
306 </output>
307 </test>
308 <test>
309 <param name="input_file" ftype="vcf" value="view.vcf" />
310 <param name="uncalled" value="--uncalled" />
311 <param name="header" value="--no-header" />
312 <param name="output_type" value="v" />
313 <output name="output_file">
314 <assert_contents>
315 <not_has_text text="##bcftools_viewCommand" />
316 <has_text text="5464562" />
317 </assert_contents>
318 </output>
319 </test>
320 <test>
321 <param name="input_file" ftype="vcf" value="view.vcf" />
322 <param name="exclude_types" value="snps" />
323 <param name="drop_genotypes" value="true" />
324 <param name="output_type" value="v" />
325 <output name="output_file">
326 <assert_contents>
327 <not_has_text text="##FORMAT=&lt;ID=GT" />
328 <not_has_text text="rs62584840" />
329 <has_text text="2343543" />
330 </assert_contents>
331 </output>
332 </test>
333 </tests>
334 <help><![CDATA[
335 =====================================
336 bcftools @EXECUTABLE@
337 =====================================
338
339 VCF/BCF conversion, view, subset and filter VCF/BCF files.
340
341 @REGIONS_HELP@
342 @TARGETS_HELP@
343 @EXPRESSIONS_HELP@
344
345 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
346
347 @BCFTOOLS_WIKI@
348 ]]>
349 </help>
350 <expand macro="citations" />
351 </tool>