changeset 1:1f4ee04c0841 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift_dbnsfp_generic/ commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
author iuc
date Mon, 05 Dec 2016 12:06:09 -0500
parents 0624d484adba
children a7cbaf3beadd
files repository_dependencies.xml snpSift_dbnsfp.xml snpSift_macros.xml tool_dependencies.xml
diffstat 4 files changed, 45 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/repository_dependencies.xml	Thu Jan 22 09:08:45 2015 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<repositories description="This requires the SnpEff dbnsfp datatype definitions.">
-    <repository changeset_revision="0c4372b93e85" name="snpsift_dbnsfp_datatypes" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-</repositories>
--- a/snpSift_dbnsfp.xml	Thu Jan 22 09:08:45 2015 -0500
+++ b/snpSift_dbnsfp.xml	Mon Dec 05 12:06:09 2016 -0500
@@ -1,24 +1,28 @@
-<tool id="snpSift_dbnsfp_generic" name="SnpSift dbNSFP" version="4.0.0">
+<tool id="snpSift_dbnsfp_generic" name="SnpSift dbNSFP" version="@WRAPPER_VERSION@.1">
     <description>Add Annotations from dbNSFP and similar annotation DBs</description>
-    <expand macro="requirements" />
     <macros>
         <import>snpSift_macros.xml</import>
     </macros>
-    <command>
-        java -Xmx6G -jar \$SNPEFF_JAR_PATH/SnpSift.jar dbnsfp -v
-        #if $db.dbsrc == 'cached' :
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
+    <command><![CDATA[
+        @CONDA_SNPSIFT_JAR_PATH@ &&
+        java -Xmx6G -jar "\$SNPSIFT_JAR_PATH/SnpSift.jar" dbnsfp -v
+        #if $db.dbsrc == 'cached':
           -db $db.dbnsfp 
-          #if $db.annotations and $db.annotations.__str__ != '':
+          #if $db.annotations and str($db.annotations) != '':
             -f "$db.annotations"
           #end if
-        #else :
+        #else:
           -db "${db.dbnsfpdb.extra_files_path}/${db.dbnsfpdb.metadata.bgzip}"
-          #if $db.annotations and $db.annotations.__str__ != '':
+          #if $db.annotations and str($db.annotations) != '':
             -f "$db.annotations"
           #end if
-        #end if          
-        $input > $output  
-        2> tmp.err &amp;&amp; grep -v file tmp.err
+        #end if
+        "$input" > "$output"
+        2> tmp.err && grep -v file tmp.err
+]]>
     </command>
     <inputs>
         <param name="input" type="data" format="vcf" label="Variant input file in VCF format"/>
@@ -53,24 +57,27 @@
             </when>
         </conditional>
     </inputs>
-    <expand macro="stdio" />
     <outputs>
         <data format="vcf" name="output" />
     </outputs>
     <tests>
+        <!-- This cannot be tested at the moment because test_dbnsfpdb.tabular
+             is converted from dbnsfp.tabular to snpsiftdbnsfp format on-the-fly
+             when this tool is run and annotation metadata is not available
+             until after the conversion is completed.
         <test>
-            <param name="input" ftype="vcf" value="test_annotate_in.vcf.vcf"/>
+            <param name="input" ftype="vcf" value="test_annotate_in.vcf"/>
             <param name="dbsrc" value="history"/>
             <param name="dbnsfpdb" value="test_dbnsfpdb.tabular" ftype="dbnsfp.tabular" />
-            <annotations value="aaref,aaalt,genename,aapos,SIFT_score"/>
+            <param name="annotations" value="aaref,aaalt,genename,aapos,SIFT_score"/>
             <output name="output">
                 <assert_contents>
                     <has_text text="dbNSFP_SIFT_score=0.15" />
                 </assert_contents>
             </output>
-        </test>
+        </test> -->
     </tests>
