changeset 2:e09ce114d240 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpeff
author iuc
date Fri, 19 Feb 2016 08:26:25 -0500
parents 500832f27cbc
children b24873564cf6
files .shed.yml snpEff.xml
diffstat 2 files changed, 88 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/.shed.yml	Thu Jan 22 08:28:37 2015 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# repository published to https://toolshed.g2.bx.psu.edu/repos/iuc/snpeff
-owner: iuc
-name: snpeff
--- a/snpEff.xml	Thu Jan 22 08:28:37 2015 -0500
+++ b/snpEff.xml	Fri Feb 19 08:26:25 2016 -0500
@@ -4,27 +4,28 @@
     <macros>
         <import>snpEff_macros.xml</import>
     </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
     <command>
 <![CDATA[
-        java -Xmx6G -jar \$SNPEFF_JAR_PATH/snpEff.jar eff 
-        -c \$SNPEFF_JAR_PATH/snpEff.config 
+        java -Xmx6G -jar "\$SNPEFF_JAR_PATH/snpEff.jar" eff
+        -c "\$SNPEFF_JAR_PATH/snpEff.config"
         -i $inputFormat -o ${outputConditional.outputFormat} -upDownStreamLen $udLength
-        #if $spliceSiteSize and $spliceSiteSize.__str__ != '':
-          -spliceSiteSize $spliceSiteSize
-        #end if
-        #if $filterIn and $filterIn.__str__ != 'no_filter':
-          $filterIn 
+        #if $spliceSiteSize and str($spliceSiteSize) != '':
+          -spliceSiteSize "$spliceSiteSize"
         #end if
-        #if $filterHomHet and $filterHomHet.__str__ != 'no_filter':
-          $filterHomHet 
+        #if $annotations and str($annotations) != '':
+          #echo " "
+          #echo ' '.join(str($annotations).split(','))
         #end if
-        #if $annotations and $annotations.__str__ != '':
+        #if $filterOut and str($filterOut) != '':
           #echo " "
-          #echo ' '.join($annotations.__str__.split(','))
+          #echo ' '.join(str($filterOut).split(','))
         #end if
-        #if $filterOut and $filterOut.__str__ != '':
-          #echo " "
-          #echo ' '.join($filterOut.__str__.split(','))
+        #if $filter.specificEffects == 'yes' and $filter.effects:
+          #for $eff in str($filter.effects).split(','):
+            -no $eff
+          #end for
         #end if
         #if str( $transcripts ) != 'None':
           -onlyTr $transcripts
@@ -33,51 +34,51 @@
           -interval $intervals
         #end if
         #if $statsFile:
-          -stats $statsFile 
+          -stats $statsFile
         #end if
-        #if $offset.__str__ != 'default':
-          ${offset} 
+        #if str($offset) != 'default':
+          ${offset}
         #end if
-        #if $chr.__str__.strip() != '':
-          -chr "$chr" 
+        #if str($chr).strip() != '':
+          -chr "$chr"
         #end if
-          $noLog 
+          $noLog
         #if $snpDb.genomeSrc == 'cached':
           -dataDir ${snpDb.genomeVersion.fields.path}
-          #if $snpDb.extra_annotations and $snpDb.extra_annotations.__str__ != '':
+          #if $snpDb.extra_annotations and str($snpDb.extra_annotations) != '':
             #echo " "
-            #echo ' '.join($snpDb.extra_annotations.__str__.split(','))
+            #echo ' '.join(str($snpDb.extra_annotations).split(','))
           #end if
-          #if $snpDb.regulation and $snpDb.regulation.__str__ != '':
-            -reg #echo ' -reg '.join($snpDb.regulation.__str__.split(','))#
+          #if $snpDb.regulation and str($snpDb.regulation) != '':
+            -reg #echo ' -reg '.join(str($snpDb.regulation).split(','))#
           #end if
           $snpDb.genomeVersion
         #elif $snpDb.genomeSrc == 'history':
           -dataDir ${snpDb.snpeff_db.extra_files_path}
-          #if $snpDb.extra_annotations and $snpDb.extra_annotations.__str__ != '':
-            #set xannotations = [' '] + $snpDb.extra_annotations.__str__.split(',')
+          #if $snpDb.extra_annotations and str($snpDb.extra_annotations) != '':
+            #set xannotations = [' '] + str($snpDb.extra_annotations).split(',')
             #echo " "
             #echo ' -'.join($xannotations)
           #end if
-          #if $snpDb.regulation and $snpDb.regulation.__str__ != '':
-            -reg #echo ' -reg '.join($snpDb.regulation.__str__.split(','))#
+          #if $snpDb.regulation and str($snpDb.regulation) != '':
+            -reg #echo ' -reg '.join(str($snpDb.regulation).split(','))#
           #end if
           ${snpDb.snpeff_db.metadata.genome_version}
-        #else 
+        #else
           -download
           $snpDb.genome_version
         #end if
-        $input > $snpeff_output ;
+        "$input" > "$snpeff_output";
         #if $statsFile:
             #import os
             #set $genes_file = str($statsFile) + '.genes.txt'
             #set $genes_file_name = os.path.split($genes_file)[-1]
             mkdir $statsFile.files_path;
-            mv $genes_file #echo os.path.join($statsFile.files_path, $genes_file_name)#;
+            mv "$genes_file" #echo os.path.join($statsFile.files_path, $genes_file_name)#;
         #end if
         #if $outputConditional.outputFormat == 'gatk' and $outputConditional.gatk_v1
           ## 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]"
-          sed -i 's/^\#\#SnpEffVersion="\(\S*\s\)/\#\#SnpEffVersion="2.0.5 - real is \1/' $snpeff_output
+          sed -i -e 's/^\#\#SnpEffVersion="\(\S*\s\)/\#\#SnpEffVersion="2.0.5 - real is \1/' "$snpeff_output"
         #end if
 ]]>
     </command>
