changeset 8:13b6ad2ddace

SnpEffect v3.2
author Jim Johnson <jj@umn.edu>
date Mon, 13 May 2013 12:45:07 -0500
parents b26a1aff7f81
children 937367efb1da
files snpEff.xml snpEff_download.xml snpSift_annotate.xml snpSift_caseControl.xml snpSift_filter.xml snpSift_int.xml test-data/interval.bed tool-data/snpeffect_regulationdb.loc.sample tool_dependencies.xml
diffstat 9 files changed, 314 insertions(+), 116 deletions(-) [+]
line wrap: on
line diff
--- a/snpEff.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpEff.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,12 +1,67 @@
-<tool id="snpEff" name="SnpEff" version="3.1">
+<tool id="snpEff" name="SnpEff" version="3.2">
 	<description>Variant effect and annotation</description>
 	<!-- 
 	    You will need to change the path to wherever your installation is.
 		You can change the amount of memory used by snpEff, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
 	<command>java -Xmx6G -jar /path/to/your/snpEff/snpEff.jar eff -c /path/to/your/snpEff/snpEff/snpEff.config $inputFormat $offset -upDownStreamLen $udLength $filterIn $filterHomHet -no $filterOut -stats $statsFile $genomeVersion $input > $output </command>
+Options:
+        -a , -around            : Show N codons and amino acids around change (only in coding regions). Default is 0 codons.
+        -i <format>             : Input format [ vcf, txt, pileup, bed ]. Default: VCF.
+        -o <format>             : Ouput format [ txt, vcf, gatk, bed, bedAnn ]. Default: VCF.
+        -interval               : Use a custom interval file (you may use this option many times)
+        -chr <string>           : Prepend 'string' to chromosome name (e.g. 'chr1' instead of '1'). Only on TXT output.
+        -s,  -stats             : Name of stats file (summary). Default is 'snpEff_summary.html'
+        -t                      : Use multiple threads (implies '-noStats'). Default 'off'
+
+Sequence change filter options:
+        -del                    : Analyze deletions only
+        -ins                    : Analyze insertions only
+        -hom                    : Analyze homozygous variants only
+        -het                    : Analyze heterozygous variants only
+        -minQ X, -minQuality X  : Filter out variants with quality lower than X
+        -maxQ X, -maxQuality X  : Filter out variants with quality higher than X
+        -minC X, -minCoverage X : Filter out variants with coverage lower than X
+        -maxC X, -maxCoverage X : Filter out variants with coverage higher than X
+        -nmp                    : Only MNPs (multiple nucleotide polymorphisms)
+        -snp                    : Only SNPs (single nucleotide polymorphisms)
+
+Results filter options:
+        -fi  <bedFile>                  : Only analyze changes that intersect with the intervals specified in this file (you may use this option many times)
+        -no-downstream                  : Do not show DOWNSTREAM changes
+        -no-intergenic                  : Do not show INTERGENIC changes
+        -no-intron                      : Do not show INTRON changes
+        -no-upstream                    : Do not show UPSTREAM changes
+        -no-utr                         : Do not show 5_PRIME_UTR or 3_PRIME_UTR changes
+
+Annotations options:
+        -cancer                         : Perform 'cancer' comparissons (Somatic vs Germline). Default: false
+        -canon                          : Only use canonical transcripts.
+        -geneId                         : Use gene ID instead of gene name (VCF output). Default: false
+        -hgvs                           : Use HGVS annotations for amino acid sub-field. Default: false
+        -lof                            : Add loss of function (LOF) and Nonsense mediated decay (NMD) tags.
+        -reg <name>                     : Regulation track to use (this option can be used add several times).
+        -oicr                           : Add OICR tag in VCF file. Default: false
+        -onlyReg                        : Only use regulation tracks.
+        -onlyTr <file.txt>              : Only use the transcripts in this file. Format: One transcript ID per line.
+        -sequenceOntolgy                : Use Sequence Ontolgy terms. Default: false
+        -ss, -spliceSiteSize <int>      : Set size for splice sites (donor and acceptor) in bases. Default: 2
+        -ud, -upDownStreamLen <int>     : Set upstream downstream interval length (in bases)
+
+Generic options:
+        -0                      : File positions are zero-based (same as '-inOffset 0 -outOffset 0')
+        -1                      : File positions are one-based (same as '-inOffset 1 -outOffset 1')
+        -c , -config            : Specify config file
+        -h , -help              : Show this help and exit
+        -if, -inOffset          : Offset input by a number of bases. E.g. '-inOffset 1' for one-based input files
+        -of, -outOffset         : Offset output by a number of bases. E.g. '-outOffset 1' for one-based output files
+        -noLog                  : Do not report usage statistics to server
+        -noStats                : Do not create stats (summary) file
+        -q , -quiet             : Quiet mode (do not show any messages or errors)
+        -v , -verbose           : Verbose mode
+
 	-->
 	<requirements>
