changeset 1:98708b88af9f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 21b46ae2c90ba7e569b2b3a9eaf938f8dedb2c31
author iuc
date Tue, 07 Jun 2016 10:04:09 -0400
parents 9e8280e19338
children bf8c1526871b
files snpSift_annotate.xml snpSift_caseControl.xml snpSift_extractFields.xml snpSift_filter.xml snpSift_int.xml snpSift_macros.xml snpSift_rmInfo.xml snpSift_vartype.xml snpSift_vcfCheck.xml tool_dependencies.xml
diffstat 10 files changed, 333 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/snpSift_annotate.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_annotate.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,20 +1,23 @@
-<tool id="snpSift_annotate" name="SnpSift Annotate" version="4.0.0">
+<tool id="snpSift_annotate" name="SnpSift Annotate" version="@WRAPPER_VERSION@.0">
     <description>SNPs from dbSnp</description>
     <!-- 
         You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
     -->
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-        java -Xmx6G -jar \$SNPEFF_JAR_PATH/SnpSift.jar $annotate_cmd 
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+        java -Xmx6G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" $annotate_cmd 
         #if $annotate.id :
           -id
-        #elif $annotate.info_ids.__str__.strip() != '' :
+        #elif str($annotate.info_ids).strip() != '' :
           -info "$annotate.info_ids"
         #end if          
-        -q $dbSnp $input > $output 
+        -q "$dbSnp" "$input" > "$output" 
+]]>
     </command>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
@@ -24,7 +27,7 @@
             <param name="id" type="boolean" truevalue="id" falsevalue="info" checked="True" label="Only annotate ID field (do not add INFO field)" help=""/>
             <when value="id"/>
             <when value="info">
-                <param name="info_ids" type="text" value="" size="60" optional="true" label="Limit INFO annotation to these INFO IDs"
+                <param name="info_ids" type="text" value="" optional="true" label="Limit INFO annotation to these INFO IDs"
                     help="list is a comma separated list of fields. When blank, all INFO fields are included">    
                     <validator type="regex" message="IDs separted by commas">^(([a-zA-Z][a-zA-Z0-9_-]*)(,[a-zA-Z][a-zA-Z0-9_-]*)*)?$</validator>
                 </param>
@@ -37,7 +40,6 @@
             </help>
             </param>
     </inputs>
-    <expand macro="stdio" />
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
@@ -54,7 +56,7 @@
             </output>
         </test>
     </tests>
-    <help>
+    <help><![CDATA[
 
 This is typically used to annotate IDs from dbSnp.
 
@@ -92,9 +94,8 @@
 @EXTERNAL_DOCUMENTATION@
 	http://snpeff.sourceforge.net/SnpSift.html#annotate
 
-@CITATION_SECTION@
-
-
+]]>
     </help>
+    <expand macro="citations" />
 </tool>
 
--- a/snpSift_caseControl.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_caseControl.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,23 +1,26 @@
-<tool id="snpSift_caseControl" name="SnpSift CaseControl" version="4.0.0">
+<tool id="snpSift_caseControl" name="SnpSift CaseControl" version="@WRAPPER_VERSION@.0">
     <description>Count samples are in 'case' and 'control' groups.</description>
     <!-- 
         You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
     -->
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-    java -Xmx1G -jar \$SNPEFF_JAR_PATH/SnpSift.jar caseControl -q 
-    #if $name.__str__.strip() != '':
-      -name $name
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+    java -Xmx1G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" caseControl -q 
+    #if str($name).strip() != '':
+      -name "$name"
     #end if
     #if $ctrl.ctrl_src == 'caseString':
       '$ctrl.caseControlStr' 
     #else
       -tfam "$ctrl.tfam"
     #end if
-    $input > $output
+    "$input" > "$output"
+]]>
     </command>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
@@ -45,7 +48,6 @@
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
-    <expand macro="stdio" />
     <tests>
         <test>
             <param name="input" ftype="vcf" value="test.private.01.vcf"/>