@@ -159,7 +160,7 @@
                 </param>
             </when>
             <when value="named">
-                <param name="genome_version" type="text" size="40" value="" label="Snpff Genome Version Name (e.g. GRCh38.76)">
+                <param name="genome_version" type="text" value="" label="Snpff Genome Version Name (e.g. GRCh38.76)">
                     <help>@SNPEFF_DATABASE_URL@</help>
                     <validator type="regex" message="A genome version name is required">\S+</validator>
                 </param>
@@ -189,21 +190,6 @@
             <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>
-
-        <!-- The tool testing code can not handle select,radio,check boxes 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="-mnp">Only MNPs (multiple nucleotide polymorphisms)</option>
-            <option value="-snp">Only SNPs (single nucleotide polymorphisms)</option>
-        </param>
-
         <param name="annotations" type="select" display="checkboxes" multiple="true" label="Annotation options">
             <option value="-cancer">Perform 'cancer' comparisons (somatic vs. germline)</option>
             <option value="-canon">Only use canonical transcripts</option>
@@ -224,6 +210,60 @@
             <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>
+        <conditional name="filter">
+            <param name="specificEffects" type="select" label="Filter out specific Effects">
+                <option value="no">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no"/>
+            <when value="yes">
+                <param name="effects" type="select" display="checkboxes" multiple="true" label="Filter output: do not report these Effects">
+                    <option value="CDS">CDS  (coding_sequence_variant) The variant hits a CDS.  MODIFIER</option>
+                    <option value="CHROMOSOME_LARGE_DELETION">CHROMOSOME_LARGE_DELETION  (chromosome) A large parte (over 1%) of the chromosome was deleted.  HIGH</option>
+                    <option value="CODON_CHANGE">CODON_CHANGE  (coding_sequence_variant) One or many codons are changed e.g.: An MNP of size multiple of 3  MODERATE</option>
+                    <option value="CODON_INSERTION">CODON_INSERTION  (inframe_insertion) One or many codons are inserted e.g.: An insert multiple of three in a codon boundary  MODERATE</option>
+                    <option value="CODON_CHANGE_PLUS_CODON_INSERTION">CODON_CHANGE_PLUS_CODON_INSERTION  (disruptive_inframe_insertion) One codon is changed and one or many codons are inserted e.g.: An insert of size multiple of three, not at codon boundary  MODERATE</option>
+                    <option value="CODON_DELETION">CODON_DELETION  (inframe_deletion) One or many codons are deleted e.g.: A deletion multiple of three at codon boundary  MODERATE</option>
+                    <option value="CODON_CHANGE_PLUS_CODON_DELETION">CODON_CHANGE_PLUS_CODON_DELETION  (disruptive_inframe_deletion) One codon is changed and one or more codons are deleted e.g.: A deletion of size multiple of three, not at codon boundary  MODERATE</option>
+                    <option value="DOWNSTREAM">DOWNSTREAM  (downstream_gene_variant) Downstream of a gene (default length: 5K bases)  MODIFIER</option>
+                    <option value="EXON">EXON  (exon_variant) The variant hits an exon (from a non-coding transcript) or a retained intron.  MODIFIER</option>
+                    <option value="EXON_DELETED">EXON_DELETED  (exon_loss_variant) A deletion removes the whole exon.  HIGH</option>
+                    <option value="FRAME_SHIFT">FRAME_SHIFT  (frameshift_variant) Insertion or deletion causes a frame shift e.g.: An indel size is not multple of 3  HIGH</option>
+                    <option value="GENE">GENE  (gene_variant) The variant hits a gene.  MODIFIER</option>
+                    <option value="INTERGENIC">INTERGENIC  (intergenic_region) The variant is in an intergenic region  MODIFIER</option>
+                    <option value="INTERGENIC_CONSERVED">INTERGENIC_CONSERVED  (conserved_intergenic_variant) The variant is in a highly conserved intergenic region  MODIFIER</option>
+                    <option value="INTRAGENIC">INTRAGENIC  (intragenic_variant) The variant hits a gene, but no transcripts within the gene  MODIFIER</option>
+                    <option value="INTRON">INTRON  (intron_variant) Variant hits and intron. Technically, hits no exon in the transcript.  MODIFIER</option>
+                    <option value="INTRON_CONSERVED">INTRON_CONSERVED  (conserved_intron_variant) The variant is in a highly conserved intronic region  MODIFIER</option>
+                    <option value="MICRO_RNA">MICRO_RNA  (miRNA) Variant affects an miRNA  MODIFIER</option>
+                    <option value="NON_SYNONYMOUS_CODING">NON_SYNONYMOUS_CODING  (missense_variant) Variant causes a codon that produces a different amino acid e.g.: Tgg/Cgg, W/R  MODERATE</option>
+                    <option value="NON_SYNONYMOUS_START">NON_SYNONYMOUS_START  (initiator_codon_variant) Variant causes start codon to be mutated into another start codon (the new codon produces a different AA).  e.g.: Atg/Ctg, M/L (ATG and CTG can be START codons)  LOW</option>
+                    <option value="NON_SYNONYMOUS_STOP">NON_SYNONYMOUS_STOP  (stop_retained_variant) Variant causes stop codon to be mutated into another stop codon (the new codon produces a different AA).  e.g.: Atg/Ctg, M/L (ATG and CTG can be START codons)  LOW</option>
+                    <option value="RARE_AMINO_ACID">RARE_AMINO_ACID  (rare_amino_acid_variant) The variant hits a rare amino acid thus is likely to produce protein loss of function  HIGH</option>
+                    <option value="SPLICE_SITE_ACCEPTOR">SPLICE_SITE_ACCEPTOR  (splice_acceptor_variant) The variant hits a splice acceptor site (defined as two bases before exon start, except for the first exon).  HIGH</option>
+                    <option value="SPLICE_SITE_DONOR">SPLICE_SITE_DONOR  (splice_donor_variant) The variant hits a Splice donor site (defined as two bases after coding exon end, except for the last exon).  HIGH</option>
+                    <option value="SPLICE_SITE_REGION">SPLICE_SITE_REGION  (splice_region_variant) A sequence variant in which a change has occurred within the region of the splice site, either within 1-3 bases of the exon or 3-8 bases of the intron.  LOW</option>
+                    <option value="SPLICE_SITE_BRANCH">SPLICE_SITE_BRANCH  (splice_region_variant) A varaint affective putative (Lariat) branch point, located in the intron.  LOW</option>
+                    <option value="SPLICE_SITE_BRANCH_U12">SPLICE_SITE_BRANCH_U12  (splice_region_variant) A varaint affective putative (Lariat) branch point from U12 splicing machinery, located in the intron.  MODERATE</option>
+                    <option value="STOP_LOST">STOP_LOST  (stop_lost) Variant causes stop codon to be mutated into a non-stop codon e.g.: Tga/Cga, */R  HIGH</option>
+                    <option value="START_GAINED">START_GAINED  (5_prime_UTR_premature start_codon_gain_variant) A variant in 5'UTR region produces a three base sequence that can be a START codon.  LOW</option>
+                    <option value="START_LOST">START_LOST  (start_lost) Variant causes start codon to be mutated into a non-start codon.  e.g.: aTg/aGg, M/R  HIGH</option>
+                    <option value="STOP_GAINED">STOP_GAINED  (stop_gained) Variant causes a STOP codon e.g.: Cag/Tag, Q/*  HIGH</option>
+                    <option value="SYNONYMOUS_CODING">SYNONYMOUS_CODING  (synonymous_variant) Variant causes a codon that produces the same amino acid e.g.: Ttg/Ctg, L/L  LOW</option>
+                    <option value="SYNONYMOUS_START">SYNONYMOUS_START  (start_retained) Variant causes start codon to be mutated into another start codon.  e.g.: Ttg/Ctg, L/L (TTG and CTG can be START codons)  LOW</option>
+                    <option value="SYNONYMOUS_STOP">SYNONYMOUS_STOP  (stop_retained_variant) Variant causes stop codon to be mutated into another stop codon.  e.g.: taA/taG, */*  LOW</option>
+                    <option value="TRANSCRIPT">TRANSCRIPT  (transcript_variant) The variant hits a transcript.  MODIFIER</option>
+                    <option value="REGULATION">REGULATION  (regulatory_region_variant) The variant hits a known regulatory feature (non-coding).  MODIFIER</option>
+                    <option value="UPSTREAM">UPSTREAM  (upstream_gene_variant) Upstream of a gene (default length: 5K bases)  MODIFIER</option>
+                    <option value="UTR_3_PRIME">UTR_3_PRIME  (3_prime_UTR_variant) Variant hits 3'UTR region  MODIFIER</option>
+                    <option value="UTR_3_DELETED">UTR_3_DELETED  (3_prime_UTR_truncation + exon_loss) The variant deletes an exon which is in the 3'UTR of the transcript  MODERATE</option>
+                    <option value="UTR_5_PRIME">UTR_5_PRIME  (5_prime_UTR_variant) Variant hits 5'UTR region  MODIFIER</option>
+                    <option value="UTR_5_DELETED">UTR_5_DELETED  (5_prime_UTR_truncation + exon_loss_variant) The variant deletes an exon which is in the 5'UTR of the transcript  MODERATE</option>
+                    <option value="NEXT_PROT">NEXT_PROT  (sequence_feature + exon_loss_variant) A 'NextProt' based annotation. Details are provided in the 'feature type' sub-field (ANN), or in the effect details (EFF).  MODERATE </option>
+
+                </param>
+            </when>
+        </conditional>
 
         <param name="offset" type="select" display="radio" optional="true" label="Chromosomal position">
             <option value="default" selected="true">Use default (based on input type)</option>
