changeset 8:96cac424c870 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/eggnog_mapper/eggnog_mapper commit e45c15081260025e470d23975ef5a734d3f8fc66"
author galaxyp
date Tue, 25 Jan 2022 13:51:50 +0000
parents 4e4c6329f6cd
children 63662ae295d6
files eggnog_macros.xml eggnog_mapper.xml test-data/DIA_nlim.emapper.annotations test-data/DIA_nlim.emapper.annotations_orthologs test-data/DIA_nlim.emapper.seed_orthologs test-data/README test-data/cached_locally/eggnog.db test-data/cached_locally/eggnog.taxa.db test-data/cached_locally/eggnog_mapper_db_versioned.loc test-data/eggnogg_tiny.sh test-data/eggnogg_tiny_taxa.sh test-data/scoped.emapper.annotations test-data/scoped.emapper.annotations_orthologs test-data/scoped.emapper.seed_orthologs tool-data/eggnog_mapper_db_versioned.loc.sample
diffstat 15 files changed, 329 insertions(+), 157 deletions(-) [+]
line wrap: on
line diff
--- a/eggnog_macros.xml	Fri Feb 19 18:54:25 2021 +0000
+++ b/eggnog_macros.xml	Tue Jan 25 13:51:50 2022 +0000
@@ -1,14 +1,15 @@
 <?xml version="1.0"?>
 <macros>
-   <token name="@VERSION@">2.0.1</token>
-   <token name="@EGGNOG_DB_VERSION@">2.0</token>
+   <token name="@VERSION@">2.1.6</token>
+   <token name="@EGGNOG_DB_VERSION@">5.0.2</token>
     <!--
-    # Versionning is super confusing:
+    # DB versionning was super confusing for eggnog-mapper 2.0.x:
     # eggnog-mapper 1.* needed a db v4.5 (based on eggnog v4.5)
-    # eggnog-mapper 2.0 needs a db v2.0 (based on eggnog v5.0)
-    # db v4.5 are not compatible with eggnog-mapper 2.0
+    # eggnog-mapper 2.x needed a db v2.0 (based on eggnog v5.0)
+    # (db v4.5 are not compatible with eggnog-mapper 2.0)
+    # Starting with eggnog-mapper 2.1.* db versioning looks better: 2.1.0 requires db v5.0.2
     -->
-   <token name="@IDX_VERSION@">2.0</token>
+   <token name="@IDX_VERSION@">5.0.2</token>
    <xml name="citations">
         <citations>
             <citation type="doi">10.1093/nar/gkv1248</citation>
@@ -26,6 +27,8 @@
     <xml name="data_manager_params">
         <param name="test" type="hidden" value="false" />
         <param name="diamond_database" type="boolean" truevalue="" falsevalue="-D" checked="true" label="Install the diamond database" help="Takes ~9Gb, you most probably want it."/>
+        <param name="mmseqs_database" type="boolean" truevalue="-M" falsevalue="" checked="true" label="Install the MMseqs2 database" help="Required for mmseqs seed ortholog search mode. Takes ~11Gb, you most probably want it."/>
+        <param name="pfam_database" type="boolean" truevalue="-P" falsevalue="" checked="true" label="Install the Pfam database" help="Rquired for de novo annotation or realignment. Takes ~3Gb, you most probably want it."/>
     </xml>
     <xml name="data_manager_outputs">
         <outputs>
@@ -40,7 +43,7 @@
 #end if
 mkdir -p '${install_path}' &&
 download_eggnog_data.py
-  $diamond_database -y -q
+  $diamond_database $mmseqs_database $pfam_database -y -q
 #if $test == 'true'
   -s
 #end if