@@ -84,7 +86,7 @@
             </output>
         </test>
     </tests>
-    <help>
+    <help><![CDATA[
 
 **SnpSift CaseControl**
 
@@ -116,7 +118,7 @@
 @EXTERNAL_DOCUMENTATION@
 	http://snpeff.sourceforge.net/SnpSift.html#casecontrol
 
-@CITATION_SECTION@
-
-  </help>
+]]>
+    </help>
+    <expand macro="citations" />
 </tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/snpSift_extractFields.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -0,0 +1,220 @@
+<tool id="snpSift_extractFields" name="SnpSift Extract Fields" version="@WRAPPER_VERSION@.0">
+    <options sanitize="False" />
+    <description>from a VCF file inot a tabular file</description>
+    <macros>
+        <import>snpSift_macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+        cat "$input"
+        #if $one_effect_per_line:
+          | "\$SNPEFF_JAR_PATH/scripts/vcfEffOnePerLine.pl"
+        #end if 
+        | java -Xmx6G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" extractFields 
+        #if $separator:
+          -s '$separator'  
+        #end if
+        #if $empty_text:
+          -e '$empty_text' 
+        #end if
+        -
+        #echo ' '.join(['"%s"' % x for x in $extract.split()])
+        > "$output"
+]]>
+    </command>
+    <inputs>
+        <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
+        <param name="extract" type="text" label="Extract" help="Need help? See below a few examples." />
+        <param name="one_effect_per_line" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="One effect per line" help="When variants have more than one effect, lists one effect per line, while all other parameters in the line are repeated across mutiple lines" />
+        <param name="separator" type="text" value="" optional="true" label="multiple field separator" help="Separate multiple fields in one column with this character, e.g. a comma, rather than a column for each of the multiple values">
+        </param>
+        <param name="empty_text" type="text" value="" optional="true" label="empty field text" help="Represent empty fields with this value, rather than leaving them blank" >
+        </param>
+    </inputs>
+    <outputs>
+        <data format="tabular" name="output" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" ftype="vcf" value="test_rmInfo.vcf"/>
+            <param name="extract" value="CHROM POS REF ALT EFF[*].EFFECT"/>
+            <output name="output">
+                <assert_contents>
+                <has_text text="INTRAGENIC" />
+                <not_has_text text="DOWNSTREAM,INTRAGENIC,INTRON,UTR_3_PRIME" />
+                </assert_contents>
+            </output>
+        </test>
+
+        <test>
+            <param name="input" ftype="vcf" value="test_rmInfo.vcf"/>
+            <param name="extract" value="CHROM POS REF ALT EFF[*].EFFECT"/>
+            <param name="separator" value=","/>
+            <output name="output">
+                <assert_contents>
+		<has_text text="DOWNSTREAM,INTRAGENIC,INTRON,UTR_3_PRIME" />
+                </assert_contents>
+            </output>
+        </test>
+
+    </tests>
+    <help><![CDATA[
+
+**SnpSift Extract Fields**
+
+Extract fields from a VCF file to a TXT, tab separated format, that you can easily load in R, XLS, etc.
+
+http://snpeff.sourceforge.net/SnpSift.html#Extract
+
+You can also use sub-fields and genotype fields / sub-fields such as:
+
+  ::
+
+    Standard VCF fields:
+        CHROM
+        POS
+        ID
+        REF
+        ALT
+        FILTER 
+    INFO fields:
+        AF
+        AC
+        DP
+        MQ
+        etc. (any info field available) 
+    SnpEff 'ANN' fields:
+        "ANN[*].ALLELE" (alias GENOTYPE)
+        "ANN[*].EFFECT" (alias ANNOTATION): Effect in Sequence ontology terms (e.g. 'missense_variant', 'synonymous_variant', 'stop_gained', etc.)
+        "ANN[*].IMPACT" { HIGH, MODERATE, LOW, MODIFIER }
+        "ANN[*].GENE" Gene name (e.g. 'PSD3')
+        "ANN[*].GENEID" Gene ID
+        "ANN[*].FEATURE"
+        "ANN[*].FEATUREID" (alias TRID: Transcript ID)
+        "ANN[*].BIOTYPE" Biotype, as described by the annotations (e.g. 'protein_coding')
+        "ANN[*].RANK" Exon or Intron rank (i.e. exon number in a transcript)
+        "ANN[*].HGVS_C" (alias HGVS_DNA, CODON): Variant in HGVS (DNA) notation
+        "ANN[*].HGVS_P" (alias HGVS, HGVS_PROT, AA): Variant in HGVS (protein) notation
+        "ANN[*].CDNA_POS" (alias POS_CDNA)
+        "ANN[*].CDNA_LEN" (alias LEN_CDNA)
+        "ANN[*].CDS_POS" (alias POS_CDS)
+        "ANN[*].CDS_LEN" (alias LEN_CDS)
+        "ANN[*].AA_POS" (alias POS_AA)
+        "ANN[*].AA_LEN" (alias LEN_AA)
+        "ANN[*].DISTANCE"
+        "ANN[*].ERRORS" (alias WARNING, INFOS) 
+    SnpEff 'EFF' fields (this is for older SnpEff/SnpSift versions, new version use 'ANN' field):
+        "EFF[*].EFFECT"
+        "EFF[*].IMPACT"
+        "EFF[*].FUNCLASS"
+        "EFF[*].CODON"
+        "EFF[*].AA"
+        "EFF[*].AA_LEN"
+        "EFF[*].GENE"
+        "EFF[*].BIOTYPE"
+        "EFF[*].CODING"
+        "EFF[*].TRID"
+        "EFF[*].RANK" 
+    SnpEff 'LOF' fields:
+        "LOF[*].GENE"
+        "LOF[*].GENEID"
+        "LOF[*].NUMTR"
+        "LOF[*].PERC" 
+    SnpEff' NMD' fields:
+        "NMD[*].GENE"
+        "NMD[*].GENEID"
+        "NMD[*].NUMTR"
+        "NMD[*].PERC" 
+
+
+Some examples:
+
+  - *Extracting chromosome, position, ID and allele frequency from a VCF file:*
+
+    **CHROM POS ID AF**
+
+    The result will look something like: 
+
+      ::
+
+        #CHROM        POS        ID            AF
+        1             69134                    0.086
+        1             69496      rs150690004   0.001
+
+
+  - *Extracting genotype fields:*
+
+    **CHROM POS ID THETA GEN[0].GL[1] GEN[1].GL GEN[3].GL[*] GEN[*].GT**
+
+    This means to extract:
+
+      - CHROM POS ID: regular fields (as in the previous example)
+      - THETA : This one is from INFO
+      - GEN[0].GL[1] : Second likelihood from first genotype
+      - GEN[1].GL : The whole GL fiels (all entries without separating them)
+      - GEN[3].GL[*] : All likelihoods form genotype 3 (this time they will be tab separated, as opposed to the previous one).
+      - GEN[*].GT : Genotype subfields (GT) from ALL samples (tab separated). 
+
+    The result will look something like: 
+
+      ::
+
+        #CHROM  POS     ID              THETA   GEN[0].GL[1]    GEN[1].GL               GEN[3].GL[*]            GEN[*].GT
+        1       10583   rs58108140      0.0046  -0.47           -0.24,-0.44,-1.16       -0.48   -0.48   -0.48   0|0     0|0     0|0     0|1     0|0     0|1     0|0     0|0     0|1 
+        1       10611   rs189107123     0.0077  -0.48           -0.24,-0.44,-1.16       -0.48   -0.48   -0.48   0|0     0|1     0|0     0|0     0|0     0|0     0|0     0|0     0|0 
+        1       13302   rs180734498     0.0048  -0.58           -2.45,-0.00,-5.00       -0.48   -0.48   -0.48   0|0     0|1     0|0     0|0     0|0     1|0     0|0     0|1     0|0 
+
+  - *Extracting fields with multiple values:*
+    (notice that there are multiple effect columns per line because there are mutiple effects per variant)
+
+    **CHROM POS REF ALT ANN[*].EFFECT**
+
+    The result will look something like: 
+
+      :: 
+
+        #CHROM	POS	REF	ALT	ANN[*].EFFECT
+        22	17071756	T	C	3_prime_UTR_variant	downstream_gene_variant
+        22	17072035	C	T	missense_variant	downstream_gene_variant
+        22	17072258	C	A	missense_variant	downstream_gene_variant
+
+  - *Extracting fields with multiple values using a comma as a multipe field separator:*
+
+    **CHROM POS REF ALT ANN[*].EFFECT ANN[*].HGVS_P**
+
+    The result will look something like: 
+
+      :: 
+
+        #CHROM	POS	REF	ALT	ANN[*].EFFECT	ANN[*].HGVS_P
+        22	17071756	T	C	3_prime_UTR_variant,downstream_gene_variant	.,.
+        22	17072035	C	T	missense_variant,downstream_gene_variant	p.Gly469Glu,.
+        22	17072258	C	A	missense_variant,downstream_gene_variant	p.Gly395Cys,.
+
+
+  - *Extracting fields with multiple values, one effect per line:*
+
+    **CHROM POS REF ALT ANN[*].EFFECT**
+
+    The result will look something like: 
+
+      :: 
+
+        #CHROM	POS	REF	ALT	ANN[*].EFFECT
+        22	17071756	T	C	3_prime_UTR_variant
+        22	17071756	T	C	downstream_gene_variant
+        22	17072035	C	T	missense_variant
+        22	17072035	C	T	downstream_gene_variant
+        22	17072258	C	A	missense_variant
+        22	17072258	C	A	downstream_gene_variant
+
+
+@EXTERNAL_DOCUMENTATION@
+	http://snpeff.sourceforge.net/SnpSift.html#Extract
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- a/snpSift_filter.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_filter.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,31 +1,41 @@
-<tool id="snpSift_filter" name="SnpSift Filter" version="4.0.0">
-    <options sanitize="False" />
+<tool id="snpSift_filter" name="SnpSift Filter" version="@WRAPPER_VERSION@.0">
     <description>Filter variants using arbitrary expressions</description>
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-        java -Xmx6G -jar \$SNPEFF_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile $inverse 
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+
+    <command><![CDATA[
+        java -Xmx6G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" filter -f "$input" -e "$exprFile" $inverse 
         #if $filtering.mode == 'field':
             #if $filtering.replace.pass:
                 --pass
-                #if $filtering.replace.filterId and len($filtering.replace.filterId.__str__.strip()) > 0:
+                #if $filtering.replace.filterId and len(str($filtering.replace.filterId).strip()) > 0:
                     --filterId "$filtering.replace.filterId"
                 #end if
             #end if
-            #if $filtering.addFilter and len($filtering.addFilter.__str__.strip()) > 0:
+            #if $filtering.addFilter and len(str($filtering.addFilter).strip()) > 0:
                 --addFilter "$filtering.addFilter"
             #end if
-            #if $filtering.rmFilter and len($filtering.rmFilter.__str__.strip()) > 0:
+            #if $filtering.rmFilter and len(str($filtering.rmFilter).strip()) > 0:
                 --rmFilter "$filtering.rmFilter"
             #end if
         #end if
-         > $output
+         > "$output"
+]]>
     </command>
+    <configfiles>
+        <configfile name="exprFile">
+$expr#slurp
+        </configfile> 
+    </configfiles>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
-        <param name="expr" type="text" label="Filter criteria" size="160" help="Need help? See below a few examples." />
+        <param name="expr" type="text" label="Filter criteria" help="Need help? See below a few examples." >
+            <sanitizer sanitize="False"/>
+        </param>
         <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" />
         <conditional name="filtering">
             <param name="mode" type="select" label="Filter mode">
@@ -39,25 +49,19 @@
                            help="appends an ID tag to non-matching entry FILTER "/>
                     <when value="no"/>
                     <when value="yes">
-                        <param name="filterId" type="text" value="" optional="true" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)." size="10"
+                        <param name="filterId" type="text" value="" optional="true" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)." 
                                help="Default ID is 'SnpSift'"/>
                     </when>
                 </conditional>