-		<requirement type="package" version="3.1">snpEff</requirement>
+		<requirement type="package" version="3.2">snpEff</requirement>
 	</requirements>
 	<command>
 SNPEFF_DATA_DIR=`grep '^data_dir' \$JAVA_JAR_PATH/snpEff.config | sed 's/.*data_dir.*[=:]//'`;
@@ -14,14 +69,28 @@
 then java -Xmx6G -jar \$JAVA_JAR_PATH/snpEff.jar download  -c \$JAVA_JAR_PATH/snpEff.config $genomeVersion ;
 fi";
 java -Xmx6G -jar \$JAVA_JAR_PATH/snpEff.jar eff -c \$JAVA_JAR_PATH/snpEff.config -i $inputFormat -o $outputFormat -upDownStreamLen $udLength 
+#if $spliceSiteSize and $spliceSiteSize.__str__ != '':
+  -spliceSiteSize $spliceSiteSize
+#end if
 #if $filterIn and $filterIn.__str__ != 'no_filter':
   -$filterIn 
 #end if
 #if $filterHomHet and $filterHomHet.__str__ != 'no_filter':
   -$filterHomHet 
 #end if
+#if $annotations and $annotations.__str__ != '':
+  -#slurp
+  #echo ' -'.join($annotations.__str__.split(','))
+#end if
 #if $filterOut and $filterOut.__str__ != '':
-  #echo ' '.join($filterOut.__str__.split(','))
+  -#slurp
+  #echo ' -'.join($filterOut.__str__.split(','))
+#end if
+#if str( $transcripts ) != 'None':
+  -onlyTr $transcripts
+#end if
+#if str( $intervals ) != 'None':     ### fix this for multiple dataset input
+  -interval $intervals
 #end if
 #if $statsFile:
   -stats $statsFile 
@@ -29,26 +98,30 @@
 #if $offset.__str__ != '':
   -${offset} 
 #end if
-  $genomeVersion $input > $snpeff_output 
+#if $chr.__str__.strip() != '':
+  -chr "$chr" 
+#end if
+  $noLog $genomeVersion $input > $snpeff_output 
 </command>
 	<inputs>
 		<param format="vcf,tabular,pileup,bed" name="input" type="data" label="Sequence changes (SNPs, MNPs, InDels)"/>
 
 		<param name="inputFormat" type="select" label="Input format">
-			<option value="vcf">VCF</option>
-			<option value="txt">Tabular</option>
-			<option value="pileup">Pileup</option>
-			<option value="bed">BED</option>
+			<option value="vcf" selected="true">VCF</option>
+			<option value="txt">Tabular (Deprecated)</option>
+			<option value="pileup">Pileup (Deprecated)</option>
+			<option value="bed">BED (Deprecated)</option>
 		</param>
 
 		<param name="outputFormat" type="select" label="Output format">
+			<option value="vcf" selected="true">VCF (only if input is VCF)</option>
 			<option value="txt">Tabular</option>
-			<option value="vcf">VCF (only if input is VCF)</option>
 			<option value="bed">BED</option>
 			<option value="bedAnn">BED Annotations</option>
 		</param>
 
 		<param name="genomeVersion" type="select" label="Genome">