--- a/eggnog_mapper.xml	Fri Feb 19 18:54:25 2021 +0000
+++ b/eggnog_mapper.xml	Tue Jan 25 13:51:50 2022 +0000
@@ -8,14 +8,38 @@
     <command detect_errors="aggressive"><![CDATA[
         emapper.py
         --data_dir '$eggnog_data.fields.path'
-        -m diamond
-        $translate
+        -m '$seed_ortho_options.ortho_method.m'
+        --itype '${input_trans.itype}'
+        #if $input_trans.itype in ['CDS', 'genome', 'metagenome']:
+            $input_trans.translate
+        #end if
+        #if $input_trans.itype in ['genome', 'metagenome']:
+            $input_trans.genepred
+        #end if
 
         ## Diamond option
-        --matrix '$diamond.matrix_gapcosts.matrix'
-        $diamond.matrix_gapcosts.gap_costs
-        --query-cover $diamond.query_cover
-        --subject-cover $diamond.subject_cover
+        #if $seed_ortho_options.ortho_method.m == "diamond":
+            --matrix '$seed_ortho_options.ortho_method.matrix_gapcosts.matrix'
+            $seed_ortho_options.ortho_method.matrix_gapcosts.gap_costs
+            --sensmode $seed_ortho_options.ortho_method.sensmode
+            $seed_ortho_options.ortho_method.dmnd_iterate
+            $seed_ortho_options.ortho_method.dmnd_ignore_warnings
+        #elif $seed_ortho_options.ortho_method.m == "mmseqs":
+            --start_sens $seed_ortho_options.ortho_method.start_sens
+            --sens_steps $seed_ortho_options.ortho_method.sens_steps
+            --final_sens $seed_ortho_options.ortho_method.final_sens
+        #end if
+
+        ## Common options for search filtering
+        #if $seed_ortho_options.query_cover:
+        --query_cover $seed_ortho_options.query_cover
+        #end if
+        #if $seed_ortho_options.subject_cover:
+        --subject_cover $seed_ortho_options.subject_cover
+        #end if
+        #if $seed_ortho_options.pident:
+        --pident $seed_ortho_options.pident
+        #end if
 
         #if $annotation_options.tax_scope:
             --tax_scope=$annotation_options.tax_scope
@@ -27,10 +51,10 @@
             --go_evidence=$annotation_options.go_evidence
         #end if
         #if $seed_ortholog_options.seed_ortholog_evalue:
-            --seed_ortholog_evalue=$seed_ortholog_options.seed_ortholog_evalue
+            --evalue=$seed_ortholog_options.seed_ortholog_evalue
         #end if
         #if str($seed_ortholog_options.seed_ortholog_score):
-            --seed_ortholog_score=$seed_ortholog_options.seed_ortholog_score
+            --score=$seed_ortholog_options.seed_ortholog_score
         #end if
         $output_options.no_file_comments
         $output_options.no_annot
@@ -41,145 +65,199 @@
     ]]></command>
     <inputs>
         <param name="input" type="data" format="fasta" label="Fasta sequences to annotate"/>
+        <conditional name="input_trans">
+            <param argument="--itype" type="select" label="Type of sequences">
+                <option value="proteins" selected="true">proteins</option>
+                <option value="CDS">CDS</option>
+                <option value="genome">genome</option>
+                <option value="metagenome">metagenome</option>
+            </param>
+            <when value="proteins"/>
+            <when value="CDS">
+                <param name="translate" type="boolean" truevalue="--translate" falsevalue="" checked="false"
+                    label="Translate CDS to proteins before search"/>
+            </when>
+            <when value="genome">
+                <param name="translate" type="boolean" truevalue="--translate" falsevalue="" checked="false"
+                    label="Translate predicted CDS from blastx hits to proteins"/>
+                <param argument="--genepred" type="select" label="Type of sequences">
+                    <option value="search" selected="true">Inferred from Diamond/MMseqs2 blastx hits</option>
+                    <option value="prodigal">Performed using Prodigal</option>
+                </param>
+            </when>
+            <when value="metagenome">
+                <param name="translate" type="boolean" truevalue="--translate" falsevalue="" checked="false"
+                    label="Translate predicted CDS from blastx hits to proteins"/>
+                <param argument="--genepred" type="select" label="Type of sequences">
+                    <option value="search" selected="true">Inferred from Diamond/MMseqs2 blastx hits</option>
+                    <option value="prodigal">Performed using Prodigal</option>
+                </param>
+            </when>
+        </conditional>
         <param name="eggnog_data" type="select" label="Version of eggNOG Database">
             <options from_data_table="eggnog_mapper_db_versioned">
                 <filter type="static_value" column="3" value="@IDX_VERSION@" />
             </options>
         </param>
-        <param name="translate" type="boolean" truevalue="--translate" falsevalue="" checked="false"
-            label="Are these coding DNA sequences that need to be translated?"/>
 
-        <section name="diamond" expanded="true" title="Diamond Options">
-            <conditional name="matrix_gapcosts">
-                <param argument="--matrix" type="select" label="Scoring matrix and gap costs">
-                    <option value="BLOSUM90">BLOSUM90</option>
-                    <option value="BLOSUM80">BLOSUM80</option>
-                    <option value="BLOSUM62" selected="true">BLOSUM62</option>
-                    <option value="BLOSUM50">BLOSUM50</option>
-                    <option value="BLOSUM45">BLOSUM45</option>
-                    <option value="PAM250">PAM250</option>
-                    <option value="PAM70">PAM70</option>
-                    <option value="PAM30">PAM30</option>
+        <section name="seed_ortho_options" expanded="true" title="Seed orthologs search options">
+            <conditional name="ortho_method">
+                <param argument="-m" type="select" label="Method to search seed orthologs">
+                    <option value="diamond" selected="true">Diamond</option>
+                    <option value="mmseqs">MMseqs2</option>
                 </param>