-                <param name="addFilter" type="text" value="" optional="true" label="Add a string to FILTER VCF field if 'expression' is true." size="10"/>
-                <param name="rmFilter" type="text" value="" optional="true" label="Remove a string from FILTER VCF field if 'expression' is true (and 'str' is in the field)." size="10"/>
+                <param name="addFilter" type="text" value="" optional="true" label="Add a string to FILTER VCF field if 'expression' is true." />
+                <param name="rmFilter" type="text" value="" optional="true" label="Remove a string from FILTER VCF field if 'expression' is true (and 'str' is in the field)." />
             </when>
         </conditional>
     </inputs>
-    <configfiles>
-        <configfile name="exprFile">
-$expr#slurp
-        </configfile> 
-    </configfiles>
 
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
-    <expand macro="stdio" />
     <tests>
         <test>
         <param name="input" ftype="vcf" value="test01.vcf"/>
@@ -85,7 +89,7 @@
 
         <test>
         <param name="input" ftype="vcf" value="test01.vcf"/>
-        <param name="expr" value="(POS >= 20175) &amp; (POS &lt;= 35549)"/>
+        <param name="expr" value="(POS &gt;= 20175) &amp; (POS &lt;= 35549)"/>
         <param name="mode" value="entries"/>
         <output name="output">
             <assert_contents>
