changeset 4:20f1b45dea63 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kobas commit 57f71aa633a43ab02bbf05acd0c6d7f406e01f1e"
author iuc
date Thu, 28 Nov 2019 15:50:07 -0500
parents 83b998fa34ea
children
files kobas_annotate.xml kobas_identify.xml kobas_macros.xml repository_dependencies.xml
diffstat 4 files changed, 120 insertions(+), 148 deletions(-) [+]
line wrap: on
line diff
--- a/kobas_annotate.xml	Thu Nov 10 16:21:41 2016 -0500
+++ b/kobas_annotate.xml	Thu Nov 28 15:50:07 2019 -0500
@@ -1,4 +1,4 @@
-<tool id="kobas_annotate" name="KOBAS Annotate" version="@WRAPPER_VERSION@">
+<tool id="kobas_annotate" name="KOBAS Annotate" version="@TOOL_VERSION@">
     <description>KEGG Orthology Based Annotation System</description>
     <macros>
         <import>kobas_macros.xml</import>
@@ -10,78 +10,74 @@
         <exit_code range="0" level="warning" description="BiopythonDeprecationWarning"/>
         <exit_code range="1" level="fatal" description="Bad input settings or none of the entries was annotated successfully."/>
     </stdio>
-    <command>
-        <![CDATA[
-
-        ## create the KOBAS directories
-        mkdir sqlite &&
-        mkdir seq_pep &&
+    <command><![CDATA[
+## create the KOBAS directories
+mkdir sqlite &&
+mkdir seq_pep &&
 
-        #if $blast_opts.choice == 'local':
-            #set $blast_path = $blast_opts.localdb.fields.path
-        #else if $blast_opts.choice == 'fasta':
-            makeblastdb
-                -in '$blast_opts.fastadb'
-                -dbtype 'prot'
-                -out 'seq_pep/${species}.pep.fasta' &&
-        #else:
-            #set $blast_path = $os.path.join($blast_opts.histdb.extra_files_path,'blastdb')
-        #end if
+#if $blast_opts.choice == 'local':
+    #set $blast_path = $blast_opts.localdb.fields.path
+#elif $blast_opts.choice == 'fasta':
+    makeblastdb
+        -in '$blast_opts.fastadb'
+        -dbtype 'prot'
+        -out 'seq_pep/${species}.pep.fasta' &&
+#else:
+    #set $blast_path = $os.path.join($blast_opts.histdb.extra_files_path,'blastdb')
+#end if
 
-        ## create the database symlinks to comply with how KOBAS wants them
-        ln -s '$organismdb' sqlite/organism.db &&
-        ln -s '$kobasdb' 'sqlite/${species}.db' &&
+## create the database symlinks to comply with how KOBAS wants them
+ln -s '$organismdb' sqlite/organism.db &&
+ln -s '$kobasdb' 'sqlite/${species}.db' &&
 
-        #if $blast_opts.choice != 'fasta':
-            ln -s '${blast_path}.phr' 'seq_pep/${species}.pep.fasta.phr' &&
-            ln -s '${blast_path}.pin' 'seq_pep/${species}.pep.fasta.pin' &&
-            ln -s '${blast_path}.psq' 'seq_pep/${species}.pep.fasta.psq' && ls -l seq_pep/ &&
-        #end if
+#if $blast_opts.choice != 'fasta':
+    ln -s '${blast_path}.phr' 'seq_pep/${species}.pep.fasta.phr' &&
+    ln -s '${blast_path}.pin' 'seq_pep/${species}.pep.fasta.pin' &&
+    ln -s '${blast_path}.psq' 'seq_pep/${species}.pep.fasta.psq' && ls -l seq_pep/ &&
+#end if
 
-        ## create the orthologe database symlinks to comply with how KOBAS wants them
-        #if $ortholog.only == 'YES' and str($ortholog.species) != str($species):
+## create the orthologe database symlinks to comply with how KOBAS wants them
+#if $ortholog.only == 'YES' and str($ortholog.species) != str($species):
 
-            #if $ortholog.blast_opts_ortholog.choice == 'local':
-                #set $blast_path = $ortholog.blast_opts_ortholog.localdb.fields.path
-            #else if $ortholog.blast_opts_ortholog.choice == 'fasta':
-                makeblastdb
-                    -in '$ortholog.blast_opts_ortholog.fastadb'
-                    -dbtype 'prot'
-                    -out 'seq_pep/${ortholog.species}.pep.fasta' &&
-            #else:
-                #set $blast_path = $os.path.join($ortholog.blast_opts_ortholog.histdb.extra_files_path,'blastdb')
-            #end if
+    #if $ortholog.blast_opts_ortholog.choice == 'local':
+        #set $blast_path = $ortholog.blast_opts_ortholog.localdb.fields.path
+    #elif $ortholog.blast_opts_ortholog.choice == 'fasta':
+        makeblastdb
+            -in '$ortholog.blast_opts_ortholog.fastadb'
+            -dbtype 'prot'
+            -out 'seq_pep/${ortholog.species}.pep.fasta' &&
+    #else:
+        #set $blast_path = $os.path.join($ortholog.blast_opts_ortholog.histdb.extra_files_path,'blastdb')
+    #end if
 
-            ln -s '$ortholog.kobasdb' 'sqlite/${ortholog.species}.db' &&
+    ln -s '$ortholog.kobasdb' 'sqlite/${ortholog.species}.db' &&
 
-            #if $blast_opts.choice != 'fasta':
-                ln -s '${blast_path}.phr' 'seq_pep/${ortholog.species}.pep.fasta.phr' &&
-                ln -s '${blast_path}.pin' 'seq_pep/${ortholog.species}.pep.fasta.pin' &&
-                ln -s '${blast_path}.psq' 'seq_pep/${ortholog.species}.pep.fasta.psq' &&
-            #end if
-        #end if
+    #if $blast_opts.choice != 'fasta':
+        ln -s '${blast_path}.phr' 'seq_pep/${ortholog.species}.pep.fasta.phr' &&
+        ln -s '${blast_path}.pin' 'seq_pep/${ortholog.species}.pep.fasta.pin' &&
+        ln -s '${blast_path}.psq' 'seq_pep/${ortholog.species}.pep.fasta.psq' &&
+    #end if
+#end if
 
-        kobas-annotate
-            -i '$infile'
-            -t '$intype'
-            -s '$species'
-            -e '$evalue'
-            -r $rank
-            -n "\${GALAXY_SLOTS:-4}"
-            -c $coverage
-            #if $ortholog.only == 'YES':
-                -z '$ortholog.species'
-            #end if
-            -y seq_pep
-            -q sqlite
-            -p blastp
-            -x blastx
-            -o '$output'
-
-        ]]>
-    </command>
+kobas-annotate
+-i '$infile'
+-t '$intype'
+-s '$species'
+-e '$evalue'
+-r $rank
+-n "\${GALAXY_SLOTS:-4}"
+-c $coverage
+#if $ortholog.only == 'YES':
+    -z '$ortholog.species'
+#end if
+-y seq_pep
+-q sqlite
+-p blastp
+-x blastx
+-o '$output'
+    ]]></command>
     <inputs>
