comparison snpEff.xml @ 7:b26a1aff7f81

Fix issues with snpEff commandline template and add test cases
author Jim Johnson <jj@umn.edu>
date Thu, 28 Mar 2013 12:29:45 -0500
parents 3b0c657b852b
children 13b6ad2ddace
comparison
equal deleted inserted replaced
6:ec16dae84230 7:b26a1aff7f81
11 <command> 11 <command>
12 SNPEFF_DATA_DIR=`grep '^data_dir' \$JAVA_JAR_PATH/snpEff.config | sed 's/.*data_dir.*[=:]//'`; 12 SNPEFF_DATA_DIR=`grep '^data_dir' \$JAVA_JAR_PATH/snpEff.config | sed 's/.*data_dir.*[=:]//'`;
13 eval "if [ ! -e \$SNPEFF_DATA_DIR/$genomeVersion ] ; 13 eval "if [ ! -e \$SNPEFF_DATA_DIR/$genomeVersion ] ;
14 then java -Xmx6G -jar \$JAVA_JAR_PATH/snpEff.jar download -c \$JAVA_JAR_PATH/snpEff.config $genomeVersion ; 14 then java -Xmx6G -jar \$JAVA_JAR_PATH/snpEff.jar download -c \$JAVA_JAR_PATH/snpEff.config $genomeVersion ;
15 fi"; 15 fi";
16 java -Xmx6G -jar \$JAVA_JAR_PATH/snpEff.jar eff -c \$JAVA_JAR_PATH/snpEff.config -i $inputFormat -o $outputFormat -upDownStreamLen $udLength $filterIn $filterHomHet -no $filterOut -stats $statsFile $genomeVersion $input > $output </command> 16 java -Xmx6G -jar \$JAVA_JAR_PATH/snpEff.jar eff -c \$JAVA_JAR_PATH/snpEff.config -i $inputFormat -o $outputFormat -upDownStreamLen $udLength
17 #if $filterIn and $filterIn.__str__ != 'no_filter':
18 -$filterIn
19 #end if
20 #if $filterHomHet and $filterHomHet.__str__ != 'no_filter':
21 -$filterHomHet
22 #end if
23 #if $filterOut and $filterOut.__str__ != '':
24 #echo ' '.join($filterOut.__str__.split(','))
25 #end if
26 #if $statsFile:
27 -stats $statsFile
28 #end if
29 #if $offset.__str__ != '':
30 -${offset}
31 #end if
32 $genomeVersion $input > $snpeff_output
33 </command>
17 <inputs> 34 <inputs>
18 <param format="vcf,tabular,pileup,bed" name="input" type="data" label="Sequence changes (SNPs, MNPs, InDels)"/> 35 <param format="vcf,tabular,pileup,bed" name="input" type="data" label="Sequence changes (SNPs, MNPs, InDels)"/>
19 36
20 <param name="inputFormat" type="select" label="Input format"> 37 <param name="inputFormat" type="select" label="Input format">
21 <option value="vcf">VCF</option> 38 <option value="vcf">VCF</option>
48 <option value="10000">10000 bases</option> 65 <option value="10000">10000 bases</option>
49 <option value="20000">20000 bases</option> 66 <option value="20000">20000 bases</option>
50 </param> 67 </param>
51 68
52 <param name="filterHomHet" type="select" display="radio" label="Filter homozygous / heterozygous changes"> 69 <param name="filterHomHet" type="select" display="radio" label="Filter homozygous / heterozygous changes">
53 <option value="">No filter (analyze everything)</option> 70 <option value="no_filter" selected="true">No filter (analyze everything)</option>
54 <option value="-hom">Analyze homozygous sequence changes only </option> 71 <option value="hom">Analyze homozygous sequence changes only </option>
55 <option value="-het">Analyze heterozygous sequence changes only </option> 72 <option value="het">Analyze heterozygous sequence changes only </option>
56 </param> 73 </param>
57 74
58 <param name="filterIn" type="select" display="radio" label="Filter sequence changes"> 75 <param name="filterIn" type="select" display="radio" label="Filter sequence changes">
59 <option value="">No filter (analyze everything)</option> 76 <option value="no_filter" selected="true">No filter (analyze everything)</option>
60 <option value="-del">Analyze deletions only </option> 77 <option value="del">Analyze deletions only </option>
61 <option value="-ins">Analyze insertions only </option> 78 <option value="ins">Analyze insertions only </option>
62 <option value="-nmp">Only MNPs (multiple nucleotide polymorphisms) </option> 79 <option value="nmp">Only MNPs (multiple nucleotide polymorphisms) </option>
63 <option value="-snp">Only SNPs (single nucleotide polymorphisms) </option> 80 <option value="snp">Only SNPs (single nucleotide polymorphisms) </option>
64 </param> 81 </param>
65 82
66 <param name="filterOut" type="select" display="checkboxes" multiple="true" optional="false" value="None" label="Filter output"> 83 <param name="filterOut" type="select" display="checkboxes" multiple="true" optional="true" label="Filter output">
67 <option value="None" selected="true">None</option> 84 <option value="-no-downstream">Do not show DOWNSTREAM changes </option>
68 <option value="downstream">Do not show DOWNSTREAM changes </option> 85 <option value="-no-intergenic">Do not show INTERGENIC changes </option>
69 <option value="intergenic">Do not show INTERGENIC changes </option> 86 <option value="-no-intron">Do not show INTRON changes </option>
70 <option value="intron">Do not show INTRON changes </option> 87 <option value="-no-upstream">Do not show UPSTREAM changes </option>
71 <option value="upstream">Do not show UPSTREAM changes </option> 88 <option value="-no-utr">Do not show 5_PRIME_UTR or 3_PRIME_UTR changes </option>
72 <option value="utr">Do not show 5_PRIME_UTR or 3_PRIME_UTR changes </option>
73 </param> 89 </param>
74 90
75 <param name="offset" type="select" display="radio" optional="true" label="Chromosomal position"> 91 <param name="offset" type="select" display="radio" optional="true" label="Chromosomal position">
76 <option value="">Use default (based on input type)</option> 92 <option value="" selected="true">Use default (based on input type)</option>
77 <option value="-0">Force zero-based positions (both input and output)</option> 93 <option value="0">Force zero-based positions (both input and output)</option>
78 <option value="-1">Force one-based positions (both input and output)</option> 94 <option value="1">Force one-based positions (both input and output)</option>
79 </param> 95 </param>
96 <param name="generate_stats" type="boolean" truevalue="" falsevalue="-noStats" checked="true" label="Produce Summary Stats"/>
80 </inputs> 97 </inputs>
81 <outputs> 98 <outputs>
82 <data format="tabular" name="output" > 99 <data format="tabular" name="snpeff_output" >
83 <change_format> 100 <change_format>
84 <when input="outputFormat" value="txt" format="tabular" /> 101 <when input="outputFormat" value="txt" format="tabular" />
85 <when input="outputFormat" value="vcf" format="vcf" /> 102 <when input="outputFormat" value="vcf" format="vcf" />
86 <when input="outputFormat" value="bed" format="bed" /> 103 <when input="outputFormat" value="bed" format="bed" />
87 <when input="outputFormat" value="bedAnn" format="bed" /> 104 <when input="outputFormat" value="bedAnn" format="bed" />
88 </change_format> 105 </change_format>
89 </data> 106 </data>
90 <data format="html" name="statsFile" /> 107
108 <data format="html" name="statsFile">
109 <filter>generate_stats == True</filter>
110 </data>
91 </outputs> 111 </outputs>
92 <stdio> 112 <stdio>
93 <exit_code range=":-1" level="fatal" description="Error: Cannot open file" /> 113 <exit_code range=":-1" level="fatal" description="Error: Cannot open file" />
94 <exit_code range="1:" level="fatal" description="Error" /> 114 <exit_code range="1:" level="fatal" description="Error" />
95 </stdio> 115 </stdio>
116 <tests>
117 <test>
118 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
119 <param name="inputFormat" value="vcf"/>
120 <param name="outputFormat" value="vcf"/>
121 <param name="genomeVersion" value="testCase"/>
122 <param name="udLength" value="0"/>
123 <param name="filterHomHet" value="no_filter"/>
124 <param name="filterIn" value="no_filter"/>
125 <param name="filterOut" value="-no-upstream"/>
126 <output name="snpeff_output">
127 <assert_contents>
128 <!-- Check that an effect was added -->
129 <has_text text="EFF=NON_SYNONYMOUS_CODING" />
130 </assert_contents>
131 </output>
132 <output name="statsFile">
133 <assert_contents>
134 <!-- Check for a HTML header indicating that this was successful -->
135 <has_text text="SnpEff: Variant analysis" />
136 </assert_contents>
137 </output>
138 </test>
139 <test>
140 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
141 <param name="inputFormat" value="vcf"/>
142 <param name="outputFormat" value="vcf"/>
143 <param name="genomeVersion" value="testCase"/>
144 <param name="udLength" value="0"/>
145 <param name="filterHomHet" value="het"/>
146 <param name="filterIn" value="no_filter"/>
147 <!--
148 <param name="filterOut" value=""/>
149 -->
150 <param name="generate_stats" value="False"/>
151 <output name="snpeff_output">
152 <assert_contents>
153 <!-- Check that NO effects were added since -het is set -->
154 <not_has_text text="EFF=NON_SYNONYMOUS_CODING" />
155 </assert_contents>
156 </output>
157 </test>
158 <test>
159 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
160 <param name="inputFormat" value="vcf"/>
161 <param name="outputFormat" value="vcf"/>
162 <param name="genomeVersion" value="testCase"/>
163 <param name="udLength" value="0"/>
164 <param name="filterHomHet" value="no_filter"/>
165 <param name="filterIn" value="del"/>
166 <!--
167 <param name="filterOut" value=""/>
168 -->
169 <param name="generate_stats" value="False"/>
170 <output name="snpeff_output">
171 <assert_contents>
172 <!-- Check that deleletions were evaluated -->
173 <has_text_matching expression="Y\t59030478\t.*EFF=INTERGENIC" />
174 <!-- Check that insertion on last line was NOT evaluated -->
175 <has_text_matching expression="Y\t59032947\t.*SF=5\tGT" />
176 </assert_contents>
177 </output>
178 </test>
179 <test>
180 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
181 <param name="inputFormat" value="vcf"/>
182 <param name="outputFormat" value="vcf"/>
183 <param name="genomeVersion" value="testCase"/>
184 <param name="udLength" value="0"/>
185 <param name="filterHomHet" value="no_filter"/>
186 <param name="filterIn" value="no_filter"/>
187 <param name="filterOut" value="-no-upstream"/>
188 <param name="generate_stats" value="False"/>
189 <output name="snpeff_output">
190 <assert_contents>
191 <!-- Check that NO UPSTREAM effect was added -->
192 <not_has_text text="UPSTREAM" />
193 </assert_contents>
194 </output>
195 </test>
196
197 </tests>
96 <help> 198 <help>
97 199
98 This tool calculate the effect of variants (SNPs/MNPs/Insertions) and deletions. 200 This tool calculate the effect of variants (SNPs/MNPs/Insertions) and deletions.
99 201
100 For details about this tool, please go to http://snpEff.sourceforge.net 202 For details about this tool, please go to http://snpEff.sourceforge.net