@@ -100,7 +104,7 @@
 
         <test>
         <param name="input" ftype="vcf" value="test01.vcf"/>
-        <param name="expr" value="( DP >= 5 )"/>
+        <param name="expr" value="( DP &gt;= 5 )"/>
         <param name="mode" value="entries"/>
         <output name="output">
             <assert_contents>
@@ -111,7 +115,7 @@
         </output>
         </test>
     </tests>
-    <help>
+    <help><![CDATA[
 
 **SnpSift filter**
 
@@ -123,7 +127,7 @@
 
     ::
 
-    ( CHROM = 'chr1' ) &amp; ( POS &gt; 1000000 )  &amp; ( POS &lt; 2000000 )
+    ( CHROM = 'chr1' ) & ( POS > 1000000 ) & ( POS < 2000000 )
 
   - *Filter value is either 'PASS' or it is missing*:
 
@@ -131,11 +135,13 @@
 
     (FILTER = 'PASS') | ( na FILTER )  
 
-  - *I want to filter lines with an EFF of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*:
+  - *I want to filter lines with an ANN annotation EFFECT of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*:
 
     ::
   
-    ( EFF[*].EFFECT = 'frameshift_variant' )
+    ( ANN[*].EFFECT has 'frameshift_variant' )
+
+    **Important** According to the specification, there can be more than one EFFECT separated by & (e.g. 'missense_variant&splice_region_variant', thus using has operator is better than using equality operator (=). For instance 'missense_variant&splice_region_variant' = 'missense_variant' is false, whereas 'missense_variant&splice_region_variant' has 'missense_variant' is true. 
 
   - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*:
 
@@ -147,31 +153,31 @@
 
     ::
 
-    ( QUAL &gt; 30 )
+    ( QUAL > 30 )
 
   - *...but we also want InDels that have quality 20 or more*:
 
     ::
 
-    (( exists INDEL ) &amp; (QUAL >= 20)) | (QUAL >= 30 )
+    (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
   
   - *...or any homozygous variant present in more than 3 samples*:
 
     ::
 
-    (countHom() > 3) | (( exists INDEL ) &amp; (QUAL >= 20)) | (QUAL >= 30 )
+    (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
   
   - *...or any heterozygous sample with coverage 25 or more*:
 
     ::
 
-    ((countHet() > 0) &amp; (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) &amp; (QUAL >= 20)) | (QUAL >= 30 )
+    ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 )
   
   - *I want to keep samples where the genotype for the first sample is homozygous variant and the genotype for the second sample is reference*:
 
     ::
   
-    (isHom( GEN[0] ) &amp; isVariant( GEN[0] ) &amp; isRef( GEN[1] ))
+    (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] ))
 
 
 **For information regarding HGVS and Sequence Ontology terms versus classic names**:
@@ -183,7 +189,7 @@
 @EXTERNAL_DOCUMENTATION@
 	http://snpeff.sourceforge.net/SnpSift.html#filter
 
-@CITATION_SECTION@
-
+]]>
     </help>
