1
|
1 <tool id="snpEff" name="SnpEff" version="@WRAPPER_VERSION@.0">
|
0
|
2 <description>Variant effect and annotation</description>
|
|
3 <expand macro="requirements" />
|
|
4 <macros>
|
|
5 <import>snpEff_macros.xml</import>
|
|
6 </macros>
|
|
7 <command>
|
1
|
8 <![CDATA[
|
0
|
9 java -Xmx6G -jar \$SNPEFF_JAR_PATH/snpEff.jar eff
|
|
10 -c \$SNPEFF_JAR_PATH/snpEff.config
|
1
|
11 -i $inputFormat -o ${outputConditional.outputFormat} -upDownStreamLen $udLength
|
0
|
12 #if $spliceSiteSize and $spliceSiteSize.__str__ != '':
|
|
13 -spliceSiteSize $spliceSiteSize
|
|
14 #end if
|
|
15 #if $filterIn and $filterIn.__str__ != 'no_filter':
|
|
16 $filterIn
|
|
17 #end if
|
|
18 #if $filterHomHet and $filterHomHet.__str__ != 'no_filter':
|
|
19 $filterHomHet
|
|
20 #end if
|
|
21 #if $annotations and $annotations.__str__ != '':
|
|
22 #echo " "
|
|
23 #echo ' '.join($annotations.__str__.split(','))
|
|
24 #end if
|
|
25 #if $filterOut and $filterOut.__str__ != '':
|
|
26 #echo " "
|
|
27 #echo ' '.join($filterOut.__str__.split(','))
|
|
28 #end if
|
|
29 #if str( $transcripts ) != 'None':
|
|
30 -onlyTr $transcripts
|
|
31 #end if
|
|
32 #if str( $intervals ) != 'None': ### fix this for multiple dataset input
|
|
33 -interval $intervals
|
|
34 #end if
|
|
35 #if $statsFile:
|
|
36 -stats $statsFile
|
|
37 #end if
|
1
|
38 #if $offset.__str__ != 'default':
|
0
|
39 ${offset}
|
|
40 #end if
|
|
41 #if $chr.__str__.strip() != '':
|
|
42 -chr "$chr"
|
|
43 #end if
|
|
44 $noLog
|
|
45 #if $snpDb.genomeSrc == 'cached':
|
|
46 -dataDir ${snpDb.genomeVersion.fields.path}
|
|
47 #if $snpDb.extra_annotations and $snpDb.extra_annotations.__str__ != '':
|
|
48 #echo " "
|
|
49 #echo ' '.join($snpDb.extra_annotations.__str__.split(','))
|
|
50 #end if
|
|
51 #if $snpDb.regulation and $snpDb.regulation.__str__ != '':
|
|
52 -reg #echo ' -reg '.join($snpDb.regulation.__str__.split(','))#
|
|
53 #end if
|
|
54 $snpDb.genomeVersion
|
|
55 #elif $snpDb.genomeSrc == 'history':
|
|
56 -dataDir ${snpDb.snpeff_db.extra_files_path}
|
|
57 #if $snpDb.extra_annotations and $snpDb.extra_annotations.__str__ != '':
|
|
58 #set xannotations = [' '] + $snpDb.extra_annotations.__str__.split(',')
|
|
59 #echo " "
|
|
60 #echo ' -'.join($xannotations)
|
|
61 #end if
|
|
62 #if $snpDb.regulation and $snpDb.regulation.__str__ != '':
|
|
63 -reg #echo ' -reg '.join($snpDb.regulation.__str__.split(','))#
|
|
64 #end if
|
|
65 ${snpDb.snpeff_db.metadata.genome_version}
|
|
66 #else
|
|
67 -download
|
|
68 $snpDb.genome_version
|
|
69 #end if
|
1
|
70 $input > $snpeff_output ;
|
|
71 #if $statsFile:
|
|
72 #import os
|
|
73 #set $genes_file = str($statsFile) + '.genes.txt'
|
|
74 #set $genes_file_name = os.path.split($genes_file)[-1]
|
|
75 mkdir $statsFile.files_path;
|
|
76 mv $genes_file #echo os.path.join($statsFile.files_path, $genes_file_name)#;
|
|
77 #end if
|
|
78 #if $outputConditional.outputFormat == 'gatk' and $outputConditional.gatk_v1
|
|
79 ## Replace real SnpEff version with 2.0.5 to prevent this GATK 1.x error: "The version of SnpEff used to generate the SnpEff input file (x.x) is not currently supported by the GATK. Supported versions are: [2.0.5]"
|
|
80 sed -i 's/^\#\#SnpEffVersion="\(\S*\s\)/\#\#SnpEffVersion="2.0.5 - real is \1/' $snpeff_output
|
|
81 #end if
|
|
82 ]]>
|
0
|
83 </command>
|
|
84 <inputs>
|
|
85 <param format="vcf,tabular,pileup,bed" name="input" type="data" label="Sequence changes (SNPs, MNPs, InDels)"/>
|
|
86
|
|
87 <param name="inputFormat" type="select" label="Input format">
|
|
88 <option value="vcf" selected="true">VCF</option>
|
|
89 <option value="txt">Tabular (Deprecated)</option>
|
|
90 <option value="pileup">Pileup (Deprecated)</option>
|
|
91 <option value="bed">BED (Deprecated)</option>
|
|
92 </param>
|
|
93
|
1
|
94 <conditional name="outputConditional">
|
|
95 <param name="outputFormat" type="select" label="Output format">
|
|
96 <option value="vcf" selected="true">VCF (only if input is VCF)</option>
|
|
97 <option value="gatk">GATK-compatible VCF (only if input is VCF)</option>
|
|
98 <option value="txt">Tabular</option>
|
|
99 <option value="bed">BED</option>
|
|
100 <option value="bedAnn">BED annotations</option>
|
|
101 </param>
|
|
102 <when value="vcf" />
|
|
103 <when value="gatk">
|
|
104 <param name="gatk_v1" type="boolean" checked="true" label="Compatible with GATK 1.x" />
|
|
105 </when>
|
|
106 <when value="txt" />
|
|
107 <when value="bed" />
|
|
108 <when value="bedAnn" />
|
|
109 </conditional>
|
0
|
110
|
|
111 <conditional name="snpDb">
|
|
112 <param name="genomeSrc" type="select" label="Genome source">
|
|
113 <option value="cached">Locally installed reference genome</option>
|
|
114 <option value="history">Reference genome from your history</option>
|
|
115 <option value="named">Named on demand</option>
|
|
116 </param>
|
|
117 <when value="cached">
|
|
118 <param name="genomeVersion" type="select" label="Genome">
|
|
119 <!--GENOME DESCRIPTION-->
|
1
|
120 <options from_data_table="snpeffv_genomedb">
|
|
121 <filter type="static_value" name="snpeff_version" value="@SNPEFF_VERSION@" column="1"/>
|
|
122 <filter type="unique_value" column="2" />
|
0
|
123 </options>
|
|
124 </param>
|
1
|
125 <param name="extra_annotations" type="select" display="checkboxes" multiple="true" label="Additional annotations">
|
0
|
126 <help>These are available for only a few genomes</help>
|
1
|
127 <options from_data_table="snpeffv_annotations">
|
|
128 <filter type="param_value" ref="genomeVersion" key="genome" column="2" />
|
|
129 <filter type="unique_value" column="3" />
|
0
|
130 </options>
|
|
131 </param>
|
1
|
132 <param name="regulation" type="select" display="checkboxes" multiple="true" label="Non-coding and regulatory annotation">
|
0
|
133 <help>These are available for only a few genomes</help>
|
1
|
134 <options from_data_table="snpeffv_regulationdb">
|
|
135 <filter type="param_value" ref="genomeVersion" key="genome" column="2" />
|
|
136 <filter type="unique_value" column="3" />
|
0
|
137 </options>
|
|
138 </param>
|
|
139 </when>
|
|
140 <when value="history">
|
1
|
141 <param format="snpeffdb" name="snpeff_db" type="data" label="@SNPEFF_VERSION@ Genome Data">
|
|
142 <options options_filter_attribute="metadata.snpeff_version" >
|
|
143 <filter type="add_value" value="@SNPEFF_VERSION@" />
|
|
144 </options>
|
|
145 <validator type="expression" message="This version of SnpEff will only work with @SNPEFF_VERSION@ Genome databases.">value is not None and value.metadata.snpeff_version == "@SNPEFF_VERSION@"</validator>
|
|
146 </param>
|
0
|
147 <!-- From metadata -->
|
1
|
148 <param name="extra_annotations" type="select" display="checkboxes" multiple="true" label="Additional annotations">
|
0
|
149 <help>These are available for only a few genomes</help>
|
|
150 <options>
|
|
151 <filter type="data_meta" ref="snpeff_db" key="annotation" />
|
|
152 </options>
|
|
153 </param>
|
1
|
154 <param name="regulation" type="select" display="checkboxes" multiple="true" label="Non-coding and regulatory annotation">
|
0
|
155 <help>These are available for only a few genomes</help>
|
|
156 <options>
|
|
157 <filter type="data_meta" ref="snpeff_db" key="regulation" />
|
|
158 </options>
|
|
159 </param>
|
|
160 </when>
|
|
161 <when value="named">
|
1
|
162 <param name="genome_version" type="text" size="40" value="" label="Snpff Genome Version Name (e.g. GRCh38.76)">
|
|
163 <help>@SNPEFF_DATABASE_URL@</help>
|
|
164 <validator type="regex" message="A genome version name is required">\S+</validator>
|
|
165 </param>
|
0
|
166 </when>
|
|
167 </conditional>
|
|
168
|
|
169 <param name="udLength" type="select" label="Upstream / Downstream length">
|
|
170 <option value="0">No upstream / downstream intervals (0 bases)</option>
|
|
171 <option value="200">200 bases</option>
|
|
172 <option value="500">500 bases</option>
|
|
173 <option value="1000">1000 bases</option>
|
|
174 <option value="2000">2000 bases</option>
|
|
175 <option value="5000" selected="true">5000 bases</option>
|
|
176 <option value="10000">10000 bases</option>
|
|
177 <option value="20000">20000 bases</option>
|
|
178 </param>
|
|
179
|
|
180 <param name="spliceSiteSize" type="select" optional="true" label="Set size for splice sites (donor and acceptor) in bases" help="Default: 2">
|
|
181 <option value="1">1 base</option>
|
1
|
182 <option value="2" selected="true">2 bases</option>
|
0
|
183 <option value="3">3 bases</option>
|
|
184 <option value="4">4 bases</option>
|
|
185 <option value="5">5 bases</option>
|
|
186 <option value="6">6 bases</option>
|
|
187 <option value="7">7 bases</option>
|
|
188 <option value="8">8 bases</option>
|
|
189 <option value="9">9 bases</option>
|
|
190 </param>
|
|
191
|
|
192 <param name="filterHomHet" type="select" display="radio" label="Filter homozygous / heterozygous changes">
|
|
193 <option value="no_filter" selected="true">No filter (analyze everything)</option>
|
1
|
194 <option value="-hom">Analyze homozygous sequence changes only</option>
|
|
195 <option value="-het">Analyze heterozygous sequence changes only</option>
|
0
|
196 </param>
|
|
197
|
|
198 <!-- The tool testing code can not handle select,radio,check boxes values that start with '-', so the '-' is added in the command generation -->
|
|
199 <param name="filterIn" type="select" display="radio" label="Filter sequence changes">
|
|
200 <option value="no_filter" selected="true">No filter (analyze everything)</option>
|
1
|
201 <option value="-del">Analyze deletions only</option>
|
|
202 <option value="-ins">Analyze insertions only</option>
|
|
203 <option value="-mnp">Only MNPs (multiple nucleotide polymorphisms)</option>
|
|
204 <option value="-snp">Only SNPs (single nucleotide polymorphisms)</option>
|
0
|
205 </param>
|
|
206
|
|
207 <param name="annotations" type="select" display="checkboxes" multiple="true" label="Annotation options">
|
1
|
208 <option value="-cancer">Perform 'cancer' comparisons (somatic vs. germline)</option>
|
0
|
209 <option value="-canon">Only use canonical transcripts</option>
|
|
210 <option value="-geneId">Use gene ID instead of gene name (VCF output)</option>
|
1
|
211 <option value="-lof">Add loss of function (LOF) and nonsense mediated decay (NMD) tags</option>
|
0
|
212 <option value="-oicr">Add OICR tag in VCF file</option>
|
|
213 <option value="-onlyReg">Only use regulation tracks</option>
|
1
|
214 <option value="-classic">Use Classic Effect names and amino acid variant annotations (NON_SYNONYMOUS_CODING vs missense_variant and G180R vs p.Gly180Arg/c.538G>C)</option>
|
|
215 <option value="-hgvs">Override classic and use HGVS annotations for amino acid annotations (p.Gly180Arg/c.538G>C vs G180R)</option>
|
|
216 <option value="-sequenceOntology">Override classic and use Sequence Ontolgy terms for effects (missense_variant vs NON_SYNONYMOUS_CODING)</option>
|
0
|
217 </param>
|
|
218 <param name="intervals" format="bed" type="data" optional="true" label="Use custom interval file for annotation"/>
|
|
219 <param name="transcripts" format="tabular" type="data" optional="true" label="Only use the transcripts in this file." help="Format is one transcript ID per line."/>
|
|
220 <param name="filterOut" type="select" display="checkboxes" multiple="true" label="Filter output">
|
|
221 <option value="-no-downstream">Do not show DOWNSTREAM changes</option>
|
|
222 <option value="-no-intergenic">Do not show INTERGENIC changes</option>
|
|
223 <option value="-no-intron">Do not show INTRON changes</option>
|
|
224 <option value="-no-upstream">Do not show UPSTREAM changes</option>
|
|
225 <option value="-no-utr">Do not show 5_PRIME_UTR or 3_PRIME_UTR changes</option>
|
|
226 </param>
|
|
227
|
|
228 <param name="offset" type="select" display="radio" optional="true" label="Chromosomal position">
|
1
|
229 <option value="default" selected="true">Use default (based on input type)</option>
|
0
|
230 <option value="-0">Force zero-based positions (both input and output)</option>
|
|
231 <option value="-1">Force one-based positions (both input and output)</option>
|
|
232 </param>
|
|
233 <param name="chr" type="text" optionl="true" label="Text to prepend to chromosome name">
|
|
234 <help>
|
|
235 By default SnpEff simplifies all chromosome names. For instance 'chr1' is just '1'.
|
|
236 You can prepend any string you want to the chromosome name.
|
|
237 </help>
|
|
238 <validator type="regex" message="No whitespace allowed">^\S*$</validator>
|
|
239 </param>
|
|
240 <param name="generate_stats" type="boolean" truevalue="" falsevalue="-noStats" checked="true" label="Produce Summary Stats"/>
|
|
241 <param name="noLog" type="boolean" truevalue="-noLog" falsevalue="" checked="true" label="Do not report usage statistics to server"/>
|
|
242 </inputs>
|
|
243 <outputs>
|
|
244 <data format="vcf" name="snpeff_output" >
|
|
245 <change_format>
|
1
|
246 <when input="outputConditional.outputFormat" value="txt" format="tabular" />
|
|
247 <when input="outputConditional.outputFormat" value="bed" format="bed" />
|
|
248 <when input="outputConditional.outputFormat" value="bedAnn" format="bed" />
|
0
|
249 </change_format>
|
|
250 </data>
|
1
|
251 <data format="html" name="statsFile" label="${tool.name} on ${on_string} - stats">
|
0
|
252 <filter>generate_stats == True</filter>
|
|
253 </data>
|
|
254 </outputs>
|
|
255 <expand macro="stdio" />
|
|
256 <tests>
|
|
257 <!-- Check that an effect was added in out VCF -->
|
|
258 <!-- Check for a HTML header indicating that this was successful -->
|
|
259 <!--
|
|
260 <output name="statsFile">
|
|
261 <assert_contents>
|
|
262 <has_text text="SnpEff: Variant analysis" />
|
|
263 </assert_contents>
|
|
264 </output>
|
|
265 -->
|
|
266 <!-- Setting filterOut throws exception in twilltestcase.py
|
|
267 <test>
|
|
268 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
|
|
269 <param name="inputFormat" value="vcf"/>
|
|
270 <param name="outputFormat" value="vcf"/>
|
|
271 <param name="genomeSrc" value="named"/>
|
|
272 <param name="genome_version" value="testCase"/>
|
|
273 <param name="udLength" value="0"/>
|
|
274 <param name="filterHomHet" value="no_filter"/>
|
|
275 <param name="filterIn" value="no_filter"/>
|
|
276 <param name="generate_stats" value="False"/>
|
|
277 <param name="filterOut" value="+-no-upstream"/>
|
|
278 <output name="snpeff_output">
|
|
279 <assert_contents>
|
|
280 <has_text text="EFF=" />
|
|
281 </assert_contents>
|
|
282 </output>
|
|
283 </test>
|
|
284 -->
|
|
285
|
|
286 <test>
|
|
287 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
|
|
288 <param name="inputFormat" value="vcf"/>
|
|
289 <param name="outputFormat" value="vcf"/>
|
|
290 <param name="genomeSrc" value="named"/>
|
|
291 <param name="genome_version" value="testCase"/>
|
|
292 <param name="udLength" value="0"/>
|
|
293 <param name="filterHomHet" value="+-het"/>
|
|
294 <param name="filterIn" value="no_filter"/>
|
|
295 <!--
|
|
296 <param name="filterOut" value=""/>
|
|
297 -->
|
|
298 <param name="generate_stats" value="False"/>
|
|
299 <output name="snpeff_output">
|
|
300 <assert_contents>
|
|
301 <!-- Check that NO effects were added since -het is set -->
|
|
302 <not_has_text text="EFF=NON_SYNONYMOUS_CODING" />
|
|
303 </assert_contents>
|
|
304 </output>
|
|
305 </test>
|
|
306
|
|
307 <test>
|
|
308 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
|
|
309 <param name="inputFormat" value="vcf"/>
|
|
310 <param name="outputFormat" value="vcf"/>
|
|
311 <param name="genomeSrc" value="named"/>
|
|
312 <param name="genome_version" value="testCase"/>
|
|
313 <param name="udLength" value="0"/>
|
|
314 <param name="filterHomHet" value="no_filter"/>
|
1
|
315 <param name="filterIn" value="+-del"/>
|
0
|
316 <!--
|
|
317 <param name="filterOut" value=""/>
|
|
318 -->
|
|
319 <param name="generate_stats" value="False"/>
|
|
320 <output name="snpeff_output">
|
|
321 <assert_contents>
|
|
322 <!-- Check that deleletions were evaluated -->
|
|
323 <has_text_matching expression="Y\t59030478\t.*EFF=INTERGENIC" />
|
|
324 <!-- Check that insertion on last line was NOT evaluated -->
|
|
325 <has_text_matching expression="Y\t59032947\t.*SF=5\tGT" />
|
|
326 </assert_contents>
|
|
327 </output>
|
|
328 </test>
|
|
329
|
|
330 <!-- Check that NO UPSTREAM effect was added -->
|
|
331 <!-- Setting filterOut throws exception in twilltestcase.py
|
|
332 <test>
|
|
333 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
|
|
334 <param name="inputFormat" value="vcf"/>
|
|
335 <param name="outputFormat" value="vcf"/>
|
|
336 <param name="genomeSrc" value="named"/>
|
|
337 <param name="genome_version" value="testCase"/>
|
|
338 <param name="udLength" value="0"/>
|
|
339 <param name="filterHomHet" value="no_filter"/>
|
|
340 <param name="filterIn" value="no_filter"/>
|
|
341 <param name="filterOut" value="+-no-upstream"/>
|
|
342 <param name="generate_stats" value="False"/>
|
|
343 <output name="snpeff_output">
|
|
344 <assert_contents>
|
|
345 <not_has_text text="UPSTREAM" />
|
|
346 </assert_contents>
|
|
347 </output>
|
|
348 </test>
|
|
349 -->
|
|
350
|
|
351 </tests>
|
|
352 <help>
|
|
353
|
|
354 This tool calculate the effect of variants (SNPs/MNPs/Insertions) and deletions.
|
|
355
|
|
356 @EXTERNAL_DOCUMENTATION@
|
|
357
|
|
358 @CITATION_SECTION@
|
|
359
|
|
360 </help>
|
1
|
361 <expand macro="citations" />
|
0
|
362 </tool>
|
|
363
|