+                        <!--GENOME	DESCRIPTION-->
 			<options from_file="snpeffect_genomedb.loc">
 				<column name="name" index="1"/>
 				<column name="value" index="0"/>
@@ -66,40 +139,82 @@
 			<option value="20000">20000 bases</option>
 		</param>
 
-        <param name="filterHomHet" type="select" display="radio" label="Filter homozygous / heterozygous changes">
+		<param name="spliceSiteSize" type="select" optional="true" label="Set size for splice sites (donor and acceptor) in bases. Default: 2">
+			<option value="1">1 base</option>
+			<option value="2">2 bases</option>
+			<option value="3">3 bases</option>
+			<option value="4">4 bases</option>
+			<option value="5">5 bases</option>
+			<option value="6">6 bases</option>
+			<option value="7">7 bases</option>
+			<option value="8">8 bases</option>
+			<option value="9">9 bases</option>
+		</param>
+
+        	<param name="filterHomHet" type="select" display="radio" label="Filter homozygous / heterozygous changes">
 			<option value="no_filter" selected="true">No filter (analyze everything)</option>
 			<option value="hom">Analyze homozygous sequence changes only </option>
 			<option value="het">Analyze heterozygous sequence changes only </option>
-        </param>
+        	</param>
 
-        <param name="filterIn" type="select" display="radio" label="Filter sequence changes">
+                <!-- The tool testing code can not handle select,radio,checkbox values that start with '-', so the '-' is added in the command generation -->
+        	<param name="filterIn" type="select" display="radio" label="Filter sequence changes">
 			<option value="no_filter" selected="true">No filter (analyze everything)</option>
 			<option value="del">Analyze deletions only </option>
 			<option value="ins">Analyze insertions only </option>
-			<option value="nmp">Only MNPs (multiple nucleotide polymorphisms) </option>
+			<option value="mnp">Only MNPs (multiple nucleotide polymorphisms) </option>
 			<option value="snp">Only SNPs (single nucleotide polymorphisms) </option>
-        </param>
+        	</param>
+
+        	<param name="annotations" type="select" display="checkboxes" multiple="true" optional="true" label="Annotation options">
+			<option value="cancer">Perform 'cancer' comparissons (Somatic vs Germline). Default: false</option>
+                        <option value="canon">Only use canonical transcripts.</option>
+                        <option value="geneId">Use gene ID instead of gene name (VCF output). Default: false</option>
+                        <option value="hgvs">Use HGVS annotations for amino acid sub-field. Default: false</option>
+                        <option value="lof">Add loss of function (LOF) and Nonsense mediated decay (NMD) tags.</option>
+                        <option value="oicr">Add OICR tag in VCF file. Default: false</option>
+                        <option value="onlyReg">Only use regulation tracks.</option>
+                        <option value="sequenceOntolgy">Use Sequence Ontolgy terms. Default: false</option>
+        	</param>
 
-        <param name="filterOut" type="select" display="checkboxes" multiple="true" optional="true" label="Filter output">
-			<option value="-no-downstream">Do not show DOWNSTREAM changes </option>
-			<option value="-no-intergenic">Do not show INTERGENIC changes </option>
-			<option value="-no-intron">Do not show INTRON changes </option>
-			<option value="-no-upstream">Do not show UPSTREAM changes </option>
-			<option value="-no-utr">Do not show 5_PRIME_UTR or 3_PRIME_UTR changes </option>
-        </param>
+        	<param name="regulation" type="select" display="checkboxes" multiple="true" optional="true" label="Non-coding and regulatory Annotation">
+                       <help>These are available for only a few genomes</help>
+                       <!--GENOME	REG_NAME  -->
+                       <options from_file="snpeffect_regulationdb.loc">
+                                <column name="name" index="1"/>
+                                <column name="value" index="0"/>
+				<filter type="param_value" ref="genomeVersion" key="name" column="1" />
+                        </options>
+        	</param>
 
