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