-                <when value="BLOSUM90">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 9 --gapextend 2">Existence: 9  Extension: 2</option>
-                        <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
-                        <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
-                        <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
-                        <option value="--gapopen 11 --gapextend 1">Existence: 11  Extension: 1</option>
-                        <option value="--gapopen 10 --gapextend 1" selected="true">Existence: 10  Extension: 1</option>
-                        <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
+                <when value="diamond">
+                    <conditional name="matrix_gapcosts">
+                        <param argument="--matrix" type="select" label="Scoring matrix and gap costs">
+                            <option value="BLOSUM90">BLOSUM90</option>
+                            <option value="BLOSUM80">BLOSUM80</option>
+                            <option value="BLOSUM62" selected="true">BLOSUM62</option>
+                            <option value="BLOSUM50">BLOSUM50</option>
+                            <option value="BLOSUM45">BLOSUM45</option>
+                            <option value="PAM250">PAM250</option>
+                            <option value="PAM70">PAM70</option>
+                            <option value="PAM30">PAM30</option>
+                        </param>
+                        <when value="BLOSUM90">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 9 --gapextend 2">Existence: 9  Extension: 2</option>
+                                <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
+                                <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
+                                <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
+                                <option value="--gapopen 11 --gapextend 1">Existence: 11  Extension: 1</option>
+                                <option value="--gapopen 10 --gapextend 1" selected="true">Existence: 10  Extension: 1</option>
+                                <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="BLOSUM80">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
+                                <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
+                                <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
+                                <option value="--gapopen 11 --gapextend 1">Existence: 11  Extension: 1</option>
+                                <option value="--gapopen 10 --gapextend 1" selected="true">Existence: 10  Extension: 1</option>
+                                <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="BLOSUM62">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 11 --gapextend 2">Existence: 11  Extension: 2</option>
+                                <option value="--gapopen 10 --gapextend 2">Existence: 10  Extension: 2</option>
+                                <option value="--gapopen 9 --gapextend 2">Existence: 9  Extension: 2</option>
+                                <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
+                                <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
+                                <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
+                                <option value="--gapopen 13 --gapextend 1">Existence: 13  Extension: 1</option>
+                                <option value="--gapopen 12 --gapextend 1">Existence: 12  Extension: 1</option>
+                                <option value="--gapopen 11 --gapextend 1" selected="true">Existence: 11  Extension: 1</option>
+                                <option value="--gapopen 10 --gapextend 1">Existence: 10  Extension: 1</option>
+                                <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="BLOSUM50">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 13 --gapextend 3">Existence: 13  Extension: 3</option>
+                                <option value="--gapopen 12 --gapextend 3">Existence: 12  Extension: 3</option>
+                                <option value="--gapopen 11 --gapextend 3">Existence: 11  Extension: 3</option>
+                                <option value="--gapopen 10 --gapextend 3">Existence: 10  Extension: 3</option>
+                                <option value="--gapopen 9 --gapextend 3">Existence: 9  Extension: 3</option>
+                                <option value="--gapopen 16 --gapextend 2">Existence: 16  Extension: 2</option>
+                                <option value="--gapopen 15 --gapextend 2">Existence: 15  Extension: 2</option>
+                                <option value="--gapopen 14 --gapextend 2">Existence: 14  Extension: 2</option>
+                                <option value="--gapopen 13 --gapextend 2" selected="true">Existence: 13  Extension: 2</option>
+                                <option value="--gapopen 12 --gapextend 2">Existence: 12  Extension: 2</option>
+                                <option value="--gapopen 19 --gapextend 1">Existence: 19  Extension: 1</option>
+                                <option value="--gapopen 18 --gapextend 1">Existence: 18  Extension: 1</option>
+                                <option value="--gapopen 17 --gapextend 1">Existence: 17  Extension: 1</option>
+                                <option value="--gapopen 16 --gapextend 1">Existence: 16  Extension: 1</option>
+                                <option value="--gapopen 15 --gapextend 1">Existence: 15  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="BLOSUM45">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 13 --gapextend 3">Existence: 13  Extension: 3</option>
+                                <option value="--gapopen 12 --gapextend 3">Existence: 12  Extension: 3</option>
+                                <option value="--gapopen 11 --gapextend 3">Existence: 11  Extension: 3</option>
+                                <option value="--gapopen 10 --gapextend 3">Existence: 10  Extension: 3</option>
+                                <option value="--gapopen 15 --gapextend 2" selected="true">Existence: 15  Extension: 2</option>
+                                <option value="--gapopen 14 --gapextend 2">Existence: 14  Extension: 2</option>
+                                <option value="--gapopen 13 --gapextend 2">Existence: 13  Extension: 2</option>
+                                <option value="--gapopen 12 --gapextend 2">Existence: 12  Extension: 2</option>
+                                <option value="--gapopen 19 --gapextend 1">Existence: 19  Extension: 1</option>
+                                <option value="--gapopen 18 --gapextend 1">Existence: 18  Extension: 1</option>
+                                <option value="--gapopen 17 --gapextend 1">Existence: 17  Extension: 1</option>
+                                <option value="--gapopen 16 --gapextend 1">Existence: 16  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="PAM250">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 15 --gapextend 3">Existence: 15  Extension: 3</option>
+                                <option value="--gapopen 14 --gapextend 3">Existence: 14  Extension: 3</option>
+                                <option value="--gapopen 13 --gapextend 3">Existence: 13  Extension: 3</option>
+                                <option value="--gapopen 12 --gapextend 3">Existence: 12  Extension: 3</option>
+                                <option value="--gapopen 17 --gapextend 2">Existence: 17  Extension: 2</option>
+                                <option value="--gapopen 16 --gapextend 2">Existence: 16  Extension: 2</option>
+                                <option value="--gapopen 15 --gapextend 2">Existence: 15  Extension: 2</option>
+                                <option value="--gapopen 14 --gapextend 2" selected="true">Existence: 14  Extension: 2</option>
+                                <option value="--gapopen 13 --gapextend 2">Existence: 13  Extension: 2</option>
+                                <option value="--gapopen 21 --gapextend 1">Existence: 21  Extension: 1</option>
+                                <option value="--gapopen 20 --gapextend 1">Existence: 20  Extension: 1</option>
+                                <option value="--gapopen 19 --gapextend 1">Existence: 19  Extension: 1</option>
+                                <option value="--gapopen 18 --gapextend 1">Existence: 18  Extension: 1</option>
+                                <option value="--gapopen 17 --gapextend 1">Existence: 17  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="PAM70">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 12 --gapextend 3">Existence: 12 Extension: 3</option>
+                                <option value="--gapopen 11 --gapextend 2">Existence: 11 Extension: 2</option>
+                                <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
+                                <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
+                                <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
+                                <option value="--gapopen 11 --gapextend 1">Existence: 11  Extension: 1</option>
+                                <option value="--gapopen 10 --gapextend 1" selected="true">Existence: 10  Extension: 1</option>
+                                <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
+                            </param>
+                        </when>
+                        <when value="PAM30">
+                            <param name="gap_costs" type="select" label="Gap Costs">
+                                <option value="--gapopen 15 --gapextend 3">Existence: 15 Extension: 3</option>
+                                <option value="--gapopen 13 --gapextend 3">Existence: 13 Extension: 3</option>
+                                <option value="--gapopen 14 --gapextend 2">Existence: 14 Extension: 2</option>
+                                <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
+                                <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
+                                <option value="--gapopen 5 --gapextend 2">Existence: 5  Extension: 2</option>
+                                <option value="--gapopen 14 --gapextend 1">Existence: 14 Extension: 1</option>
+                                <option value="--gapopen 10 --gapextend 1">Existence: 10  Extension: 1</option>
+                                <option value="--gapopen 9 --gapextend 1" selected="true">Existence: 9  Extension: 1</option>
+                                <option value="--gapopen 8 --gapextend 1">Existence: 8  Extension: 1</option>
+                            </param>
+                        </when>
+                    </conditional>
+                    <param name="sensmode" type="select" label="Gap Costs">
+                        <option value="default">default</option>
+                        <option value="fast">fast</option>
+                        <option value="mid-sensitive">mid-sensitive</option>
+                        <option value="sensitive" selected="true">sensitive</option>
+                        <option value="more-sensitive">more-sensitive</option>
+                        <option value="very-sensitive">very-sensitive</option>
+                        <option value="ultra-sensitive">ultra-sensitive</option>
                     </param>