-        <param name="offset" type="select" display="radio" optional="true" label="Chromosomal position">
+        	<param name="intervals" format="bed" type="data" optional="true" label="Use custom interval file for annotation"/>
+        	<param name="transcripts" format="tabular" type="data" optional="true" label="Only use the transcripts in this file. Format: One transcript ID per line."/>
+
+        	<param name="filterOut" type="select" display="checkboxes" multiple="true" optional="true" label="Filter output">
+			<option value="no-downstream">Do not show DOWNSTREAM changes </option>
+			<option value="no-intergenic">Do not show INTERGENIC changes </option>
+			<option value="no-intron">Do not show INTRON changes </option>
+			<option value="no-upstream">Do not show UPSTREAM changes </option>
+			<option value="no-utr">Do not show 5_PRIME_UTR or 3_PRIME_UTR changes </option>
+        	</param>
+
+        	<param name="offset" type="select" display="radio" optional="true" label="Chromosomal position">
 			<option value="" selected="true">Use default (based on input type)</option>
 			<option value="0">Force zero-based positions (both input and output)</option>
 			<option value="1">Force one-based positions (both input and output)</option>
 		</param>
-        <param name="generate_stats" type="boolean" truevalue="" falsevalue="-noStats" checked="true" label="Produce Summary Stats"/>
+        	<param name="chr" type="text" optionl="true" label="Text to prepend to chromosome name" help="By default SnpEff simplifies all chromosome names. For instance 'chr1' is just '1'.  You can prepend any string you want to the chromosome name.">
+                                       <validator type="regex" message="No whitespace allows">^\S*$</validator>
+ 
+		</param>
+        	<param name="generate_stats" type="boolean" truevalue="" falsevalue="-noStats" checked="true" label="Produce Summary Stats"/>
+        	<param name="noLog" type="boolean" truevalue="-noLog" falsevalue="" checked="true" label="Do not report usage statistics to server"/>
 	</inputs>
 	<outputs>
-		<data format="tabular" name="snpeff_output" >
+		<data format="vcf" name="snpeff_output" >
 			<change_format>
+				<when input="outputFormat" value="vcf" format="vcf" />
 				<when input="outputFormat" value="txt" format="tabular" />
-				<when input="outputFormat" value="vcf" format="vcf" />
 				<when input="outputFormat" value="bed" format="bed" />
 				<when input="outputFormat" value="bedAnn" format="bed" />
 			</change_format>
@@ -110,8 +225,8 @@
                 </data>
 	</outputs>
         <stdio>
-          <exit_code range=":-1"  level="fatal"   description="Error: Cannot open file" />
           <exit_code range="1:"  level="fatal"   description="Error" />
+          <exit_code range="-1"  level="fatal"   description="Error: Cannot open file" />
         </stdio>
         <tests>
             <test>
@@ -122,20 +237,26 @@
                 <param name="udLength" value="0"/>
                 <param name="filterHomHet" value="no_filter"/>
                 <param name="filterIn" value="no_filter"/>
-                <param name="filterOut" value="-no-upstream"/>
+                <param name="generate_stats" value="False"/>
+                <!--
+                <param name="filterOut" value="no-upstream"/>
+                -->
                 <output name="snpeff_output">
                     <assert_contents>
                         <!-- Check that an effect was added -->
-                        <has_text text="EFF=NON_SYNONYMOUS_CODING" />
+                        <has_text text="EFF=" />
                     </assert_contents>
                 </output>
+                        <!-- Check for a HTML header indicating that this was successful -->
+                <!--
                 <output name="statsFile">
                     <assert_contents>
-                        <!-- Check for a HTML header indicating that this was successful -->
                         <has_text text="SnpEff: Variant analysis" />
                     </assert_contents>
                 </output>
+                --> 
             </test>
+
             <test>
                 <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
                 <param name="inputFormat" value="vcf"/>
@@ -184,7 +305,7 @@
                 <param name="udLength" value="0"/>
                 <param name="filterHomHet" value="no_filter"/>
                 <param name="filterIn" value="no_filter"/>
-                <param name="filterOut" value="-no-upstream"/>
+                <param name="filterOut" value="no-upstream"/>
                 <param name="generate_stats" value="False"/>
                 <output name="snpeff_output">
                     <assert_contents>