-        <param format="fasta,tabular,txt" type="data" label="Input file" help="Input data file matching the input type." argument="--infile"/>
+        <param argument="--infile" type="data" format="fasta,tabular,txt" label="Input file" help="Input data file matching the input type."/>
         <param type="select" label="Input type" argument="--intype" help="Input data type, default fasta:pro">
             <option value="fasta:pro">FASTA protein sequence</option>
             <option value="fasta:nuc">FASTA nucleotide sequence</option>
@@ -99,12 +95,12 @@
 
         <expand macro="input_kobasdb"/>
 
-        <param format="sqlite" name="organismdb" type="data" label="Organism database" help="KOBAS organism database, available at http://kobas.cbi.pku.edu.cn/download.php"/>
-        <param type="text" argument="--evalue" value="1e-5" label="E-value" help="Expect threshold for BLAST, default 1e-5"/>
-        <param type="integer" argument="--rank" value="5" min="0" label="Rank cutoff" help="Rank cutoff for valid hits from BLAST result, default 5"/>
-        <param type="integer" argument="--coverage" value="0" min="0" label="Subject coverage cutoff" help="subject coverage cutoff for BLAST, default 0"/>
+        <param name="organismdb" type="data" format="sqlite" label="Organism database" help="KOBAS organism database, available at http://kobas.cbi.pku.edu.cn/download.php"/>
+        <param argument="--evalue" type="text" value="1e-5" label="E-value" help="Expect threshold for BLAST, default 1e-5"/>
+        <param argument="--rank" type="integer" min="0" value="5" label="Rank cutoff" help="Rank cutoff for valid hits from BLAST result, default 5"/>
+        <param argument="--coverage" type="integer" min="0" value="0" label="Subject coverage cutoff" help="subject coverage cutoff for BLAST, default 0"/>
         <conditional name="ortholog">
