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