-                </when>
-                <when value="BLOSUM80">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
-                        <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
-                        <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
-                        <option value="--gapopen 11 --gapextend 1">Existence: 11  Extension: 1</option>
-                        <option value="--gapopen 10 --gapextend 1" selected="true">Existence: 10  Extension: 1</option>
-                        <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
-                    </param>
-                </when>
-                <when value="BLOSUM62">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 11 --gapextend 2">Existence: 11  Extension: 2</option>
-                        <option value="--gapopen 10 --gapextend 2">Existence: 10  Extension: 2</option>
-                        <option value="--gapopen 9 --gapextend 2">Existence: 9  Extension: 2</option>
-                        <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
-                        <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
-                        <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
-                        <option value="--gapopen 13 --gapextend 1">Existence: 13  Extension: 1</option>
-                        <option value="--gapopen 12 --gapextend 1">Existence: 12  Extension: 1</option>
-                        <option value="--gapopen 11 --gapextend 1" selected="true">Existence: 11  Extension: 1</option>
-                        <option value="--gapopen 10 --gapextend 1">Existence: 10  Extension: 1</option>
-                        <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
-                    </param>
+                    <param argument="--dmnd_iterate" type="boolean" truevalue="--dmnd_iterate yes" falsevalue="--dmnd_iterate no" checked="false"
+                        label="Run diamond in iterative mode, up to the sensitivity level"/>
+                    <param argument="--dmnd_ignore_warnings" type="boolean" truevalue="--dmnd_ignore_warnings" falsevalue="" checked="false"
+                        label="Ignore Diamond warnings on sequence content (e.g. when a protein contains only ATGC symbols)"/>
                 </when>
