comparison snpSift_filter.xml @ 3:20c7d583fec1 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit fbc18d9128669e461e76ed13307ee88dd774afa5
author iuc
date Mon, 12 Jun 2017 10:25:32 -0400
parents bf8c1526871b
children 09d6806c609e
comparison
equal deleted inserted replaced
2:bf8c1526871b 3:20c7d583fec1
1 <tool id="snpSift_filter" name="SnpSift Filter" version="@WRAPPER_VERSION@.1"> 1 <tool id="snpSift_filter" name="SnpSift Filter" version="@WRAPPER_VERSION@.0">
2 <description>Filter variants using arbitrary expressions</description> 2 <description>Filter variants using arbitrary expressions</description>
3 <macros> 3 <macros>
4 <import>snpSift_macros.xml</import> 4 <import>snpSift_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements" /> 6 <expand macro="requirements" />
7 <expand macro="stdio" /> 7 <expand macro="stdio" />
8 <expand macro="version_command" /> 8 <expand macro="version_command" />
9
10 <command><![CDATA[ 9 <command><![CDATA[
11 @CONDA_SNPSIFT_JAR_PATH@ && 10 SnpSift -Xmx6G filter -f '$input' -e '$exprFile' $inverse
12 java -Xmx6G -jar "\$SNPSIFT_JAR_PATH/SnpSift.jar" filter -f "$input" -e "$exprFile" $inverse 11 #if $filtering.mode == 'field':
13 #if $filtering.mode == 'field': 12 #if $filtering.replace.pass:
14 #if $filtering.replace.pass: 13 --pass
15 --pass 14 #if $filtering.replace.filterId.strip():
16 #if $filtering.replace.filterId and len(str($filtering.replace.filterId).strip()) > 0: 15 --filterId '$filtering.replace.filterId'
17 --filterId "$filtering.replace.filterId"
18 #end if
19 #end if
20 #if $filtering.addFilter and len(str($filtering.addFilter).strip()) > 0:
21 --addFilter "$filtering.addFilter"
22 #end if
23 #if $filtering.rmFilter and len(str($filtering.rmFilter).strip()) > 0:
24 --rmFilter "$filtering.rmFilter"
25 #end if
26 #end if 16 #end if
27 > "$output" 17 #end if
28 ]]> 18 #if $filtering.addFilter.strip():
29 </command> 19 --addFilter '$filtering.addFilter'
20 #end if
21 #if $filtering.rmFilter.strip():
22 --rmFilter '$filtering.rmFilter'
23 #end if
24 #end if
25 > '$output'
26 ]]></command>
30 <configfiles> 27 <configfiles>
31 <configfile name="exprFile"> 28 <configfile name="exprFile">
32 $expr#slurp 29 $expr#slurp
33 </configfile> 30 </configfile>
34 </configfiles> 31 </configfiles>
35 <inputs> 32 <inputs>
36 <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/> 33 <param name="input" type="data" format="vcf" label="Variant input file in VCF format"/>
37 <param name="expr" type="text" label="Filter criteria" help="Need help? See below a few examples." > 34 <param name="expr" type="text" label="Filter criteria" help="Need help? See below a few examples">
38 <sanitizer sanitize="False"/> 35 <sanitizer sanitize="False"/>
39 </param> 36 </param>
40 <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" /> 37 <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" />
41 <conditional name="filtering"> 38 <conditional name="filtering">
42 <param name="mode" type="select" label="Filter mode"> 39 <param name="mode" type="select" label="Filter mode">
45 </param> 42 </param>
46 <when value="entries"/> 43 <when value="entries"/>
47 <when value="field"> 44 <when value="field">
48 <conditional name="replace"> 45 <conditional name="replace">
49 <param name="pass" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Set matching entry FILTER to 'PASS'" 46 <param name="pass" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Set matching entry FILTER to 'PASS'"
50 help="appends an ID tag to non-matching entry FILTER "/> 47 help="appends an ID tag to non-matching entry FILTER" />
51 <when value="no"/> 48 <when value="no"/>
52 <when value="yes"> 49 <when value="yes">
53 <param name="filterId" type="text" value="" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)." help="Default ID is 'SnpSift'"/> 50 <param name="filterId" type="text" value="" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)" help="Default ID is 'SnpSift'"/>
54 </when> 51 </when>
55 </conditional> 52 </conditional>
56 <param name="addFilter" type="text" value="" label="Add a string to FILTER VCF field if 'expression' is true." /> 53 <param name="addFilter" type="text" value="" label="Add a string to FILTER VCF field if 'expression' is true" />
57 <param name="rmFilter" type="text" value="" label="Remove a string from FILTER VCF field if 'expression' is true (and 'str' is in the field)." /> 54 <param name="rmFilter" type="text" value="" label="Remove a string from FILTER VCF field if 'expression' is true (and 'str' is in the field)" />
58 </when> 55 </when>
59 </conditional> 56 </conditional>
60 </inputs> 57 </inputs>
61 58
62 <outputs> 59 <outputs>
63 <data format="vcf" name="output" /> 60 <data name="output" format="vcf" />
64 </outputs> 61 </outputs>
65 <tests> 62 <tests>
66 <test> 63 <test>
67 <param name="input" ftype="vcf" value="test01.vcf"/> 64 <param name="input" ftype="vcf" value="test01.vcf"/>
68 <param name="expr" value="QUAL >= 50"/> 65 <param name="expr" value="QUAL >= 50"/>
114 </assert_contents> 111 </assert_contents>
115 </output> 112 </output>
116 </test> 113 </test>
117 </tests> 114 </tests>
118 <help><![CDATA[ 115 <help><![CDATA[
119
120 **SnpSift filter** 116 **SnpSift filter**
121 117
122 You can filter a VCF file using arbitrary expressions, for instance "(QUAL > 30) | (exists INDEL) | ( countHet() > 2 )". The actual expressions can be quite complex, so it allows for a lot of flexibility. 118 You can filter a VCF file using arbitrary expressions, for instance "(QUAL > 30) | (exists INDEL) | ( countHet() > 2 )". The actual expressions can be quite complex, so it allows for a lot of flexibility.
123 119
124 Some examples: 120 Some examples:
125 121
126 - *I want just the variants from the second million bases of chr1*: 122 - *I want just the variants from the second million bases of chr1*::
127 123
128 :: 124 ( CHROM = 'chr1' ) & ( POS > 1000000 ) & ( POS < 2000000 )
129 125
130 ( CHROM = 'chr1' ) & ( POS > 1000000 ) & ( POS < 2000000 ) 126 - *Filter value is either 'PASS' or it is missing*::
131 127
132 - *Filter value is either 'PASS' or it is missing*: 128 (FILTER = 'PASS') | ( na FILTER )
133 129
134 :: 130 - *I want to filter lines with an ANN annotation EFFECT of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*::
135 131
136 (FILTER = 'PASS') | ( na FILTER ) 132 ( ANN[*].EFFECT has 'frameshift_variant' )
137 133
138 - *I want to filter lines with an ANN annotation EFFECT of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*: 134 **Important** According to the specification, there can be more than one EFFECT separated by & (e.g. 'missense_variant&splice_region_variant', thus using has operator is better than using equality operator (=). For instance 'missense_variant&splice_region_variant' = 'missense_variant' is false, whereas 'missense_variant&splice_region_variant' has 'missense_variant' is true.
139 135
140 :: 136 - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*::
141 137
142 ( ANN[*].EFFECT has 'frameshift_variant' ) 138 ( EFF[*].EFFECT = 'FRAME_SHIFT' )
143 139
144 **Important** According to the specification, there can be more than one EFFECT separated by & (e.g. 'missense_variant&splice_region_variant', thus using has operator is better than using equality operator (=). For instance 'missense_variant&splice_region_variant' = 'missense_variant' is false, whereas 'missense_variant&splice_region_variant' has 'missense_variant' is true. 140 - *I want to filter out samples with quality less than 30*::
145 141
146 - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*: 142 ( QUAL > 30 )
147 143
148 :: 144 - *...but we also want InDels that have quality 20 or more*::
149 145
150 ( EFF[*].EFFECT = 'FRAME_SHIFT' ) 146 (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
151 147
152 - *I want to filter out samples with quality less than 30*: 148 - *...or any homozygous variant present in more than 3 samples*::
153 149
154 :: 150 (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
155 151
156 ( QUAL > 30 ) 152 - *...or any heterozygous sample with coverage 25 or more*::
157 153
158 - *...but we also want InDels that have quality 20 or more*: 154 ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
159 155
160 :: 156 - *I want to keep samples where the genotype for the first sample is homozygous variant and the genotype for the second sample is reference*::
161 157
162 (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) 158 (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] ))
163
164 - *...or any homozygous variant present in more than 3 samples*:
165
166 ::
167
168 (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
169
170 - *...or any heterozygous sample with coverage 25 or more*:
171
172 ::
173
174 ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
175
176 - *I want to keep samples where the genotype for the first sample is homozygous variant and the genotype for the second sample is reference*:
177
178 ::
179
180 (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] ))
181
182 159
183 **For information regarding HGVS and Sequence Ontology terms versus classic names**: 160 **For information regarding HGVS and Sequence Ontology terms versus classic names**:
184 161
185 - http://snpeff.sourceforge.net/SnpEff_manual.html#cmdline for the options: -classic, -hgvs, and -sequenceOntology 162 - http://snpeff.sourceforge.net/SnpEff_manual.html#cmdline for the options: -classic, -hgvs, and -sequenceOntology
186 - http://snpeff.sourceforge.net/SnpEff_manual.html#input for the table containing the classic name and sequence onology term for each effect 163 - http://snpeff.sourceforge.net/SnpEff_manual.html#input for the table containing the classic name and sequence onology term for each effect
187
188 164
189 @EXTERNAL_DOCUMENTATION@ 165 @EXTERNAL_DOCUMENTATION@
190 http://snpeff.sourceforge.net/SnpSift.html#filter 166 - http://snpeff.sourceforge.net/SnpSift.html#filter
191 167 ]]></help>
192 ]]>
193 </help>
194 <expand macro="citations" /> 168 <expand macro="citations" />
195 </tool> 169 </tool>