annotate snpSift_filter.xml @ 6:824f78c0d0df

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 915e0f28e6bc2701ca8f333d7b30cf399cd6e9da-dirty
author jjohnson
date Mon, 25 Jan 2016 17:40:56 -0500
parents baf6602903e1
children c29f29a6f26c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
1 <tool id="snpSift_filter" name="SnpSift Filter" version="@WRAPPER_VERSION@.0">
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
2 <options sanitize="False" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
3 <description>Filter variants using arbitrary expressions</description>
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
4 <macros>
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
5 <import>snpSift_macros.xml</import>
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
6 </macros>
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
7 <expand macro="requirements" />
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
8 <expand macro="stdio" />
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
9 <expand macro="version_command" />
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
10 <command><![CDATA[
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
11 java -Xmx6G -jar \$SNPEFF_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile $inverse
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
12 #if $filtering.mode == 'field':
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
13 #if $filtering.replace.pass:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
14 --pass
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
15 #if $filtering.replace.filterId and len($filtering.replace.filterId.__str__.strip()) > 0:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
16 --filterId "$filtering.replace.filterId"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
17 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
18 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
19 #if $filtering.addFilter and len($filtering.addFilter.__str__.strip()) > 0:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
20 --addFilter "$filtering.addFilter"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
21 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
22 #if $filtering.rmFilter and len($filtering.rmFilter.__str__.strip()) > 0:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
23 --rmFilter "$filtering.rmFilter"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
24 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
25 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
26 > $output
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
27 ]]>
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
28 </command>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
29 <inputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
30 <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
6
824f78c0d0df planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 915e0f28e6bc2701ca8f333d7b30cf399cd6e9da-dirty
jjohnson
parents: 4
diff changeset
31 <param name="expr" type="text" label="Filter criteria" help="Need help? See below a few examples." />
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
32 <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
33 <conditional name="filtering">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
34 <param name="mode" type="select" label="Filter mode">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
35 <option value="entries" selected="true">Retain entries that pass filter, remove other entries</option>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
36 <option value="field">Change the FILTER field, but retain all entries</option>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
37 </param>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
38 <when value="entries"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
39 <when value="field">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
40 <conditional name="replace">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
41 <param name="pass" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Set matching entry FILTER to 'PASS'"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
42 help="appends an ID tag to non-matching entry FILTER "/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
43 <when value="no"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
44 <when value="yes">
6
824f78c0d0df planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 915e0f28e6bc2701ca8f333d7b30cf399cd6e9da-dirty
jjohnson
parents: 4
diff changeset
45 <param name="filterId" type="text" value="" optional="true" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)."
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
46 help="Default ID is 'SnpSift'"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
47 </when>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
48 </conditional>
6
824f78c0d0df planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 915e0f28e6bc2701ca8f333d7b30cf399cd6e9da-dirty
jjohnson
parents: 4
diff changeset
49 <param name="addFilter" type="text" value="" optional="true" label="Add a string to FILTER VCF field if 'expression' is true." />
824f78c0d0df planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 915e0f28e6bc2701ca8f333d7b30cf399cd6e9da-dirty
jjohnson
parents: 4
diff changeset
50 <param name="rmFilter" type="text" value="" optional="true" label="Remove a string from FILTER VCF field if 'expression' is true (and 'str' is in the field)." />
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
51 </when>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
52 </conditional>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
53 </inputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
54 <configfiles>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
55 <configfile name="exprFile">
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
56 $expr#slurp
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
57 </configfile>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
58 </configfiles>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
59
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
60 <outputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
61 <data format="vcf" name="output" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
62 </outputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
63 <tests>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
64 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
65 <param name="input" ftype="vcf" value="test01.vcf"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
66 <param name="expr" value="QUAL >= 50"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
67 <param name="mode" value="entries"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
68 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
69 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
70 <has_text text="28837706" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
71 <not_has_text text="NT_166464" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
72 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
73 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
74 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
75
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
76 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
77 <param name="input" ftype="vcf" value="test01.vcf"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
78 <param name="expr" value="(CHROM = '19')"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
79 <param name="mode" value="entries"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
80 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
81 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
82 <has_text text="3205820" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
83 <not_has_text text="NT_16" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
84 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
85 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
86 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
87
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
88 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
89 <param name="input" ftype="vcf" value="test01.vcf"/>
6
824f78c0d0df planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 915e0f28e6bc2701ca8f333d7b30cf399cd6e9da-dirty
jjohnson
parents: 4
diff changeset
90 <param name="expr" value="(POS >= 20175) &amp; (POS &lt; 35549)"/>
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
91 <param name="mode" value="entries"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
92 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
93 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
94 <has_text text="20175" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
95 <has_text text="35549" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
96 <has_text text="22256" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
97 <not_has_text text="18933" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
98 <not_has_text text="37567" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
99 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
100 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
101 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
102
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
103 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
104 <param name="input" ftype="vcf" value="test01.vcf"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
105 <param name="expr" value="( DP >= 5 )"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
106 <param name="mode" value="entries"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
107 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
108 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
109 <has_text text="DP=5;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
110 <has_text text="DP=6;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
111 <not_has_text text="DP=1;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
112 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
113 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
114 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
115 </tests>
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
116 <help><![CDATA[
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
117
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
118 **SnpSift filter**
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
119
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
120 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.
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
121
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
122 Some examples:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
123
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
124 - *I want just the variants from the second million bases of chr1*:
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
125
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
126 ::
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
127
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
128 ( CHROM = 'chr1' ) & ( POS > 1000000 ) & ( POS < 2000000 )
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
129
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
130 - *Filter value is either 'PASS' or it is missing*:
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
131
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
132 ::
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
133
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
134 (FILTER = 'PASS') | ( na FILTER )
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
135
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
136 - *I want to filter lines with an ANN annotation EFFECT of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*:
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
137
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
138 ::
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
139
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
140 ( ANN[*].EFFECT has 'frameshift_variant' )
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
141
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
142 **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.
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
143
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
144 - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*:
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
145
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
146 ::
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
147
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
148 ( EFF[*].EFFECT = 'FRAME_SHIFT' )
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
149
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
150 - *I want to filter out samples with quality less than 30*:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
151
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
152 ::
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
153
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
154 ( QUAL > 30 )
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
155
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
156 - *...but we also want InDels that have quality 20 or more*:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
157
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
158 ::
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
159
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
160 (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
161
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
162 - *...or any homozygous variant present in more than 3 samples*:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
163
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
164 ::
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
165
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
166 (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
167
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
168 - *...or any heterozygous sample with coverage 25 or more*:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
169
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
170 ::
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
171
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
172 ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
173
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
174 - *I want to keep samples where the genotype for the first sample is homozygous variant and the genotype for the second sample is reference*:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
175
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
176 ::
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
177
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
178 (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] ))
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
179
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
180
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
181 **For information regarding HGVS and Sequence Ontology terms versus classic names**:
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
182
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
183 - http://snpeff.sourceforge.net/SnpEff_manual.html#cmdline for the options: -classic, -hgvs, and -sequenceOntology
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
184 - http://snpeff.sourceforge.net/SnpEff_manual.html#input for the table containing the classic name and sequence onology term for each effect
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
185
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
186
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
187 @EXTERNAL_DOCUMENTATION@
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
188 http://snpeff.sourceforge.net/SnpSift.html#filter
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
189
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
190 @CITATION_SECTION@
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
191
4
baf6602903e1 Uploaded
jjohnson
parents: 1
diff changeset
192 ]]>
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
193 </help>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
194 </tool>