view macros.xml @ 11:4398a6fea625 draft default tip

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/genenotebook commit 6b276b84437470f019a6b13a7bd17171c117cece
author gga
date Mon, 01 Jul 2024 08:44:45 +0000
parents a0358a5ab3ae
children
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@TOOL_VERSION@">genoboo</requirement>
            <yield/>
        </requirements>
    </xml>

    <token name="@TOOL_VERSION@">0.4.16</token>
    <token name="@WRAPPER_VERSION@">@TOOL_VERSION@+galaxy0</token>

    <xml name="citation">
        <citations>
            <citation type="doi">10.1093/bioinformatics/btz491</citation>
        </citations>
    </xml>

    <xml name="sanitized">
        <sanitizer>
            <valid initial="string.printable">
                <remove value="&apos;"/>
            </valid>
            <mapping initial="none">
                <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;"/>
                <add source="(" target="\("/>
                <add source=")" target="\)"/>
            </mapping>
        </sanitizer>
    </xml>

    <token name="@CONNECT_INFO@">-u admin -p admin --port \$GNB_PORT</token>

    <!--
    This runs GeneNoteBook, and a local mongodb server listening only on a unix socket, created in the work dir.
    The bind_ip option is a trick to prevent mongod from opening a TCP socket.
    For some unknwon reason, unixSocketPrefix needs an absolute path
    -->
    <token name="@START_GNB@"><![CDATA[
        export MONGO_URI="\$(pwd | sed 's|/|%2F|g')";
        #if $existing
            tar -xf '${existing}' mongo_db;
        #else
            mkdir ./mongo_db/;
        #end if
        . '$__tool_directory__/launch_gnb.sh';
    ]]></token>

    <token name="@ZIP_GNB@"><![CDATA[
        . '$__tool_directory__/kill_gnb.sh';

        ## Zip the mongodb data dir
        tar -cvjf '${gnb_db}' mongo_db > /dev/null;

        ## Make sure mongodb and GNB are really really stopped even if anything failed before
        ## We assume the DRM or container exit will kill any remaining process after that, but who knows.
        kill \$GNB_PID &> /dev/null || true ;
        kill \$(<"./mongo.pid") &> /dev/null || true ;
    ]]></token>
</macros>