annotate snpSift_caseControl.xml @ 3:1739678def32

Add vcfCheck and test cases
author Jim Johnson <jj@umn.edu>
date Thu, 23 Oct 2014 06:06:25 -0500
parents 796388c291d3
children baf6602903e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
796388c291d3 Update for snpeff version 4.0
Jim Johnson <jj@umn.edu>
parents: 0
diff changeset
1 <tool id="snpSift_caseControl" name="SnpSift CaseControl" version="4.0.0">
0
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
2 <description>Count samples are in 'case' and 'control' groups.</description>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
3 <!--
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
4 You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
5 -->
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
6 <expand macro="requirements" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
7 <macros>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
8 <import>snpEff_macros.xml</import>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
9 </macros>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
10 <command>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
11 java -Xmx1G -jar \$SNPEFF_JAR_PATH/SnpSift.jar caseControl -q
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
12 #if $name.__str__.strip() != '':
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
13 -name $name
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
14 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
15 #if $ctrl.ctrl_src == 'caseString':
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
16 '$ctrl.caseControlStr'
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
17 #else
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
18 -tfam "$ctrl.tfam"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
19 #end if
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
20 $input > $output
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
21 </command>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
22 <inputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
23 <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
24 <conditional name="ctrl">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
25 <param name="ctrl_src" type="select" label="Case Control defined in">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
26 <option value="caseString">Case Control String</option>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
27 <option value="tfam">TFAM file</option>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
28 </param>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
29 <when value="caseString">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
30 <param name="caseControlStr" type="text" label="Case / Control column designation" size="50">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
31 <help>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
32 Case and control are defined by a string containing plus and minus symbols {'+', '-', '0'} where '+' is case, '-' is control and '0' is neutral
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
33 </help>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
34 <validator type="regex" message="must be only plus(+), minus(-), or zero(0) characters">[+-0]+</validator>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
35 </param>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
36 </when>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
37 <when value="tfam">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
38 <param format="tabular" name="tfam" type="data" label="PLINK TFAM file" help="Read more about TFAM at http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#tr"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
39 </when>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
40 </conditional>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
41 <param name="name" type="text" optional="true" label="name" help="name to append to the 'Cases' or 'Controls' tags">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
42 <validator type="regex" message="Use only valid ID characters">[_a-zA-Z0-9]+</validator>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
43 </param>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
44 </inputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
45 <outputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
46 <data format="vcf" name="output" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
47 </outputs>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
48 <expand macro="stdio" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
49 <tests>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
50 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
51 <param name="input" ftype="vcf" value="test.private.01.vcf"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
52 <param name="ctrl_src" value="caseString"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
53 <param name="caseControlStr" value="--"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
54 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
55 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
56 <has_text text="Cases=0,0,0;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
57 <has_text text="Controls=0,0,0;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
58 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
59 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
60 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
61
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
62 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
63 <param name="input" ftype="vcf" value="test.private.02.vcf"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
64 <param name="ctrl_src" value="caseString"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
65 <param name="caseControlStr" value="--"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
66 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
67 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
68 <has_text text="Cases=0,0,0;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
69 <has_text text="Controls=2,0,4;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
70 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
71 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
72 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
73
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
74 <test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
75 <param name="input" ftype="vcf" value="test.private.02.vcf"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
76 <param name="name" value=""/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
77 <param name="ctrl_src" value="caseString"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
78 <param name="caseControlStr" value="-+"/>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
79 <output name="output">
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
80 <assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
81 <has_text text="Cases=1,0,2;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
82 <has_text text="Controls=1,0,2;" />
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
83 </assert_contents>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
84 </output>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
85 </test>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
86 </tests>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
87 <help>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
88
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
89 **SnpSift CaseControl**
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
90
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
91 Allows you to count how many samples are in 'case' group and a 'control' group. You can count 'homozygous', 'heterozygous' or 'any' variants.
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
92
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
93 Case and control are defined by a string containing plus and minus symbols {'+', '-', '0'} where '+' is case, '-' is control and '0' is neutral.
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
94
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
95 This command adds two annotations to the VCF file:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
96
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
97 - **CaseControl**: Two comma separated numbers numbers representing the number of samples that have the variant in the case and the control group. Example:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
98
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
99 "CaseControl=3,4" *the variant is present in 3 cases and 4 controls.*
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
100
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
101
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
102 - **CaseControlP**: A p-value (Fisher exact test) that the number of cases is N or more. Example:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
103
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
104 "CaseControl=4,0;CaseControlP=3.030303e-02" *in this case the pValue of having 4 or more cases and zero controls is 0.03*
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
105
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
106
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
107 For example, if we have ten samples (which means ten genotype columns in the VCF file), the first four are 'case' and the last six are 'control', so the description string would be "++++------". Let's say we want to distinguish genotypes that are homozygous in 'case' and either homozygous or heterozygous in 'control'. We would set:
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
108
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
109 - Hom/Het case = "hom"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
110
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
111 - Hom/Het control = "any"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
112
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
113 - Case / Control column designation = ""++++------"
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
114
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
115
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
116 @EXTERNAL_DOCUMENTATION@
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
117 http://snpeff.sourceforge.net/SnpSift.html#casecontrol
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
118
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
119 @CITATION_SECTION@
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
120
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
121 </help>
1ae5526db990 Uploaded
jjohnson
parents:
diff changeset
122 </tool>