Mercurial > repos > jjohnson > snpeff
annotate snpSift_filter.xml @ 6:ec16dae84230
Fix tests for SnpSift caseControl and intervals
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Tue, 26 Mar 2013 15:24:30 -0500 |
parents | 192a236898f5 |
children | 13b6ad2ddace |
rev | line source |
---|---|
0 | 1 <tool id="snpSift_filter" name="SnpSift Filter" version="3.1"> |
2 <options sanitize="False" /> | |
3 <description>Filter variants using arbitrary expressions</description> | |
4 <!-- | |
5 You will need to change the path to wherever your installation is. | |
6 You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory) | |
7 java -Xmx6G -jar $JAVA_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile > $output | |
8 --> | |
9 <requirements> | |
10 <requirement type="package" version="3.1">snpEff</requirement> | |
11 </requirements> | |
12 <command> | |
13 java -Xmx6G -jar \$JAVA_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile > $output | |
14 </command> | |
15 <inputs> | |
16 <param format="vcf" name="input" type="data" label="VCF input"/> | |
17 <param name="expr" type="text" label="Expression" size="50"/> | |
18 </inputs> | |
19 <configfiles> | |
20 <configfile name="exprFile"> | |
21 $expr | |
22 </configfile> | |
23 </configfiles> | |
24 | |
25 <outputs> | |
26 <data format="vcf" name="output" /> | |
27 </outputs> | |
28 <stdio> | |
29 <exit_code range=":-1" level="fatal" description="Error: Cannot open file" /> | |
30 <exit_code range="1:" level="fatal" description="Error" /> | |
31 </stdio> | |
5 | 32 |
33 <tests> | |
34 | |
35 <test> | |
36 <param name="input" ftype="vcf" value="test01.vcf"/> | |
37 <param name="expr" value="QUAL >= 50"/> | |
38 <output name="output"> | |
39 <assert_contents> | |
40 <not_has_text text="25967" /> | |
41 <not_has_text text="NT_166464" /> | |
42 </assert_contents> | |
43 </output> | |
44 </test> | |
45 | |
46 <test> | |
47 <param name="input" ftype="vcf" value="test01.vcf"/> | |
48 <param name="expr" value="(CHROM = '19')"/> | |
49 <output name="output"> | |
50 <assert_contents> | |
51 <has_text text="3205820" /> | |
52 <not_has_text text="NT_16" /> | |
53 </assert_contents> | |
54 </output> | |
55 </test> | |
56 | |
57 <test> | |
58 <param name="input" ftype="vcf" value="test01.vcf"/> | |
59 <param name="expr" value="(POS >= 20175 & (POS <= 35549)"/> | |
60 <output name="output"> | |
61 <assert_contents> | |
62 <has_text text="20175" /> | |
63 <has_text text="35549" /> | |
64 <has_text text="22256" /> | |
65 <not_has_text text="18933" /> | |
66 <not_has_text text="37567" /> | |
67 </assert_contents> | |
68 </output> | |
69 </test> | |
70 | |
71 <test> | |
72 <param name="input" ftype="vcf" value="test01.vcf"/> | |
73 <param name="expr" value="( DP >= 5 )"/> | |
74 <output name="output"> | |
75 <assert_contents> | |
76 <has_text text="DP=5;" /> | |
77 <has_text text="DP=6;" /> | |
78 <not_has_text text="DP=1;" /> | |
79 </assert_contents> | |
80 </output> | |
81 </test> | |
82 | |
83 </tests> | |
84 | |
0 | 85 <help> |
86 | |
1 | 87 **SnpSift filter** |
88 | |
89 You can filter ia 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. | |
90 | |
91 Some examples: | |
92 | |
93 - *I want to filter out samples with quality less than 30*: | |
94 | |
95 * **( QUAL > 30 )** | |
96 | |
97 - *...but we also want InDels that have quality 20 or more*: | |
98 | |
99 * **(( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )** | |
0 | 100 |
1 | 101 - *...or any homozygous variant present in more than 3 samples*: |
102 | |
103 * **(countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )** | |
104 | |
105 - *...or any heterozygous sample with coverage 25 or more*: | |
106 | |
4
fe23d90249ee
Remove help error copied wiki: and is single ampersand
Jim Johnson <jj@umn.edu>
parents:
1
diff
changeset
|
107 * **((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )** |
1 | 108 |
109 - *I want to keep samples where the genotype for the first sample is homozygous variant and the genotype for the second sample is reference*: | |
110 | |
111 * **isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] )** | |
112 | |
113 | |
114 For complete details about this tool and epressions that can be used, please go to http://snpeff.sourceforge.net/SnpSift.html#filter | |
0 | 115 |
116 </help> | |
117 </tool> |