view data_manager/eggnog_macros.xml @ 4:516eb4e1cf8e draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/eggnog_mapper/eggnog_mapper_data_manager commit 75035b2919ce95fa8d3b785d86c7c7c9da531db2
author galaxyp
date Mon, 20 Jun 2022 12:48:56 +0000
parents 5a2ffc486246
children
line wrap: on
line source

<?xml version="1.0"?>
<macros>
   <token name="@TOOL_VERSION@">2.1.8</token>
   <token name="@VERSION_SUFFIX@">2.1.8</token>
   <token name="@EGGNOG_DB_VERSION@">5.0.2</token>
    <!--
    # 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.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@">5.0.2</token>
   <xml name="citations">
        <citations>
            <citation type="doi">10.1093/nar/gkv1248</citation>
            <citation type="doi">10.1093/molbev/msx148</citation>
        </citations>
    </xml>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@TOOL_VERSION@">eggnog-mapper</requirement>
        </requirements>
    </xml>
    <xml name="version_command">
        <version_command>emapper.py --version</version_command>
    </xml>
    <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>
            <data name="out_file" format="data_manager_json" label="${tool.name}"/>
        </outputs>
    </xml>
    <token name="@DOWNLOAD_CMD@"><![CDATA[
## tool should set install_path
#if $test == 'true'
#import os.path
#set $install_path = $os.path.join($os.path.dirname($__tool_directory__), 'test-data/cached_locally')
#end if
mkdir -p '${install_path}' &&
download_eggnog_data.py
  $diamond_database $mmseqs_database $pfam_database -y -q
#if $test == 'true'
  -s
#end if
  --data_dir '$install_path' &&
python '${__tool_directory__}/data_manager_eggnog.py' --config_file '$out_file' --install_path '$install_path'
    ]]></token>
    <xml name="data_manager_test">
        <test>
            <param name="test" value="true"/>
            <param name="diamond_database" value="true"/>
            <yield />
            <output name="out_file">
                <assert_contents>
                    <has_text text="eggnog_mapper_db_versioned" />
                    <has_text text="@EGGNOG_DB_VERSION@" />
                </assert_contents>
            </output>
        </test>
    </xml>
    <xml name="stdout_assertion">
        <assert_stdout>
            <has_line line="#  emapper-@TOOL_VERSION@"/>
            <has_line line="FINISHED"/>
        </assert_stdout>
    </xml>
</macros>