+    <expand macro="citations" />
 </tool>
--- a/snpSift_int.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_int.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,14 +1,17 @@
-<tool id="snpSift_int" name="SnpSift Intervals" version="4.0.0">
+<tool id="snpSift_int" name="SnpSift Intervals" version="@WRAPPER_VERSION@.0">
     <description>Filter variants using intervals</description>
     <!-- 
         You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
     -->
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-        java -Xmx2G -jar \$SNPEFF_JAR_PATH/SnpSift.jar intervals -i $input $exclude $bedFile > $output
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+        java -Xmx2G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" intervals -i "$input" $exclude "$bedFile" > "$output"
+]]>
     </command>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
@@ -19,7 +22,6 @@
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
-    <expand macro="stdio" />
     <tests>
         <test>
             <param name="input" ftype="vcf" value="annotate_5.vcf"/>
@@ -44,14 +46,14 @@
             </output>
         </test>
     </tests>
-    <help>
+    <help><![CDATA[
 
 You can filter using intervals (BED file).
 
 @EXTERNAL_DOCUMENTATION@
     http://snpeff.sourceforge.net/SnpSift.html#intervals
 
-@CITATION_SECTION@
-
+]]>
     </help>
+    <expand macro="citations" />
 </tool>
--- a/snpSift_macros.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_macros.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,7 +1,7 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="4.0">snpEff</requirement>
+            <requirement type="package" version="4.1">snpEff</requirement>
         </requirements>
     </xml>
   <xml name="stdio">
