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