16
|
1 <tool id="bcftools_view" name="BCFtools view" version="1.0.0">
|
|
2 <description>Convert, view, subset, and filter VCF/BCF files</description>
|
|
3 <command>
|
|
4 #if str( $input_file_index ) != "None":
|
|
5 ln -s -f $input input_file.${input.ext} &&
|
|
6 ln -s -f $input_file_index input_file.${input.ext}.tbi &&
|
|
7 #end if
|
|
8 bcftools view
|
|
9 ${drop_genotypes}
|
|
10 ${header_only}
|
|
11 ${no_header}
|
|
12 --output-file "${output_file}"
|
|
13 --output-type "${output_type}"
|
|
14 #if str( $regions ) != "":
|
|
15 --regions "${regions}"
|
|
16 #end if
|
|
17 #if str( $targets ) != "":
|
|
18 --targets "${targets}"
|
|
19 #end if
|
|
20 #if str( $samples ) != "":
|
|
21 --samples "${samples}"
|
|
22 #end if
|
|
23 #if str( $regions_file ) != "None":
|
|
24 --regions-file "${regions_file}"
|
|
25 #end if
|
|
26 #if str( $targets_file ) != "None":
|
|
27 --targets-file "${targets_file}"
|
|
28 #end if
|
|
29 #if str( $samples_file ) != "None":
|
|
30 --samples-file "${samples_file}"
|
|
31 #end if
|
|
32 #if str( $apply_filters ) != "":
|
|
33 --apply-filters "${apply_filters}"
|
|
34 #end if
|
|
35 #if str( $min_ac_cond.set_min_ac ) == "True":
|
|
36 --min-ac $min_ac_cond.min_ac:$min_ac_cond.min_ac_type
|
|
37 #end if
|
|
38 #if str( $max_ac_cond.set_max_ac ) == "True":
|
|
39 --max-ac $max_ac_cond.max_ac:$max_ac_cond.max_ac_type
|
|
40 #end if
|
|
41 #if str( $min_af_cond.set_min_af ) == "True":
|
|
42 --min-af $min_af_cond.min_af:$min_af_cond.min_af_type
|
|
43 #end if
|
|
44 #if str( $max_af_cond.set_max_af ) == "True":
|
|
45 --max-af $max_af_cond.max_af:$max_af_cond.max_af_type
|
|
46 #end if
|
|
47 #if str( $expr_cond.set_expr ) == "True":
|
|
48 #if str( $expr_cond.include_or_exclude ) == "include":
|
|
49 --include "${expr_cond.expr}"
|
|
50 #else
|
|
51 --exclude "${expr_cond.expr}"
|
|
52 #end if
|
|
53 #end if
|
|
54 #if str( $genotype_cond.set_genotype ) == "True":
|
|
55 #if str( $genotype_cond.include_or_exclude ) == "include":
|
|
56 --genotype $genotype_cond.genotype
|
|
57 #else
|
|
58 --genotype ^$genotype_cond.genotype
|
|
59 #end if
|
|
60 #end if
|
|
61 #if str( $var_type_cond.set_var_type ) == "True":
|
|
62 #if str( $var_type_cond.include_or_exclude ) == "include":
|
|
63 --types $var_type_cond.var_types
|
|
64 #else
|
|
65 --exclude-types $var_type_cond.var_types
|
|
66 #end if
|
|
67 #end if
|
|
68 ${uncalled}
|
|
69 ${exclude_uncalled}
|
|
70 ${private}
|
|
71 ${exclude_private}
|
|
72
|
|
73 #if str( $input_file_index ) != "None":
|
|
74 input_file.${input.ext}
|
|
75 #else
|
|
76 $input
|
|
77 #end if
|
|
78 </command>
|
|
79
|
|
80 <inputs>
|
|
81 <param name="input" type="data" format="vcf,bcf,bgzip" label="VCF or BCF input file" help="Input file can optionally be compressed and indexed using Bgzip and Tabix Galaxy tools. In this case, select bgzipped file here and index below."/>
|
|
82 <param name="input_file_index" type="data" optional="true" label="Input file index" help="Tabix-generated index for input file. Run Tabix Galaxy tool on bgzipped input file to create index."/>
|
|
83 <param name="output_type" type="select" label="Output data type" help="-O">
|
|
84 <option value="v" selected="true">VCF</option>
|
|
85 <option value="b">BCF</option>
|
|
86 </param>
|
|
87 <param name="regions_file" type="data" optional="true" label="Regions file" help="-R. Regions specified in a VCF, BED, or tab-delimited file with columns CHROM, POS, and, optionally, POS_TO."/>
|
|
88 <param name="regions" type="text" size="80" optional="True" label="Regions list" help="-r. Comma-separated list of regions. Format: chr|chr:pos|chr:from-to|chr:from-[,...]">
|
|
89 <sanitizer invalid_char="">
|
|
90 <valid initial="string.digits"><add value="CHRchr-:,"/> </valid>
|
|
91 </sanitizer>
|
|
92 </param>
|
|
93 <param name="targets_file" type="data" optional="true" label="Targets file" help="-T. Targets specified in a VCF, BED, or tab-delimited file with columns CHROM, POS, and, optionally, POS_TO."/>
|
|
94 <param name="targets" type="text" size="80" optional="True" label="Targets list" help="-t. Comma-separated list of targets. Format: [^]chr|chr:pos|chr:from-to|chr:from-[,...]">
|
|
95 <sanitizer invalid_char="">
|
|
96 <valid initial="string.digits"><add value="CHRchr-:,^"/> </valid>
|
|
97 </sanitizer>
|
|
98 </param>
|
|
99 <param name="samples_file" type="data" optional="true" label="Samples file" help="-S. File of sample names to include. One sample per line."/>
|
|
100 <param name="samples" type="text" size="80" optional="True" label="Samples list" help="-s. Comma-separated list of samples to include or exclude. (Excludes if prefixed with ^)" />
|
|
101 <param name="apply_filters" type="text" size="80" optional="True" label="Apply filters" help="-f. Comma-separated list of strings. Keeps only sites where FILTER column contains one of these strings." />
|
|
102 <param name="drop_genotypes" type="boolean" checked="False" truevalue="--drop-genotypes" falsevalue="" label="Drop individual genotype information" help="-G" />
|
|
103 <param name="no_header" type="boolean" checked="False" truevalue="--no-header" falsevalue="" label="Suppress the header in VCF output" help="-H" />
|
|
104 <param name="header_only" type="boolean" checked="False" truevalue="--header-only" falsevalue="" label="Output the VCF header only" help="-h" />
|
|
105 <conditional name="min_ac_cond">
|
|
106 <param name="set_min_ac" type="boolean" checked="False" label="Set minimum allele count" help="-c" />
|
|
107 <when value="true">
|
|
108 <param name="min_ac" type="integer" optional="true" label="Minimum allele count" help="Minimum allele count of sites to be printed, for given allele type." />
|
|
109 <param name="min_ac_type" type="select" label="Allele type">
|
|
110 <option value="nref" selected="True">Non-reference</option>
|
|
111 <option value="alt1">1st alternate</option>
|
|
112 <option value="minor">Minor (least frequent)</option>
|
|
113 <option value="major">Major (most frequent)</option>
|
|
114 <option value="nonmajor">Nonmajor (Sum of all but most frequent)</option>
|
|
115 </param>
|
|
116 </when>
|
|
117 </conditional>
|
|
118 <conditional name="max_ac_cond">
|
|
119 <param name="set_max_ac" type="boolean" checked="False" label="Set maximum allele count" help="-C" />
|
|
120 <when value="true">
|
|
121 <param name="max_ac" type="integer" optional="true" label="Maximum allele count" help="Maximum allele count of sites to be printed, for given allele type." />
|
|
122 <param name="max_ac_type" type="select" label="Allele type">
|
|
123 <option value="nref" selected="True">Non-reference</option>
|
|
124 <option value="alt1">1st alternate</option>
|
|
125 <option value="minor">Minor (least frequent)</option>
|
|
126 <option value="major">Major (most frequent)</option>
|
|
127 <option value="nonmajor">Nonmajor (Sum of all but most frequent)</option>
|
|
128 </param>
|
|
129 </when>
|
|
130 </conditional>
|
|
131
|
|
132 <conditional name="min_af_cond">
|
|
133 <param name="set_min_af" type="boolean" checked="False" label="Set minimum allele frequency" help="-q" />
|
|
134 <when value="true">
|
|
135 <param name="min_af" type="integer" optional="true" label="Minimum allele frequency" help="Minimum allele frequency of sites to be printed, for given allele type." />
|
|
136 <param name="min_af_type" type="select" label="Allele type">
|
|
137 <option value="nref" selected="True">Non-reference</option>
|
|
138 <option value="alt1">1st alternate</option>
|
|
139 <option value="minor">Minor (least frequent)</option>
|
|
140 <option value="major">Major (most frequent)</option>
|
|
141 <option value="nonmajor">Nonmajor (Sum of all but most frequent)</option>
|
|
142 </param>
|
|
143 </when>
|
|
144 </conditional>
|
|
145 <conditional name="max_af_cond">
|
|
146 <param name="set_max_af" type="boolean" checked="False" label="Set maximum allele frequency" help="-Q" />
|
|
147 <when value="true">
|
|
148 <param name="max_af" type="integer" optional="true" label="Maximum allele frequency" help="Maximum allele frequency of sites to be printed, for given allele type." />
|
|
149 <param name="max_af_type" type="select" label="Allele type">
|
|
150 <option value="nref" selected="True">Non-reference</option>
|
|
151 <option value="alt1">1st alternate</option>
|
|
152 <option value="minor">Minor (least frequent)</option>
|
|
153 <option value="major">Major (most frequent)</option>
|
|
154 <option value="nonmajor">Nonmajor (Sum of all but most frequent)</option>
|
|
155 </param>
|
|
156 </when>
|
|
157 </conditional>
|
|
158
|
|
159 <conditional name="genotype_cond">
|
|
160 <param name="set_genotype" type="boolean" checked="False" label="Filter by genotype" help="-g. Include only, or exclude, sites with one or more of given genotype."/>
|
|
161 <when value="true">
|
|
162 <param name="include_or_exclude" type="select" label="Include or exclude by genotype">
|
|
163 <option value="include">Include</option>
|
|
164 <option value="exclude">Exclude</option>
|
|
165 </param>
|
|
166 <param name="genotype" type="select" label="Genotype">
|
|
167 <option value="hom">Homozygous</option>
|
|
168 <option value="het">Heterozygous</option>
|
|
169 <option value="miss">Missing</option>
|
|
170 </param>
|
|
171 </when>
|
|
172 </conditional>
|
|
173
|
|
174 <conditional name="expr_cond">
|
|
175 <param name="set_expr" type="boolean" checked="False" label="Filter by expression" help="-i, -e. Include/ exclude sites for which expression is true. Must use valid expression."/>
|
|
176 <when value="true">
|
|
177 <param name="include_or_exclude" type="select" label="Include or exclude by expression">
|
|
178 <option value="include">Include</option>
|
|
179 <option value="exclude">Exclude</option>
|
|
180 </param>
|
|
181 <param name="expr" type="text" size="80" label="Expression">
|
|
182 <sanitizer invalid_char="">
|
|
183 <valid initial="string.letters,string.digits"><add value="~`!@#$%^&*()-_=+[{]}\|;:'",<.>?/ " /> </valid>
|
|
184 </sanitizer>
|
|
185 </param>
|
|
186 </when>
|
|
187 </conditional>
|
|
188
|
|
189 <conditional name="var_type_cond">
|
|
190 <param name="set_var_type" type="boolean" checked="False" label="Filter by variant type" help="-v, -V. Include/ exclude sites where any ALT allele is one of the given variant types."/>
|
|
191 <when value="true">
|
|
192 <param name="include_or_exclude" type="select" label="Include or exclude by variant type">
|
|
193 <option value="include">Include</option>
|
|
194 <option value="exclude">Exclude</option>
|
|
195 </param>
|
|
196 <param name="var_types" type="select" multiple="true" display="checkboxes" label="Variant type">
|
|
197 <option value="snps">SNPs</option>
|
|
198 <option value="indels">Indels</option>
|
|
199 <option value="mnps">MNPs</option>
|
|
200 <option value="other">Other</option>
|
|
201 </param>
|
|
202 </when>
|
|
203 </conditional>
|
|
204
|
|
205 <param name="uncalled" type="boolean" checked="False" truevalue="--uncalled" falsevalue="" label="Print sites without a called genotype" help="-u" />
|
|
206 <param name="exclude_uncalled" type="boolean" checked="False" truevalue="--exclude-uncalled" falsevalue="" label="Exclude sites without a called genotype" help="-U" />
|
|
207 <param name="private" type="boolean" checked="False" truevalue="--private" falsevalue="" label="Print sites where only the subset samples carry a non-reference allele" help="-x. Requires samples file or samples list."/>
|
|
208 <param name="exclude_private" type="boolean" checked="False" truevalue="--exclude-private" falsevalue="" label="Exclude sites where only the subset samples carry a non-reference allele" help="-X. Requires samples file or samples list."/>
|
|
209 </inputs>
|
|
210 <outputs>
|
|
211 <data name="output_file" format="vcf" label="${tool.name} on ${on_string}">
|
|
212 <change_format>
|
|
213 <when input="output_type" value="b" format="bcf" />
|
|
214 </change_format>
|
|
215 </data>
|
|
216 </outputs>
|
|
217 <help>
|
|
218 **About this tool**
|
|
219
|
|
220 **BCFtools view**: View, subset and filter VCF or BCF files by position and filtering expression. Convert between VCF and BCF. Former bcftools subset.
|
|
221
|
|
222 Please see https://samtools.github.io/bcftools/bcftools.html for more info on options.
|
|
223 </help>
|
|
224 </tool>
|