@@ -10,6 +10,10 @@
         <exit_code range="1:"  level="fatal" description="Error" />
     </stdio>
   </xml>
+  <xml name="version_command">
+    <version_command>java -jar "$SNPEFF_JAR_PATH/snpEff.jar" -version</version_command>
+  </xml>
+  <token name="@WRAPPER_VERSION@">4.1</token>
   <token name="@EXTERNAL_DOCUMENTATION@">
 
 For details about this tool, please go to:
--- a/snpSift_rmInfo.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_rmInfo.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,11 +1,14 @@
-<tool id="snpSift_rmInfo" name="SnpSift rmInfo" version="4.0.0">
+<tool id="snpSift_rmInfo" name="SnpSift rmInfo" version="@WRAPPER_VERSION@.0">
     <description>remove INFO field annotations</description>
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-      java -Xmx2G -jar \$SNPEFF_JAR_PATH/SnpSift.jar rmInfo $input ' '.join($info_fields.split(',')) > $output
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+      java -Xmx2G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" rmInfo "$input" ' '.join($info_fields.split(',')) > "$output"
+]]>
     </command>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
@@ -17,7 +20,6 @@
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
-    <expand macro="stdio" />
     <tests>
         <test>
             <param name="input" ftype="vcf" value="test-data/test_rmInfo.vcf"/>
@@ -39,18 +41,18 @@
             </output>
         </test>
     </tests>