-            <param name="only" type="select" argument="--ortholog" label="Only use orthologs" help="Whether only use orthologs for cross-species annotation or not, default NO (if only use orthologs, please provide the species abbreviation of your input)">
+            <param name="only" argument="--ortholog" type="select" label="Only use orthologs" help="Whether only use orthologs for cross-species annotation or not, default NO (if only use orthologs, please provide the species abbreviation of your input)">
                 <option value="NO">No</option>
                 <option value="YES">Yes</option>
             </param>
@@ -118,7 +114,7 @@
         </conditional>
     </inputs>
     <outputs>
-        <data format="tabular" name="output"/>
+        <data name="output" format="tabular"/>
     </outputs>
 
     <tests>
@@ -132,7 +128,7 @@
             <param name="species" value="aaa"/>
             <param name="kobasdb" value="aaa.db"/>
             <param name="organismdb" value="organism.db"/>
-            <output name="out_file1" file="kobas_annotate_output.txt"/>
+            <output name="output" file="kobas_annotate_output.txt"/>
         </test>
     </tests>
 
--- a/kobas_identify.xml	Thu Nov 10 16:21:41 2016 -0500
+++ b/kobas_identify.xml	Thu Nov 28 15:50:07 2019 -0500
@@ -1,4 +1,4 @@
-<tool id="kobas_identify" name="KOBAS Identify" version="@WRAPPER_VERSION@">
+<tool id="kobas_identify" name="KOBAS Identify" version="@TOOL_VERSION@">
     <description>KEGG Orthology Based Annotation System</description>
     <macros>
         <import>kobas_macros.xml</import>
@@ -6,44 +6,41 @@
 
     <expand macro="requirements"/>
 
-    <command>
-        <![CDATA[
-
-        mkdir sqlite &&
-        mkdir seq_pep &&
+    <command><![CDATA[
+mkdir sqlite &&
+mkdir seq_pep &&
 
-        #if not isinstance( $db.value, list ):
-            #set $db_args = [ $db.value ]
-        #else:
-            #set $db_args = $db.value
-        #end if
-        #set $db_args = "/".join($db.value)
+#if not isinstance( $db.value, list ):
+    #set $db_args = [ $db.value ]
+#else:
+    #set $db_args = $db.value
+#end if
+#set $db_args = "/".join($db.value)
 
-        ln -s '$kobasdb' 'sqlite/${species}.db' &&
+ln -s '$kobasdb' 'sqlite/${species}.db' &&
 
-        kobas-identify
-            -f '$fgfile'
-            #if $bg.bgtype == 'file':
-                -b '$bg.bgfile'
-            #elif $bg.bgtype == 'species':
-                -b '$bg.bgspecies'
-            #end if
-            -d '$db_args'
-            -m '$method'
-            -n '$fdr'
-            -c $cutoff
-            -q sqlite
-            -p blastp
-            -x blastx
-            -o '$output'
-        ]]>
-    </command>
+kobas-identify
+-f '$fgfile'
+#if $bg.bgtype == 'file':
+    -b '$bg.bgfile'
+#elif $bg.bgtype == 'species':
+    -b '$bg.bgspecies'
+#end if
+-d '$db_args'
+-m '$method'
+-n '$fdr'
+-c $cutoff
+-q sqlite
+-p blastp
+-x blastx
+-o '$output'
+    ]]></command>
     <inputs>