-                <when value="BLOSUM50">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 13 --gapextend 3">Existence: 13  Extension: 3</option>
-                        <option value="--gapopen 12 --gapextend 3">Existence: 12  Extension: 3</option>
-                        <option value="--gapopen 11 --gapextend 3">Existence: 11  Extension: 3</option>
-                        <option value="--gapopen 10 --gapextend 3">Existence: 10  Extension: 3</option>
-                        <option value="--gapopen 9 --gapextend 3">Existence: 9  Extension: 3</option>
-                        <option value="--gapopen 16 --gapextend 2">Existence: 16  Extension: 2</option>
-                        <option value="--gapopen 15 --gapextend 2">Existence: 15  Extension: 2</option>
-                        <option value="--gapopen 14 --gapextend 2">Existence: 14  Extension: 2</option>
-                        <option value="--gapopen 13 --gapextend 2" selected="true">Existence: 13  Extension: 2</option>
-                        <option value="--gapopen 12 --gapextend 2">Existence: 12  Extension: 2</option>
-                        <option value="--gapopen 19 --gapextend 1">Existence: 19  Extension: 1</option>
-                        <option value="--gapopen 18 --gapextend 1">Existence: 18  Extension: 1</option>
-                        <option value="--gapopen 17 --gapextend 1">Existence: 17  Extension: 1</option>
-                        <option value="--gapopen 16 --gapextend 1">Existence: 16  Extension: 1</option>
-                        <option value="--gapopen 15 --gapextend 1">Existence: 15  Extension: 1</option>
-                    </param>
-                </when>
-                <when value="BLOSUM45">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 13 --gapextend 3">Existence: 13  Extension: 3</option>
-                        <option value="--gapopen 12 --gapextend 3">Existence: 12  Extension: 3</option>
-                        <option value="--gapopen 11 --gapextend 3">Existence: 11  Extension: 3</option>
-                        <option value="--gapopen 10 --gapextend 3">Existence: 10  Extension: 3</option>
-                        <option value="--gapopen 15 --gapextend 2" selected="true">Existence: 15  Extension: 2</option>
-                        <option value="--gapopen 14 --gapextend 2">Existence: 14  Extension: 2</option>
-                        <option value="--gapopen 13 --gapextend 2">Existence: 13  Extension: 2</option>
-                        <option value="--gapopen 12 --gapextend 2">Existence: 12  Extension: 2</option>
-                        <option value="--gapopen 19 --gapextend 1">Existence: 19  Extension: 1</option>
-                        <option value="--gapopen 18 --gapextend 1">Existence: 18  Extension: 1</option>
-                        <option value="--gapopen 17 --gapextend 1">Existence: 17  Extension: 1</option>
-                        <option value="--gapopen 16 --gapextend 1">Existence: 16  Extension: 1</option>
-                    </param>
-                </when>
-                <when value="PAM250">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 15 --gapextend 3">Existence: 15  Extension: 3</option>
-                        <option value="--gapopen 14 --gapextend 3">Existence: 14  Extension: 3</option>
-                        <option value="--gapopen 13 --gapextend 3">Existence: 13  Extension: 3</option>
-                        <option value="--gapopen 12 --gapextend 3">Existence: 12  Extension: 3</option>
-                        <option value="--gapopen 17 --gapextend 2">Existence: 17  Extension: 2</option>
-                        <option value="--gapopen 16 --gapextend 2">Existence: 16  Extension: 2</option>
-                        <option value="--gapopen 15 --gapextend 2">Existence: 15  Extension: 2</option>
-                        <option value="--gapopen 14 --gapextend 2" selected="true">Existence: 14  Extension: 2</option>
-                        <option value="--gapopen 13 --gapextend 2">Existence: 13  Extension: 2</option>
-                        <option value="--gapopen 21 --gapextend 1">Existence: 21  Extension: 1</option>
-                        <option value="--gapopen 20 --gapextend 1">Existence: 20  Extension: 1</option>
-                        <option value="--gapopen 19 --gapextend 1">Existence: 19  Extension: 1</option>
-                        <option value="--gapopen 18 --gapextend 1">Existence: 18  Extension: 1</option>
-                        <option value="--gapopen 17 --gapextend 1">Existence: 17  Extension: 1</option>
-                    </param>
-                </when>
-                <when value="PAM70">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 12 --gapextend 3">Existence: 12 Extension: 3</option>
-                        <option value="--gapopen 11 --gapextend 2">Existence: 11 Extension: 2</option>
-                        <option value="--gapopen 8 --gapextend 2">Existence: 8  Extension: 2</option>
-                        <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
-                        <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
-                        <option value="--gapopen 11 --gapextend 1">Existence: 11  Extension: 1</option>
-                        <option value="--gapopen 10 --gapextend 1" selected="true">Existence: 10  Extension: 1</option>
-                        <option value="--gapopen 9 --gapextend 1">Existence: 9  Extension: 1</option>
-                    </param>
-                </when>
-                <when value="PAM30">
-                    <param name="gap_costs" type="select" label="Gap Costs">
-                        <option value="--gapopen 15 --gapextend 3">Existence: 15 Extension: 3</option>
-                        <option value="--gapopen 13 --gapextend 3">Existence: 13 Extension: 3</option>
-                        <option value="--gapopen 14 --gapextend 2">Existence: 14 Extension: 2</option>
-                        <option value="--gapopen 7 --gapextend 2">Existence: 7  Extension: 2</option>
-                        <option value="--gapopen 6 --gapextend 2">Existence: 6  Extension: 2</option>
-                        <option value="--gapopen 5 --gapextend 2">Existence: 5  Extension: 2</option>
-                        <option value="--gapopen 14 --gapextend 1">Existence: 14 Extension: 1</option>
-                        <option value="--gapopen 10 --gapextend 1">Existence: 10  Extension: 1</option>
-                        <option value="--gapopen 9 --gapextend 1" selected="true">Existence: 9  Extension: 1</option>
-                        <option value="--gapopen 8 --gapextend 1">Existence: 8  Extension: 1</option>
-                    </param>
+                <when value="mmseqs">
+                    <param argument="--start_sens" type="integer" value="3" min="0" max="100" label="Starting sensitivity" />
+                    <param argument="--sens_steps" type="integer" value="3" min="0" max="100" label="Number of sensitivity steps" />
+                    <param argument="--final_sens" type="integer" value="7" min="0" max="100" label="Final sensititivy step" />
                 </when>
             </conditional>
 