--- a/snpEff_download.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpEff_download.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,7 +1,7 @@
-<tool id="snpEff_download" name="SnpEff Download" version="3.1">
+<tool id="snpEff_download" name="SnpEff Download" version="3.2">
 	<description>Download a new database</description>
 	<requirements>
-		<requirement type="package" version="3.1">snpEff</requirement>
+		<requirement type="package" version="3.2">snpEff</requirement>
 	</requirements>
 	<command>java -jar \$JAVA_JAR_PATH/snpEff.jar download -c \$JAVA_JAR_PATH/snpEff.config $genomeVersion > $logfile </command>
 	<inputs>
--- a/snpSift_annotate.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpSift_annotate.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,16 +1,37 @@
-<tool id="snpSift_annotate" name="SnpSift Annotate" version="3.1">
+<tool id="snpSift_annotate" name="SnpSift Annotate" version="3.2">
 	<description>Annotate SNPs from dbSnp</description>
 	<!-- 
 	    You will need to change the path to wherever your installation is.
 		You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
 	-->
 	<requirements>
-                <requirement type="package" version="3.1">snpEff</requirement>
+                <requirement type="package" version="3.2">snpEff</requirement>
 	</requirements>
-	<command>java -Xmx6G -jar \$JAVA_JAR_PATH/SnpSift.jar annotate -q $dbSnp $input > $output </command>
+	<command>
+        java -Xmx6G -jar \$JAVA_JAR_PATH/SnpSift.jar $annotate_cmd 
+        #if $annotate.id :
+          -id
+        #elif $annotate.info_ids.__str__.strip() != '' :
+          -info "$annotate.info_ids"
+        #end if          
+        -q $dbSnp $input > $output 
+        </command>
 	<inputs>
 		<param format="vcf" name="input" type="data" label="VCF input"/>
-		<param format="vcf" name="dbSnp" type="data" label="VCF File with ID field annotated (e.g. dnSNP.vcf)" help="The ID field for a variant in input will be assigned from a matching variant in this file."/>
+		<param format="vcf" name="dbSnp" type="data" label="VCF File with ID field annotated (e.g. dnSNP.vcf)" 
+                       help="The ID field for a variant in input will be assigned from a matching variant in this file."/>
+		<param name="annotate_cmd" type="boolean" truevalue="annMem" falsevalue="annotate" checked="false" label="Annotate in Memory" 
+                       help="allows unsorted VCF files, but it loads the entire 'database' VCF file into memory (which may not be practical for large 'database' VCF files)"/>
+                <conditional name="annotate">
+			<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="" 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>
+			</when>
+                </conditional>
 	</inputs>
         <stdio>
           <exit_code range=":-1"  level="fatal"   description="Error: Cannot open file" />
@@ -24,6 +45,8 @@
 	    <test>
                 <param name="input" ftype="vcf" value="annotate_1.vcf"/>
                 <param name="dbSnp" ftype="vcf" value="db_test_1.vcf"/>
+                <param name="annotate_cmd" value="False"/>
+                <param name="id" value="True"/>
                 <output name="output">
                     <assert_contents>
                         <has_text text="rs76166080" />
