view macros.xml @ 4:ace14a8ac6e4 draft

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/genenotebook commit 81226a2f347b2dc273546311e7269c07f0b0f485
author gga
date Tue, 10 Oct 2023 15:29:02 +0000
parents 1d59e907fa98
children bd94e502872a
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.7</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 GNB_PORT="\$(bash '$__tool_directory__/find_free_port.sh')";
        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>