-        <param format="tabular" type="data" label="Foreground" argument="--fgfile" help="Foreground file, the output of KOBAS Annotate"/>
+        <param argument="--fgfile" type="data" format="tabular" label="Foreground" help="Foreground file, the output of KOBAS Annotate"/>
 
         <expand macro="input_kobasdb"/>
 
-        <param type="select" label="Database" argument="--db" multiple="True" display="checkboxes" help="Select your desired databases:
+        <param type="select" label="Database" argument="--db" multiple="True" optional="false" display="checkboxes" help="Select your desired databases:
 (Note: the Corrected P-Values will be affected by the number of selected databases)">
             <option value="K">KEGG Pathway</option>
             <option value="n">PID</option>
@@ -58,15 +55,10 @@
             <option value="N">NHGRI GWAS Catalog</option>
             <option value="G">Gene Ontology</option>
             <option value="S">Gene Ontology Slim (GOslim)</option>
-            <validator type="no_options" message="You must pick at least one database."/>
         </param>
 
         <conditional name="bg">
-            <param
-                name="bgtype"
-                type="select"
-                argument="--bgfile"
-                label="Background"
+            <param name="bgtype" argument="--bgfile" type="select" label="Background"
                 help="Optional background file, the output of annotate (3 or 4-letter
                         file name is not allowed), or species abbreviation
                         (for example: hsa for Homo sapiens, mmu for Mus
@@ -80,13 +72,10 @@
             </param>
             <when value="same"></when>
             <when value="file">
-                <param format="txt" name="bgfile" type="data" label="Background file"/>
+                <param name="bgfile" type="data" format="txt" label="Background file"/>
             </when>
             <when value="species">
-                <param
-                    name="bgspecies"
-                    type="text"
-                    label="Species abbreviation"
+                <param name="bgspecies" type="text" label="Species abbreviation"
                     help="For example: ko for KEGG
                         Orthology, hsa for Homo sapiens, mmu for Mus musculus,
                         dme for Drosophila melanogaster, ath for Arabidopsis
@@ -102,18 +91,17 @@
             <option value="x">Frequency list</option>
         </param>
 
-        <param type="select" argument="--fdr" label="FDR" help="False discovery rate (FDR) correction method">
+        <param argument="--fdr" type="select" label="FDR" help="False discovery rate (FDR) correction method">
             <option selected="True" value="BH">Benjamini and Hochberg</option>
             <option value="BY">Benjamini and Yekutieli</option>
             <option value="QVALUE">QVALUE</option>
             <option value="None">None</option>
         </param>
 
-        <param type="integer" min="0" argument="--cutoff" value="5" label="Cutoff" help="Terms with less than cutoff number of genes are not used for statistical tests, default 5"/>
-
+        <param argument="--cutoff" type="integer" min="0" value="5" label="Cutoff" help="Terms with less than cutoff number of genes are not used for statistical tests, default 5"/>
     </inputs>
     <outputs>
-        <data format="tabular" name="output"/>
+        <data name="output" format="tabular"/>
     </outputs>
 
     <tests>
@@ -125,7 +113,7 @@
             <conditional name="bg">
                 <param name="bgtype" value="same"/>
             </conditional>
-            <output name="out_file1" file="kobas_identify_output.txt"/>
+            <output name="output" file="kobas_identify_output.txt"/>
         </test>
     </tests>
 
--- a/kobas_macros.xml	Thu Nov 10 16:21:41 2016 -0500
+++ b/kobas_macros.xml	Thu Nov 28 15:50:07 2019 -0500
@@ -1,23 +1,21 @@
 <macros>
-    <token name="@WRAPPER_VERSION@">0.4</token>
-    <token name="@KOBAS_VERSION@">2.1.1</token>
+    <token name="@TOOL_VERSION@">2.1.1</token>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="@KOBAS_VERSION@">kobas</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">kobas</requirement>
+            <!-- kobas 2.1.1 is not compatible with Biopython >=1.73 due to https://github.com/biopython/biopython/issues/1952 -->
+            <requirement type="package" version="1.72">biopython</requirement>
+            <!-- Help conda resolving the enviroment, hopefully this can be removed for next update -->
+            <requirement type="package" version="3.4">r-base</requirement>
         </requirements>
     </xml>
     <xml name="input_kobasdb">
-        <param
-            name="species"
-            type="text"
-            label="Species abbreviation"
-            argument="--species"
-            help="For example: ko for KEGG
-                        Orthology, hsa for Homo sapiens, mmu for Mus musculus,
-                        dme for Drosophila melanogaster, ath for Arabidopsis
-                        thaliana, sce for Saccharomyces cerevisiae and eco for
-                        Escherichia coli K-12 MG1655"/>
-        <param format="sqlite" name="kobasdb" type="data" label="KOBAS database" help="KOBAS species database, available for multiple species at http://kobas.cbi.pku.edu.cn/download.php"/>
+        <param argument="--species" type="text" label="Species abbreviation"
+            help="For example: ko for KEGG Orthology, hsa for Homo sapiens, mmu
+                for Mus musculus, dme for Drosophila melanogaster, ath for
+                Arabidopsis thaliana, sce for Saccharomyces cerevisiae and eco
+                for Escherichia coli K-12 MG1655"/>
+        <param name="kobasdb" type="data" format="sqlite" label="KOBAS database" help="KOBAS species database, available for multiple species at http://kobas.cbi.pku.edu.cn/download.php"/>
     </xml>
     <xml name="blastdb_selector">
         <param name="choice" type="select" label="BLAST Protein database">
@@ -26,26 +24,16 @@
             <option value="local" selected="True">Locally installed BLAST database</option>
         </param>
         <when value="fasta">
-            <param name="fastadb" format="fasta" type="data" label="FASTA File for BLAST DB" help="FASTA file which will be used to create a BLAST database with makeblastdb."/>
-            <param name="histdb" type="hidden" value=""/>
-            <param name="fasta" type="hidden" value=""/>
+            <param name="fastadb" type="data" format="fasta" label="FASTA File for BLAST DB" help="FASTA file which will be used to create a BLAST database with makeblastdb."/>
         </when>
         <when value="histdb">
-            <param name="localdb" type="hidden" value=""/>
-            <param name="fastadb" type="hidden" value=""/>
-            <param
-                name="histdb"
-                type="data"
-                format="blastdbp"
-                label="Protein BLAST database"
+            <param name="histdb" type="data" format="blastdbp" label="Protein BLAST database"
                 help="The protein BlAST database used by KOBAS. FASTA files to create BLAST databases with makeblastdb can be found for multiple species at http://kobas.cbi.pku.edu.cn/download.php"/>
         </when>
         <when value="local">
             <param name="localdb" type="select" label="Protein BLAST database">
                 <options from_data_table="blastdb_p"/>
             </param>
-            <param name="histdb" type="hidden" value=""/>
-            <param name="fastadb" type="hidden" value=""/>
         </when>
     </xml>
     <xml name="kobas_citations">
--- a/repository_dependencies.xml	Thu Nov 10 16:21:41 2016 -0500
+++ b/repository_dependencies.xml	Thu Nov 28 15:50:07 2019 -0500
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" ?>
 <repositories description="This requires the BLAST datatype definitions (e.g. the BLAST XML format).">
-    <repository changeset_revision="01b38f20197e" name="blast_datatypes" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
-</repositories>
+    <repository changeset_revision="01b38f20197e" name="blast_datatypes" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu"/>
+</repositories>
\ No newline at end of file