-    <help>
+    <help><![CDATA[
 
 The dbNSFP is an integrated database of functional predictions from multiple algorithms (SIFT, Polyphen2, LRT and MutationTaster, PhyloP and GERP++, etc.).
 It contains variant annotations such as:
@@ -125,7 +132,7 @@
   ESP6500_EA_AF
     Alternative allele frequency in the European American samples of the NHLBI GO Exome Sequencing Project (ESP6500 data set)
   FATHMM_pred
-    If a FATHMM_score is &lt;=-1.5 (or rankscore &lt;=0.81415) the corresponding non-synonymous SNP is predicted as "D(AMAGING)"; otherwise it is predicted as "T(OLERATED)". Multiple predictions separated by ";"
+    If a FATHMM_score is <=-1.5 (or rankscore <=0.81415) the corresponding non-synonymous SNP is predicted as "D(AMAGING)"; otherwise it is predicted as "T(OLERATED)". Multiple predictions separated by ";"
   FATHMM_rankscore
     FATHMMori scores were ranked among all FATHMMori scores in dbNSFP. The rankscore is the ratio of the rank of the score over the total number of FATHMMori scores in dbNSFP. If there are multiple scores, only the most damaging (largest) rankscore is presented. The scores range from 0 to 1
   FATHMM_score
@@ -153,7 +160,7 @@
   LRT_Omega
     Estimated nonsynonymous-to-synonymous-rate ratio (Omega, reported by LRT)
   LRT_converted_rankscore
-    LRTori scores were first converted as LRTnew=1-LRTori*0.5 if Omega&lt;1, or LRTnew=LRTori*0.5 if Omega&gt;=1. Then LRTnew scores were ranked among all LRTnew scores in dbNSFP. The rankscore is the ratio of the rank over the total number of the scores in dbNSFP. The scores range from 0.00166 to 0.85682
+    LRTori scores were first converted as LRTnew=1-LRTori*0.5 if Omega<1, or LRTnew=LRTori*0.5 if Omega>=1. Then LRTnew scores were ranked among all LRTnew scores in dbNSFP. The rankscore is the ratio of the rank over the total number of the scores in dbNSFP. The scores range from 0.00166 to 0.85682
   LRT_pred
     LRT prediction, D(eleterious), N(eutral) or U(nknown), which is not solely determined by the score
   LRT_score
@@ -223,7 +230,7 @@
   SIFT_converted_rankscore
     SIFTori scores were first converted to SIFTnew=1-SIFTori, then ranked among all SIFTnew scores in dbNSFP. The rankscore is the ratio of the rank the SIFTnew score over the total number of SIFTnew scores in dbNSFP. If there are multiple scores, only the most damaging (largest) rankscore is presented. The rankscores range from 0.02654 to 0.87932
   SIFT_pred
-    If SIFTori is smaller than 0.05 (rankscore&gt;0.55) the corresponding non-synonymous SNP is predicted as "D(amaging)"; otherwise it is predicted as "T(olerated)". Multiple predictions separated by ";"
+    If SIFTori is smaller than 0.05 (rankscore>0.55) the corresponding non-synonymous SNP is predicted as "D(amaging)"; otherwise it is predicted as "T(olerated)". Multiple predictions separated by ";"
   SIFT_score
     SIFT score (SIFTori). Scores range from 0 to 1. The smaller the score the more likely the SNP has damaging effect. Multiple scores separated by ";"
   SiPhy_29way_logOdds
@@ -242,15 +249,9 @@
     rs numbers from UniSNP, which is a cleaned version of dbSNP build 129, in format: rs number1;rs number2;...
 
 
-
-The procedure for preparing the dbNSFP data for use in SnpSift dbnsfp is in the SnpSift documentation:
+The procedure for preparing the dbNSFP data for use in SnpSift dbnsfp and a couple of prebuilt dbNSFP databases are available at:
 http://snpeff.sourceforge.net/SnpSift.html#dbNSFP
 
-A couple dbNSFP databases are prebuilt for SnpSift at: 
-http://sourceforge.net/projects/snpeff/files/databases/dbNSFP/
-
-
-
 
 **Uploading Your Own Annotations for any Genome**
 
@@ -289,9 +290,14 @@
 
 @EXTERNAL_DOCUMENTATION@
 	http://snpeff.sourceforge.net/SnpSift.html#dbNSFP
-
-@CITATION_SECTION@
-
-
+]]>
     </help>
+    <expand macro="citations">
+        <citation type="doi">DOI: 10.1002/humu.21517</citation>
+        <citation type="doi">DOI: 10.1002/humu.22376</citation>
+        <citation type="doi">DOI: 10.1002/humu.22932</citation>
+        <citation type="doi">doi: 10.1093/hmg/ddu733</citation>
+        <citation type="doi">doi: 10.1093/nar/gku1206</citation>
+        <citation type="doi">doi: 10.3389/fgene.2012.00035</citation>
+    </expand>
 </tool>
--- a/snpSift_macros.xml	Thu Jan 22 09:08:45 2015 -0500
+++ b/snpSift_macros.xml	Mon Dec 05 12:06:09 2016 -0500
@@ -1,7 +1,7 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="4.0">snpEff</requirement>
+            <requirement type="package" version="4.1">snpsift</requirement>
         </requirements>
     </xml>
   <xml name="stdio">
@@ -10,22 +10,20 @@
         <exit_code range="1:"  level="fatal" description="Error" />
     </stdio>
   </xml>
+  <token name="@CONDA_SNPSIFT_JAR_PATH@">if [ -z "\$SNPSIFT_JAR_PATH" ]; then export SNPSIFT_JAR_PATH=\$(dirname \$(readlink -e \$(which SnpSift))); fi</token>
+  <xml name="version_command">
+    <version_command><![CDATA[
+    if [ -z "$SNPSIFT_JAR_PATH" ]; then export SNPSIFT_JAR_PATH=$(dirname $(readlink -e $(which SnpSift))); fi &&
+    java -jar "$SNPSIFT_JAR_PATH/SnpSift.jar" dbnsfp 2>&1|head -n 1
+    ]]></version_command>
+  </xml>
+  <token name="@WRAPPER_VERSION@">4.1</token>
   <token name="@EXTERNAL_DOCUMENTATION@">
 
 For details about this tool, please go to:
 	http://snpeff.sourceforge.net/SnpEff_manual.html
 
   </token>
-  <token name="@CITATION_SECTION@">------
-
-**Citation**
-
-For the underlying tool, please cite the following two publications:
-
-SnpSift citation:
-"Using Drosophila melanogaster as a model for genotoxic chemical mutational studies with a new program, SnpSift", Cingolani, P., et. al., Frontiers in Genetics, 3:35, 2012.
-
-  </token>
   <xml name="citations">
       <citations>
         <citation type="doi">10.3389/fgene.2012.00035</citation>
--- a/tool_dependencies.xml	Thu Jan 22 09:08:45 2015 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?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>
-</tool_dependency>