-    <help>
+    <help><![CDATA[
 This command removes INFO fields from a VCF file (i.e. removes annotations)
 
 Removing INFO fields is usually done because you want to re-annotate the VCF file, thus removing old INFO fields in order to add new ones later. 
 
-SnpEff &amp; SnpSift only add annotations and do not change current ones. So, in order to re-annotate a file, you should first remove the old annotations and then re-annotate. 
+SnpEff & SnpSift only add annotations and do not change current ones. So, in order to re-annotate a file, you should first remove the old annotations and then re-annotate. 
 The reason for this behavior is simply because replacing annotation values is considered a bad practice. Imagine that you have a VCF entry  in your re-annotated file having the value "AA=1": How do you know if this is from the old annotations or from the new ones? This confusion often leads to problems in downstream steps of your pipelines, so it's better to avoid the problem by first removing all the previous annotations and then adding the new ones. 
 
 @EXTERNAL_DOCUMENTATION@
     http://snpeff.sourceforge.net/SnpSift.html#rmInfo
 
-@CITATION_SECTION@
-
+]]>
     </help>
+    <expand macro="citations" />
 </tool>
--- a/snpSift_vartype.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_vartype.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,11 +1,14 @@
-<tool id="snpsift_vartype" name="SnpSift Variant Type" version="4.0.0">
+<tool id="snpsift_vartype" name="SnpSift Variant Type" version="@WRAPPER_VERSION@.0">
     <description>Annotate with variant type</description>
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-        java -jar \$SNPEFF_JAR_PATH/SnpSift.jar varType $input 2&gt; $log &gt; $output
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+        java -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" varType "$input" 2> "$log" > "$output"
+]]>
     </command>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant file (VCF)"/>
@@ -14,10 +17,9 @@
         <data format="vcf" name="output" label="${tool.name} on ${on_string}: VCF" />
         <data format="txt" name="log" label="${tool.name} on ${on_string}: log" />
     </outputs>
-    <expand macro="stdio" />
     <tests>
     </tests>
-    <help>
+    <help><![CDATA[
 **What it does**
 
 This tool uses `SnpSift Variant type`_ to add the variant type (SNP/MNP/INS/DEL/MIXED) in the INFO field. It also adds "HOM/HET", but this last one works if there is only one sample (otherwise it doesn't make any sense).
@@ -34,6 +36,8 @@
 .. _MIT license: http://opensource.org/licenses/MIT
 
 @CITATION_SECTION@
+
+]]>
     </help>
     <expand macro="citations" />
 </tool>
--- a/snpSift_vcfCheck.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/snpSift_vcfCheck.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,11 +1,14 @@
-<tool id="snpSift_vcfCheck" name="SnpSift vcfCheck" version="4.0.0">
+<tool id="snpSift_vcfCheck" name="SnpSift vcfCheck" version="@WRAPPER_VERSION@.0">
     <description>basic checks for Vcf specification compliance</description>
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-      java -Xmx2G -jar \$SNPEFF_JAR_PATH/SnpSift.jar vcfCheck $input > $output
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+      java -Xmx2G -jar "\$SNPEFF_JAR_PATH/SnpSift.jar" vcfCheck "$input" > "$output"
+]]>
     </command>
     <inputs>
         <param format="vcf" name="input" type="data" label="Variant input file in VCF format to check"/>
@@ -13,7 +16,6 @@
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
-    <expand macro="stdio" />
     <tests>
         <test>
             <param name="input" ftype="vcf" value="test-data/test_bad.vcf"/>
@@ -24,7 +26,7 @@
             </output>
         </test>
     </tests>
-    <help>
+    <help><![CDATA[
 
 Perform some basic check ups on VCF files to spot common problems.
 
@@ -33,7 +35,7 @@
 @EXTERNAL_DOCUMENTATION@
 	http://snpeff.sourceforge.net/SnpSift.html#vcfCheck
 
-@CITATION_SECTION@
-
+]]>
     </help>
+    <expand macro="citations" />
 </tool>
--- a/tool_dependencies.xml	Thu Jan 22 08:39:07 2015 -0500
+++ b/tool_dependencies.xml	Tue Jun 07 10:04:09 2016 -0400
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="snpEff" version="4.0">
-        <repository changeset_revision="6bc55957927b" name="package_snpeff_4_0" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
+    <package name="snpEff" version="4.1">
+        <repository changeset_revision="374c7f8421fb" name="package_snpeff_4_1" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>