-            <param name="query_cover" type="integer" value="0" min="0" max="100" label="Minimum query coverage" help="Report only alignments above the given percentage of query cover" />
-            <param name="subject_cover" type="integer" value="0" min="0" max="100" label="Minimum subject coverage" help="Report only alignments above the given percentage of subject cover" />
+            <param argument="--query_cover" type="integer" optional="true" min="0" max="100" label="Minimum query coverage" help="Report only alignments above the given percentage of query cover" />
+            <param argument="--subject_cover" type="integer" optional="true" min="0" max="100" label="Minimum subject coverage" help="Report only alignments above the given percentage of subject cover" />
+            <param argument="--pident" type="integer" optional="true" min="0" max="100" label="Minimum query coverage" help="Report only alignments above the given percentage of identity" />
         </section>
 
         <section name="annotation_options" expanded="false" title="Annotation Options">
@@ -195,6 +273,7 @@
                     label="Select the set of GO terms that should be used for annotation">
                 <option value="experimental">experimental = Use only terms inferred from experimental evidence</option>
                 <option value="non-electronic" selected="true">non-electronic = Use only non-electronically curated terms</option>
+                <option value="all" selected="true">All (experimental + non-electronic)</option>
             </param>
         </section>
         <section name="seed_ortholog_options" expanded="false" title="Seed Ortholog Search Options">
@@ -204,7 +283,7 @@
                 Queries not having a significant seed orthologs (E-value less than threshold) will not be annotated.
                 </help>
             </param>
-            <param name="seed_ortholog_score" type="integer" value="60" min="0" label="Minimum bit score threshold">
+            <param name="seed_ortholog_score" type="integer" optional="true" min="0" label="Minimum bit score threshold">
                 <help>
                 Min bit score expected when searching for seed eggNOG ortholog.
                 Queries not having a significant seed orthologs will not be annotated.
@@ -223,19 +302,19 @@
     <outputs>
         <data name="seed_orthologs" format="tabular" label="${tool.name} on ${on_string}: seed_orthologs" from_work_dir="results.emapper.seed_orthologs">
             <actions>
-                <action name="column_names" type="metadata" default="query_name,seed_eggNOG_ortholog,seed_ortholog_evalue,seed_ortholog_score"/>
+                <action name="column_names" type="metadata" default="query_name,seed_eggNOG_ortholog,seed_ortholog_evalue,seed_ortholog_score,query_start,query_end,seed_start,seed_end,pident,query_cov,seed_cov"/>
             </actions>
         </data>
         <data name="annotations" format="tabular" label="${tool.name} on ${on_string}: annotations" from_work_dir="results.emapper.annotations">
             <filter>not output_options['no_annot']</filter>
             <actions>
-                <action name="column_names" type="metadata" default="query_name,seed_eggNOG_ortholog,seed_ortholog_evalue,seed_ortholog_score,predicted_taxonomic_group,predicted_protein_name,GO_terms,EC_number,KEGG_KO,KEGG_Pathway,KEGG_Module,KEGG_Reaction,KEGG_rclass,BRITE,KEGG_TC,CAZy,BiGG_Reactions,Annotation_tax_scope,Matching_OGs,best_OG|evalue|score,COG_functional_categories,eggNOG_free_text_description"/>
+                <action name="column_names" type="metadata" default="query,seed_ortholog,evalue,score,max_annot_lvl,COG_category,Description,Preferred_name,GOs,EC,KEGG_ko,KEGG_Pathway,KEGG_Module,KEGG_Reaction,KEGG_rclass,BRITE,KEGG_TC,CAZy,BiGG_Reaction,PFAMseggNOG_OGs"/>
             </actions>
         </data>
-        <data name="annotations_orthologs" format="tabular" label="${tool.name} on ${on_string}: annotations.orthologs"  from_work_dir="results.emapper.annotations.orthologs">
+        <data name="annotations_orthologs" format="tabular" label="${tool.name} on ${on_string}: orthologs"  from_work_dir="results.emapper.orthologs">
             <filter>output_options['report_orthologs']</filter>
             <actions>