--- a/snpSift_caseControl.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpSift_caseControl.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,37 +1,50 @@
-<tool id="snpSift_caseControl" name="SnpSift CaseControl" version="3.1">
-	<description>Count samples are in 'case' and 'control' groups.</description>
-	<!-- 
-	    You will need to change the path to wherever your installation is.
-		You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
-	-->
-	<requirements>
-                <requirement type="package" version="3.1">snpEff</requirement>
-	</requirements>
-	<command>
-		java -Xmx1G -jar \$JAVA_JAR_PATH/SnpSift.jar caseControl -q $hhCase $hhControl '$caseControStr' $input > $output
-	</command>
-	<inputs>
-		<param format="vcf" name="input" type="data" label="VCF input"/>
-		<param name="hhCase" type="select" label="Hom/Het case">
-			<option value="any">Any</option>
-			<option value="hom">Homozygous</option>
-			<option value="het">Heterozygous</option>
-		</param>
-		<param name="hhControl" type="select" label="Hom/Het control">
-			<option value="any">Any</option>
-			<option value="hom">Homozygous</option>
-			<option value="het">Heterozygous</option>
-		</param>
-		<param name="caseControStr" type="text" label="Case / Control column designation" size="50">
-		<help>
-Case and control are defined by a string containing plus and minus symbols {'+', '-', '0'} where '+' is case, '-' is control and '0' is neutral
-		</help>
-		<validator type="regex" message="must be  only plus(+), minus(-), or zero(0) characters">[+-0]+</validator>
-                </param>
-	</inputs>
-	<outputs>
-		<data format="vcf" name="output" />
-	</outputs>
+<tool id="snpSift_caseControl" name="SnpSift CaseControl" version="3.2">
+  <description>Count samples are in 'case' and 'control' groups.</description>
+  <!-- 
+    You will need to change the path to wherever your installation is.
+    You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
+  -->
+  <requirements>
+                <requirement type="package" version="3.2">snpEff</requirement>
+  </requirements>
+  <command>
+    java -Xmx1G -jar \$JAVA_JAR_PATH/SnpSift.jar caseControl -q 
+    #if $name.__str__.strip() != '':
+      -name $name
+    #end if
+    #if $ctrl.ctrl_src == 'caseString':
+      '$ctrl.caseControlStr' 
+    #else
+      -tfam "$ctrl.tfam"
+    #end if
+    $input > $output
+  </command>
+  <inputs>
+    <param format="vcf" name="input" type="data" label="VCF input"/>
+    <conditional name="ctrl">
+      <param name="ctrl_src" type="select" label="Case Control defined in">
+        <option value="caseString">Case Control String</option>
+        <option value="tfam">TFAM</option>
+      </param>
+      <when value="caseString">
+        <param name="caseControlStr" type="text" label="Case / Control column designation" size="50">
+          <help>
+             Case and control are defined by a string containing plus and minus symbols {'+', '-', '0'} where '+' is case, '-' is control and '0' is neutral
+          </help>
+          <validator type="regex" message="must be  only plus(+), minus(-), or zero(0) characters">[+-0]+</validator>
+        </param>
+      </when>
+      <when value="tfam">
+        <param format="tabular" name="tfam" type="data" label="PLINK TFAM file"/>
+      </when>
+    </conditional>
+    <param name="name" type="text" optional="true" label="name" help="name to append to the 'Cases' or 'Controls' tags">
+        <validator type="regex" message="Use only valid ID characters">[_a-zA-Z0-9]+</validator>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="vcf" name="output" />
+  </outputs>
         <stdio>
           <exit_code range=":-1"  level="fatal"   description="Error: Cannot open file" />
           <exit_code range="1:"  level="fatal"   description="Error" />
@@ -40,43 +53,44 @@
 
             <test>
                 <param name="input" ftype="vcf" value="test.private.01.vcf"/>
-                <param name="hhCase" value="any"/>
-                <param name="hhControl" value="any"/>
-                <param name="caseControStr" value="--"/>
+                <param name="ctrl_src" value="caseString"/>
+                <param name="caseControlStr" value="--"/>
                 <output name="output">
                     <assert_contents>
-                        <has_text text="CaseControl=0/0,0/2;" />
+                        <has_text text="Cases=0,0,0;" />
+                        <has_text text="Controls=0,0,0;" />
                     </assert_contents>
                 </output>
             </test>
 
             <test>
                 <param name="input" ftype="vcf" value="test.private.02.vcf"/>
-                <param name="hhCase" value="any"/>
-                <param name="hhControl" value="any"/>
-                <param name="caseControStr" value="--"/>
+                <param name="ctrl_src" value="caseString"/>
+                <param name="caseControlStr" value="--"/>
                 <output name="output">
                     <assert_contents>
-                        <has_text text="CaseControl=0/0,2/0;" />
+                        <has_text text="Cases=0,0,0;" />
+                        <has_text text="Controls=2,0,4;" />
                     </assert_contents>
                 </output>
             </test>
 
             <test>
                 <param name="input" ftype="vcf" value="test.private.02.vcf"/>
