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