-                <action name="column_names" type="metadata" default="query_name,orthologs"/>
+                <action name="column_names" type="metadata" default="query,orth_type,species,orthologs"/>
             </actions>
         </data>
     </outputs>
@@ -268,6 +347,37 @@
             <output name="annotations" file="scoped.emapper.annotations" ftype="tabular" compare="sim_size"/>
             <output name="annotations_orthologs" file="scoped.emapper.annotations_orthologs" ftype="tabular"/>
         </test>
+        <test>
+            <param name="input" value="Nmar_0135.fa" ftype="fasta"/>
+            <param name="eggnog_data" value="@EGGNOG_DB_VERSION@"/> <!-- not passed in test, but required for test to work -->
+            <section name="seed_ortho_options">
+                <conditional name="ortho_method">
+                    <param name="m" value="diamond" />
+                    <param name="sensmode" value="fast" />
+                </conditional>
+            </section>
+            <param name="report_orthologs" value="true"/>
+            <param name="no_file_comments" value="true"/>
+            <output name="seed_orthologs" file="DIA_nlim.emapper.seed_orthologs" ftype="tabular" compare="sim_size"/>
+            <output name="annotations" file="DIA_nlim.emapper.annotations" ftype="tabular" compare="sim_size"/>
+            <output name="annotations_orthologs" file="DIA_nlim.emapper.annotations_orthologs" ftype="tabular"/>
+        </test>
+        <!-- not enabled as it requires a specific .db file, hard to minimize -->
+        <!--test>
+            <param name="input" value="Nmar_0135.fa" ftype="fasta"/>
+            <param name="eggnog_data" value="@EGGNOG_DB_VERSION@"/>
+            <section name="seed_ortho_options">
+                <conditional name="ortho_method">
+                    <param name="m" value="mmseqs" />
+                    <param name="start_sens" value="4" />
+                </conditional>
+            </section>
+            <param name="report_orthologs" value="true"/>
+            <param name="no_file_comments" value="true"/>
+            <output name="seed_orthologs" file="DIA_nlim.emapper.seed_orthologs" ftype="tabular" compare="sim_size"/>
+            <output name="annotations" file="DIA_nlim.emapper.annotations" ftype="tabular" compare="sim_size"/>
+            <output name="annotations_orthologs" file="DIA_nlim.emapper.annotations_orthologs" ftype="tabular"/>
+        </test-->
     </tests>
     <help><![CDATA[
 
--- a/test-data/DIA_nlim.emapper.annotations	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/DIA_nlim.emapper.annotations	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,2 @@
-Nmar_0135	436308.Nmar_0135	3.8e-149	510.8	Thaumarchaeota													Archaea	41T2K@651137,COG1083@1,arCOG04817@2157	NA|NA|NA	M	Cytidylyltransferase
+#query	seed_ortholog	evalue	score	eggNOG_OGs	max_annot_lvl	COG_category	Description	Preferred_name	GOs	EC	KEGG_ko	KEGG_Pathway	KEGG_Module	KEGG_Reaction	KEGG_rclass	BRITE	KEGG_TC	CAZy	BiGG_Reaction	PFAMs
+Nmar_0135	436308.Nmar_0135	7.67e-188	503.0	COG1083@1|root,arCOG04817@2157|Archaea,41T2K@651137|Thaumarchaeota	651137|Thaumarchaeota	M	Cytidylyltransferase	-	-	-	ko:K07257	-	-	-	-	ko00000	-	-	-	-
--- a/test-data/DIA_nlim.emapper.annotations_orthologs	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/DIA_nlim.emapper.annotations_orthologs	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,3 @@
-Nmar_0135	
+#query	orth_type	species	orthologs
+Nmar_0135	one2one	Marine Group I thaumarchaeote SCGC AB-629-I23(1131266)	*ARWQ01000003_gene1537
+Nmar_0135	one2one	Nitrosopumilus maritimus SCM1(436308)	*Nmar_0135
--- a/test-data/DIA_nlim.emapper.seed_orthologs	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/DIA_nlim.emapper.seed_orthologs	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,2 @@
-Nmar_0135	436308.Nmar_0135	3.8e-149	510.8
+#qseqid	sseqid	evalue	bitscore	qstart	qend	sstart	send	pident	qcov	scov
+Nmar_0135	436308.Nmar_0135	7.67e-188	503.0	1	252	1	252	100.0	100.0	100.0
--- a/test-data/README	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/README	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,1 @@
-cached_locally content is a reduced database, following instructions on https://github.com/galaxyproteomics/egglet
+cached_locally content is a reduced database, using the eggnog_tiny.sh and eggnog_tiny_taxa.db (inspired from instructions on https://github.com/galaxyproteomics/egglet)
Binary file test-data/cached_locally/eggnog.db has changed
Binary file test-data/cached_locally/eggnog.taxa.db has changed
--- a/test-data/cached_locally/eggnog_mapper_db_versioned.loc	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/cached_locally/eggnog_mapper_db_versioned.loc	Tue Jan 25 13:51:50 2022 +0000
@@ -1,2 +1,2 @@
 #value	name	path	version
-2.0	eggNOG_2.0	${__HERE__}	2.0
+5.0.2	eggNOG_5.0.2	${__HERE__}	5.0.2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/eggnogg_tiny.sh	Tue Jan 25 13:51:50 2022 +0000
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Script adapted from https://github.com/galaxyproteomics/egglet to produce a minimal eggnog 5.0.2 database
+
+sqlite3 $1 << "EOF"
+
+CREATE TEMP TABLE og
+AS SELECT * FROM og
+WHERE description = 'Cytidylyltransferase'
+AND level LIKE "651137"
+LIMIT 1;
+
+CREATE TEMP TABLE event
+AS SELECT * FROM event
+WHERE level=651137
+AND og='41T2K'
+LIMIT 20;
+
+CREATE TEMP TABLE prots
+AS SELECT * FROM prots
+WHERE name = "436308.Nmar_0135";
+
+CREATE TEMP TABLE version
+AS SELECT * FROM version;
+
+
+.backup temp eggnog_tiny.db
+EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/eggnogg_tiny_taxa.sh	Tue Jan 25 13:51:50 2022 +0000
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# Script adapted from https://github.com/galaxyproteomics/egglet to produce a minimal eggnog 5.0.2 database
+
+sqlite3 $1 << "EOF"
+
+CREATE TEMP TABLE species
+AS SELECT * FROM species
+WHERE taxid in (1131266, 436308);
+
+CREATE TEMP TABLE synonym
+AS SELECT * FROM synonym
+WHERE taxid in (1131266, 436308);
+
+CREATE TEMP TABLE merged
+AS SELECT * FROM merged
+WHERE taxid_old in (1131266, 436308);
+
+CREATE TEMP TABLE stats
+AS SELECT * FROM stats;
+
+.backup temp eggnog_tiny_taxa.db
+EOF
--- a/test-data/scoped.emapper.annotations	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/scoped.emapper.annotations	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,2 @@
-Nmar_0135	436308.Nmar_0135	3.8e-149	510.8	Thaumarchaeota				ko:K07257					ko00000				Thaumarchaeota	41T2K@651137,COG1083@1,arCOG04817@2157	NA|NA|NA	M	Cytidylyltransferase
+#query	seed_ortholog	evalue	score	eggNOG_OGs	max_annot_lvl	COG_category	Description	Preferred_name	GOs	EC	KEGG_ko	KEGG_Pathway	KEGG_Module	KEGG_Reaction	KEGG_rclass	BRITE	KEGG_TC	CAZy	BiGG_Reaction	PFAMs
+Nmar_0135	436308.Nmar_0135	7.67e-188	503.0	COG1083@1|root,arCOG04817@2157|Archaea,41T2K@651137|Thaumarchaeota	651137|Thaumarchaeota	M	Cytidylyltransferase	-	-	-	ko:K07257	-	-	-	-	ko00000	-	-	-	-
--- a/test-data/scoped.emapper.annotations_orthologs	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/scoped.emapper.annotations_orthologs	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,3 @@
-Nmar_0135	1131266.ARWQ01000003_gene1537,436308.Nmar_0135
+#query	orth_type	species	orthologs
+Nmar_0135	one2one	Marine Group I thaumarchaeote SCGC AB-629-I23(1131266)	*ARWQ01000003_gene1537
+Nmar_0135	one2one	Nitrosopumilus maritimus SCM1(436308)	*Nmar_0135
--- a/test-data/scoped.emapper.seed_orthologs	Fri Feb 19 18:54:25 2021 +0000
+++ b/test-data/scoped.emapper.seed_orthologs	Tue Jan 25 13:51:50 2022 +0000
@@ -1,1 +1,2 @@
-Nmar_0135	436308.Nmar_0135	3.8e-149	510.8
+#qseqid	sseqid	evalue	bitscore	qstart	qend	sstart	send	pident	qcov	scov
+Nmar_0135	436308.Nmar_0135	7.67e-188	503.0	1	252	1	252	100.0	100.0	100.0
--- a/tool-data/eggnog_mapper_db_versioned.loc.sample	Fri Feb 19 18:54:25 2021 +0000
+++ b/tool-data/eggnog_mapper_db_versioned.loc.sample	Tue Jan 25 13:51:50 2022 +0000
@@ -3,9 +3,9 @@
 #
 # eggnog-mapper requires the following files to be installed in the data directory:
 #  https://github.com/jhcepas/eggnog-mapper/blob/master/data/og2level.tsv.gz
-#  http://eggnog5.embl.de/download/emapperdb-5.0.0/eggnog.db.gz
+#  http://eggnog5.embl.de/download/emapperdb-5.0.2/eggnog.db.gz
 # A complete diamond database is available from:
-#  http://eggnog5.embl.de/download/emapperdb-5.0.0/eggnog_proteins.dmnd.gz
+#  http://eggnog5.embl.de/download/emapperdb-5.0.2/eggnog_proteins.dmnd.gz
 #
 # The python script download_eggnog_data.py,
 # included with eggnog_mapper, can be used to download the files to the correct directory