-                <param name="hhCase" value="any"/>
-                <param name="hhControl" value="any"/>
-                <param name="caseControStr" value="-+"/>
+                <param name="name" value=""/>
+                <param name="ctrl_src" value="caseString"/>
+                <param name="caseControlStr" value="-+"/>
                 <output name="output">
                     <assert_contents>
-                        <has_text text="CaseControl=1/0,1/0;" />
+                        <has_text text="Cases=1,0,2;" />
+                        <has_text text="Controls=1,0,2;" />
                     </assert_contents>
                 </output>
             </test>
 
         </tests>
 
-	<help>
+  <help>
 
 **SnpSift CaseControl**
 
@@ -107,5 +121,5 @@
 
 For details about this tool, please go to http://snpeff.sourceforge.net/SnpSift.html#casecontrol
 
-	</help>
+  </help>
 </tool>
--- a/snpSift_filter.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpSift_filter.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,20 +1,30 @@
-<tool id="snpSift_filter" name="SnpSift Filter" version="3.1">
+<tool id="snpSift_filter" name="SnpSift Filter" version="3.2">
 	<options sanitize="False" />
 	<description>Filter variants using arbitrary expressions</description>
-	<!-- 
-	    You will need to change the path to wherever your installation is.
-		You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
-	java -Xmx6G -jar $JAVA_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile > $output
-	-->
 	<requirements>
-                <requirement type="package" version="3.1">snpEff</requirement>
+                <requirement type="package" version="3.2">snpEff</requirement>
 	</requirements>
 	<command>
-		java -Xmx6G -jar \$JAVA_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile > $output
+		java -Xmx6G -jar \$JAVA_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile $inverse $pass 
+                #if $filterId and len($filterId.__str__.strip()) > 0:
+			--filterId = "$filterId"
+                #end if
+                #if $addFilter and len($addFilter.__str__.strip()) > 0:
+			--addFilter = "$addFilter"
+                #end if
+                #if $rmFilter and len($rmFilter.__str__.strip()) > 0:
+			--rmFilter = "$rmFilter"
+                #end if
+ 		> $output
 	</command>
 	<inputs>
 		<param format="vcf" name="input" type="data" label="VCF input"/>
-		<param name="expr" type="text" label="Expression" size="50"/>
+		<param name="expr" type="text" label="Expression" size="120"/>
+		<param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse. Show lines that do not match filter expression"/>
+		<param name="pass" type="boolean" truevalue="--pass" falsevalue="" checked="false" label="Use 'PASS' field instead of filtering out VCF entries"/>
+		<param name="filterId" type="text" value="" optional="true" label="ID for this filter (##FILTER tag in header and FILTER VCF field)." size="10"/>
+		<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"/>
 	</inputs>
 	<configfiles>
 		<configfile name="exprFile">
@@ -37,7 +47,7 @@
                 <param name="expr" value="QUAL >= 50"/>
                 <output name="output">
                     <assert_contents>
-                        <not_has_text text="25967" />
+                        <has_text text="28837706" />
                         <not_has_text text="NT_166464" />
                     </assert_contents>
                 </output>
@@ -56,7 +66,7 @@
 
             <test>
                 <param name="input" ftype="vcf" value="test01.vcf"/>
-                <param name="expr" value="(POS >= 20175 & (POS <= 35549)"/>
+                <param name="expr" value="(POS >= 20175) &amp; (POS &lt;= 35549)"/>
                 <output name="output">
                     <assert_contents>
                         <has_text text="20175" />
--- a/snpSift_int.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpSift_int.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,18 +1,20 @@
-<tool id="snpSift_int" name="SnpSift Intervals" version="3.1">
+<tool id="snpSift_int" name="SnpSift Intervals" version="3.2">
 	<description>Filter variants using intervals </description>
 	<!-- 
 	    You will need to change the path to wherever your installation is.
 		You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
 	-->
 	<requirements>
