comparison bcftools_filter.xml @ 0:061729be105d 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:03:12 -0400
parents
children 6981feb1d742
comparison
equal deleted inserted replaced
-1:000000000000 0:061729be105d
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
3 <description>Apply fixed-threshold filters</description>
4 <macros>
5 <token name="@EXECUTABLE@">filter</token>
6 <import>macros.xml</import>
7 </macros>
8 <expand macro="requirements" />
9 <expand macro="version_command" />
10 <command detect_errors="aggressive"><![CDATA[
11 @PREPARE_ENV@
12 @PREPARE_INPUT_FILE@
13 #set $section = $sec_restrict
14 @PREPARE_TARGETS_FILE@
15
16 bcftools @EXECUTABLE@
17
18 ## Filter section
19 #set $section = $sec_filter
20 #if $section.SnpGap:
21 --SnpGap "${section.SnpGap}"
22 #end if
23 #if $section.IndelGap:
24 --IndelGap "${section.IndelGap}"
25 #end if
26 #if $section.mode:
27 #set $mode = str($section.mode).replace(',','')
28 --mode '$mode'
29 #end if
30 #if $section.soft_filter:
31 --soft-filter "${section.soft_filter}"
32 #end if
33 #if $section.select_set_GTs:
34 --set-GTs "${section.select_set_GTs}"
35 #end if
36
37 #set $section = $sec_restrict
38 @REGIONS@
39 @TARGETS@
40 @INCLUDE@
41 @EXCLUDE@
42
43 @OUTPUT_TYPE@
44 @THREADS@
45
46 ## Primary Input/Outputs
47 @INPUT_FILE@
48 > "$output_file"
49 ]]>
50 </command>
51 <inputs>
52 <expand macro="macro_input" />
53 <section name="sec_restrict" expanded="false" title="Restrict to">
54 <expand macro="macro_regions" />
55 <expand macro="macro_targets" />
56 <expand macro="macro_include" />
57 <expand macro="macro_exclude" />
58 </section>
59 <section name="sec_filter" expanded="false" title="Filter Options">
60 <param name="SnpGap" type="integer" label="Snpgap" optional="True" help="(-g) Filter SNPs within &lt;int&gt; base pairs of an indel" />
61 <param name="IndelGap" type="integer" label="Indelgap" optional="True" help="(-G) Filter clusters of indels separated by &lt;int&gt; or fewer base pairs allowing only one to pass" />
62 <param name="mode" type="select" label="Mode FILTER annotation" optional="true" multiple="true" display="checkboxes">
63 <help>(-m)
64 The default mode replaces existing filters of failed sites with a new FILTER string
65 while leaving sites which pass untouched when non-empty
66 and setting to "PASS" when the FILTER string is absent.
67 </help>
68 <option value="+">(+) append new FILTER strings of failed sites instead of replacing them</option>
69 <option value="x">(x) resets filters of sites which pass to "PASS"</option>
70 </param>
71 <param name="soft_filter" type="text" value="" label="Soft Filter" optional="true">
72 <help><![CDATA[ (-s)
73 Annotate FILTER column with STRING or, with +, a unique filter name generated by the program ("Filter%d").
74 ]]></help>
75 </param>
76 <param name="select_set_GTs" type="select" ladel="Set genotypes of failed samples" optional="true" help="(-S)">
77 <option value=".">to missing (.)</option>
78 <option value="0">to REF (0)</option>
79 </param>
80 </section>
81 <expand macro="macro_select_output_type" />
82 </inputs>
83 <outputs>
84 <expand macro="macro_vcf_output"/>
85 </outputs>
86 <tests>
87 <test>
88 <param name="input_file" ftype="vcf" value="filter.1.vcf" />
89 <param name="mode" value="x" />
90 <param name="SnpGap" value="2" />
91 <param name="IndelGap" value="2" />
92 <param name="output_type" value="v" />
93 <output name="output_file">
94 <assert_contents>
95 <has_text text="PASS" />
96 <not_has_text text="1006" />
97 </assert_contents>
98 </output>
99 </test>
100 <test>
101 <param name="input_file" ftype="vcf" value="filter.2.vcf" />
102 <param name="exclude" value="QUAL==59.2 || (INDEL=0 &amp; (FMT/GQ=25 | FMT/DP=10))" />
103 <param name="soft_filter" value="Modified" />
104 <param name="select_set_GTs" value="." />
105 <param name="output_type" value="v" />
106 <output name="output_file">
107 <assert_contents>
108 <has_text text="Modified" />
109 <has_text text="AN=2;AC=1" />
110 <has_text_matching expression="TAAAA\tTA,T\t61.5\tModified" />
111 </assert_contents>
112 </output>
113 </test>
114 <test>
115 <param name="input_file" ftype="vcf" value="filter.3.vcf" />
116 <param name="exclude" value="DP=19" />
117 <param name="output_type" value="v" />
118 <output name="output_file">
119 <assert_contents>
120 <not_has_text text="3162006" />
121 <has_text text="3162007" />
122 </assert_contents>
123 </output>
124 </test>
125
126 <test>
127 <param name="input_file" ftype="vcf" value="filter.3.vcf" />
128 <param name="exclude" value="DP=19" />
129 <param name="soft_filter" value="XX" />
130 <param name="output_type" value="v" />
131 <output name="output_file">
132 <assert_contents>
133 <has_text_matching expression="\tXX\tDP=19" />
134 <has_text_matching expression="\tq20\tAO" />
135 </assert_contents>
136 </output>
137 </test>
138 <test>
139 <param name="input_file" ftype="vcf" value="filter.3.vcf" />
140 <param name="exclude" value="DP=19" />
141 <param name="soft_filter" value="XX" />
142 <param name="mode" value="+" />
143 <param name="output_type" value="v" />
144 <output name="output_file">
145 <assert_contents>
146 <has_text_matching expression="\tq20;XX\tDP=19" />
147 <has_text_matching expression="\tq20\tAO" />
148 </assert_contents>
149 </output>
150 </test>
151 <test>
152 <param name="input_file" ftype="vcf" value="filter.3.vcf" />
153 <param name="exclude" value="DP=19" />
154 <param name="soft_filter" value="XX" />
155 <param name="mode" value="x" />
156 <param name="output_type" value="v" />
157 <output name="output_file">
158 <assert_contents>
159 <has_text_matching expression="\tXX\tDP=19" />
160 <has_text_matching expression="\tPASS\tAO" />
161 </assert_contents>
162 </output>
163 </test>
164 <test>
165 <param name="input_file" ftype="vcf" value="filter.3.vcf" />
166 <param name="exclude" value="DP=19" />
167 <param name="soft_filter" value="XX" />
168 <param name="mode" value="+,x" />
169 <param name="output_type" value="v" />
170 <output name="output_file">
171 <assert_contents>
172 <has_text_matching expression="\tq20;XX\tDP=19" />
173 <has_text_matching expression="\tPASS\tAO" />
174 </assert_contents>
175 </output>
176 </test>
177 <test>
178 <param name="input_file" ftype="vcf" value="filter.3.vcf" />
179 <param name="exclude" value="FMT/GT=&quot;0/2&quot;" />
180 <param name="output_type" value="v" />
181 <output name="output_file">
182 <assert_contents>
183 <not_has_text text="3162006" />
184 <has_text text="3162007" />
185 </assert_contents>
186 </output>
187 </test>
188 <test>
189 <param name="input_file" ftype="vcf" value="filter.2.vcf" />
190 <param name="include" value="FMT/GT=&quot;0/0&quot; &amp;&amp; AC[*]=2" />
191 <param name="output_type" value="v" />
192 <output name="output_file">
193 <assert_contents>
194 <has_text text="AN=4;AC=2" />
195 <not_has_text text="AN=4;AC=0" />
196 </assert_contents>
197 </output>
198 </test>
199 </tests>
200 <help><![CDATA[
201 =====================================
202 bcftools @EXECUTABLE@
203 =====================================
204
205 Apply fixed-threshold filters.
206
207 @REGIONS_HELP@
208 @TARGETS_HELP@
209 @EXPRESSIONS_HELP@
210
211
212 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
213
214 @BCFTOOLS_WIKI@
215 ]]>
216 </help>
217 <expand macro="citations" />
218 </tool>