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