view data_manager/eggnog_macros.xml @ 3:b711f5b6bd44 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/eggnog_mapper/data_manager_eggnog_mapper_abspath commit fd234f7532b34a1b6ced0d3ac53a8f42348e23f7"
author galaxyp
date Fri, 19 Feb 2021 18:54:00 +0000
parents 269f0970d762
children fcb8bdd124f4
line wrap: on
line source

<?xml version="1.0"?>
<macros>
   <token name="@VERSION@">2.0.1</token>
   <token name="@EGGNOG_DB_VERSION@">2.0</token>
    <!--
    # Versionning is super confusing:
    # 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
    -->
   <token name="@IDX_VERSION@">2.0</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="@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."/>
    </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 -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>
</macros>