@@ -252,7 +292,6 @@
             <filter>generate_stats == True</filter>
         </data>
     </outputs>
-    <expand macro="stdio" />
     <tests>
         <!-- Check that an effect was added in out VCF -->
         <!-- Check for a HTML header indicating that this was successful -->
@@ -271,8 +310,6 @@
         <param name="genomeSrc" value="named"/>
         <param name="genome_version" value="testCase"/>
         <param name="udLength" value="0"/>
-        <param name="filterHomHet" value="no_filter"/>
-        <param name="filterIn" value="no_filter"/>
         <param name="generate_stats" value="False"/>
         <param name="filterOut" value="+-no-upstream"/>
         <output name="snpeff_output">
@@ -290,29 +327,6 @@
         <param name="genomeSrc" value="named"/>
         <param name="genome_version" value="testCase"/>
         <param name="udLength" value="0"/>
-        <param name="filterHomHet" value="+-het"/>
-        <param name="filterIn" value="no_filter"/>
-        <!--
-        <param name="filterOut" value=""/>
-        -->
-        <param name="generate_stats" value="False"/>
-        <output name="snpeff_output">
-            <assert_contents>
-            <!-- Check that NO effects were added since -het is set -->
-            <not_has_text text="EFF=NON_SYNONYMOUS_CODING" />
-            </assert_contents>
-        </output>
-        </test>
-
-        <test>
-        <param name="input" ftype="vcf" value="vcf_homhet.vcf"/>
-        <param name="inputFormat" value="vcf"/>
-        <param name="outputFormat" value="vcf"/>
-        <param name="genomeSrc" value="named"/>
-        <param name="genome_version" value="testCase"/>
-        <param name="udLength" value="0"/>
-        <param name="filterHomHet" value="no_filter"/>
-        <param name="filterIn" value="+-del"/>
         <!--
         <param name="filterOut" value=""/>
         -->
@@ -336,8 +350,6 @@
         <param name="genomeSrc" value="named"/>
         <param name="genome_version" value="testCase"/>
         <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"/>
         <output name="snpeff_output">