comparison bcftools_filter.xml @ 11:4c0acb64c5fc draft

Uploaded
author wrtz
date Thu, 14 Jan 2016 17:50:35 -0500
parents
children 364f800a211a
comparison
equal deleted inserted replaced
10:e32ce96a0e30 11:4c0acb64c5fc
1 <tool id="bcftools_filter" name="BCFtools filter" version="1.0.0">
2 <description>Apply fixed-threshold filters</description>
3 <command>
4 #if str( $input_file_index ) != "None":
5 ln -s -f $input input_file.${input.ext} &amp;&amp;
6 ln -s -f $input_file_index input_file.${input.ext}.tbi &amp;&amp;
7 #end if
8
9 bcftools filter
10 --output "${output_file}"
11 --output-type "${output_type}"
12 #if str( $regions_file ) != "None":
13 --regions-file "${regions_file}"
14 #end if
15 #if str( $regions ) != "":
16 --regions "${regions}"
17 #end if
18 #if str( $targets_file ) != "None":
19 --targets-file "${targets_file}"
20 #end if
21 #if str( $targets ) != "":
22 --targets "${targets}"
23 #end if
24 #if str( $expr_cond.set_expr ) == "True":
25 #if str( $expr_cond.include_or_exclude ) == "include":
26 --include "${expr_cond.expr}"
27 #else
28 --exclude "${expr_cond.expr}"
29 #end if
30 #end if
31 #if str( $mode_plus ) == "true":
32 #if str( $mode_x ) == "true":
33 --mode +x
34 #else
35 --mode +
36 #end if
37 #elif str( $mode_x ) == "true"
38 --mode x
39 #end if
40 #if str( $soft_filter_cond.set_soft_filter ) == "True":
41 #if str( $soft_filter_cond.string_or_plus_cond.string_or_plus ) == "use_plus":
42 --soft-filter +
43 #else
44 --soft-filter "${soft_filter_cond.string_or_plus_cond.str}"
45 #end if
46 #end if
47 #if str( $set_gts_cond.set_gts ) == "True":
48 #if str( $set_gts_cond.gts ) == "period":
49 --set-GTs .
50 #else
51 --set-GTs 0
52 #end if
53 #end if
54
55 #if str( $input_file_index ) != "None":
56 input_file.${input.ext}
57 #else
58 $input
59 #end if
60 </command>
61 <inputs>
62 <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."/>
63 <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."/>
64 <param name="output_type" type="select" label="Output data type">
65 <option value="v" selected="true">VCF</option>
66 <option value="b">BCF</option>
67 </param>
68 <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."/>
69 <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-[,...]">
70 <sanitizer invalid_char="">
71 <valid initial="string.digits"><add value="CHRchr-:,"/> </valid>
72 </sanitizer>
73 </param>
74 <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."/>
75 <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-[,...]">
76 <sanitizer invalid_char="">
77 <valid initial="string.digits"><add value="CHRchr-:,^"/> </valid>
78 </sanitizer>
79 </param>
80 <conditional name="expr_cond">
81 <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."/>
82 <when value="true">
83 <param name="include_or_exclude" type="select" label="Include or exclude by expression">
84 <option value="include">Include</option>
85 <option value="exclude">Exclude</option>
86 </param>
87 <param name="expr" type="text" size="80" label="Expression">
88 <sanitizer invalid_char="">
89 <valid initial="string.letters,string.digits"><add value="~`!@#$%^&amp;*()-_=+[{]}\|;:'&quot;,&lt;.&gt;?/ " /> </valid>
90 </sanitizer>
91 </param>
92 </when>
93 </conditional>
94 <param name="mode_x" type="boolean" checked="False" label="For sites that pass filter, reset filter to &quot;PASS&quot;" help="-m x. Default: When FILTER string is empty, set filter to &quot;PASS&quot;. Do not change FILTER string otherwise."/>
95 <param name="mode_plus" type="boolean" checked="False" label="For sites that fail filter, append new FILTER string to existing FILTER string" help="-m +. Default: Replace existing FILTER string with new FILTER string."/>
96 <conditional name="soft_filter_cond">
97 <param name="set_soft_filter" type="boolean" checked="False" label="Annotate FILTER column" help="-s"/>
98 <when value="true">
99 <conditional name="string_or_plus_cond">
100 <param name="string_or_plus" type="select" label="Annotation string">
101 <option value="use_plus" selected="true">Annotate with a pre-generated unique string (&quot;Filter1&quot;, &quot;Filter2&quot;, etc.)</option>
102 <option value="use_str">Choose annotation string</option>
103 </param>
104 <when value="use_str">
105 <param name="str" type="text" size="80" label="String to annotate with" />
106 </when>
107 </conditional>
108 </when>
109 </conditional>
110 <conditional name="set_gts_cond">
111 <param name="set_gts" type="boolean" checked="False" label="Set genotype of samples that fail filter" help="-S"/>
112 <when value="true">
113 <param name="gts" type="select" label="Genotype of failed samples">
114 <option value="period" selected="true">.</option>
115 <option value="ref_allele">Reference allele</option>
116 </param>
117 </when>
118 </conditional>
119 </inputs>
120 <outputs>
121 <data name="output_file" format="vcf" label="${tool.name} on ${on_string}">
122 <change_format>
123 <when input="output_type" value="b" format="bcf" />
124 </change_format>
125 </data>
126 </outputs>
127 <help>
128 **About this tool**
129
130 **BCFtools filter**: Apply fixed-threshold filters.
131
132 Please see https://samtools.github.io/bcftools/bcftools.html for more info on options.
133 </help>
134 </tool>