-                <requirement type="package" version="3.1">snpEff</requirement>
+                <requirement type="package" version="3.2">snpEff</requirement>
 	</requirements>
 	<command>
-		cat $input | java -Xmx2G -jar \$JAVA_JAR_PATH/SnpSift.jar int $bedFile > $output
+		java -Xmx2G -jar \$JAVA_JAR_PATH/SnpSift.jar intervals -i $input $exclude $bedFile > $output
 	</command>
 	<inputs>
 		<param format="vcf" name="input" type="data" label="VCF input"/>
 		<param format="bed" name="bedFile" type="data" label="Intervals (BED file)"/>
+		<param name="exclude" type="boolean" truevalue="-x" falsevalue="" checked="false" label="Exclude Intervals" 
+                       help="Filter out (exclude) VCF entries that match any interval in the BED files"/>
 	</inputs>
 	<outputs>
 		<data format="vcf" name="output" />
@@ -22,9 +24,11 @@
           <exit_code range="1:"  level="fatal"   description="Error" />
         </stdio>
         <tests>
+
             <test>
                 <param name="input" ftype="vcf" value="annotate_5.vcf"/>
                 <param name="bedFile" ftype="bed" value="interval.bed"/>
+                <param name="exclude" value="False"/>
                 <output name="output">
                     <assert_contents>
                         <has_text text="872687" />
@@ -33,6 +37,18 @@
                 </output>
             </test>
 
+            <test>
+                <param name="input" ftype="vcf" value="annotate_5.vcf"/>
+                <param name="bedFile" ftype="bed" value="interval.bed"/>
+                <param name="exclude" value="True"/>
+                <output name="output">
+                    <assert_contents>
+                        <has_text text="1195966" />
+                        <not_has_text text="872687" />
+                    </assert_contents>
+                </output>
+            </test>
+
         </tests>
 
 	<help>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/interval.bed	Mon May 13 12:45:07 2013 -0500
@@ -0,0 +1,10 @@
+chr1	1	100000
+chr1	100000	200000
+chr1	200000	300000
+chr1	300000	400000
+chr1	400000	500000
+chr1	500000	600000
+chr1	600000	700000
+chr1	700000	800000
+chr1	800000	900000
+chr1	900000	1000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/snpeffect_regulationdb.loc.sample	Mon May 13 12:45:07 2013 -0500
@@ -0,0 +1,19 @@
+## Databases for SnpEff 
+## These are from the list on: http://snpeff.sourceforge.net/download.html
+## the Description field in this sample is "Genome : Version" 
+#Genome	Regulation_Name
+GRCh37.70	CD4
+GRCh37.70	GM06990
+GRCh37.70	GM12878
+GRCh37.70	H1ESC
+GRCh37.70	HMEC
+GRCh37.70	HSMM
+GRCh37.70	HUVEC
+GRCh37.70	HeLa-S3
+GRCh37.70	HepG2
+GRCh37.70	IMR90
+GRCh37.70	K562
+GRCh37.70	K562b
+GRCh37.70	NH-A
+GRCh37.70	NHEK
+
--- a/tool_dependencies.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/tool_dependencies.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,22 +1,7 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="snpEff" version="3.1">
-        <install version="1.0">
-            <actions>
-                <action type="download_by_url">http://sourceforge.net/projects/snpeff/files/snpEff_v3_1_core.zip</action>
-                <action type="move_directory_files">
-                    <source_directory>.</source_directory>
-                    <destination_directory>$INSTALL_DIR</destination_directory>
-                </action>
-                <action type="set_environment">
-                    <environment_variable name="JAVA_JAR_PATH" action="set_to">$INSTALL_DIR</environment_variable>
-                </action>
-                <action type="set_environment">
-                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/scripts</environment_variable>
-                </action>
-            </actions>
-        </install>
-        <readme>
-        </readme>
+    <package name="snpEff" version="3.2">
+        <repository toolshed="http://toolshed.g2.bx.psu.edu" name="snpeff_3_2" owner="jjohnson" changeset_revision="8ece49cfe180" />
     </package>
 </tool_dependency>
+