view make.lookup.xml @ 11:9a074f55579e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 7599ef16dc8b83ee49236ed5bb229260c969b0ab
author iuc
date Mon, 17 Jun 2024 11:52:11 +0000
parents d56e5a7a9cef
children
line wrap: on
line source

<tool profile="16.07" id="mothur_make_lookup" name="Make.lookup" version="@WRAPPER_VERSION@.0">
    <description>allows you to create custom lookup files for use with shhh.flows</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

#import re
## create symlinks to input datasets
ln -s '$reference.template' reference.template.dat &&
ln -s '$flow' flow.dat &&
ln -s '$error' error.dat &&

echo 'make.lookup(
    reference=reference.template.dat,
    flow=flow.dat,
    error=error.dat,
    order=$order,
    barcode=$re.sub("[^ACTG]","",str($barcode)),
    key=$re.sub("[^ACTG]","",str($key)),
    threshold=$threshold
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="reference">
            <param name="source" type="select" label="Select Reference Template from" help="">
                <option value="hist">History</option>
                <option value="ref">Cached Reference</option>
            </param>
            <when value="ref">
                <param name="template" type="select" label="reference - Select an alignment database " help="">
                    <options from_data_table="mothur_aligndb"/>
                </param>
            </when>
            <when value="hist">
                <param name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/>
            </when>
        </conditional>
        <param name="flow" type="data" format="mothur.sff.flow" label="flow - provide file with flow data"/>
        <param name="error" type="data" format="tabular" label="error - provide the error summary" help="this file is an output of seq.error tool"/>
        <param name="order" type="select" label="order - flow order for nucleotides in the sequencer" help="default is A, was TACG. Also accepts B or I">
            <option value="A" selected="true">A (TACG)</option>
            <option value="B">B</option>
            <option value="I">I</option>
        </param>
        <param name="barcode" type="text" value="AACCGTGTC" label="barcode - provide the barcode sequence"/>
        <param name="key" type="text" value="TCAG" label="key - provide the key sequence"/>
        <param name="threshold" type="integer" value="10000" min="0" label="threshold - " help=""/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="lookup_out" format="txt" from_work_dir="flow*.lookup" label="${tool.name} on ${on_string}: lookup"/>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="source" value="hist"/>
            <param name="template" value="HMP_MOCK.v35.align" ftype="mothur.align"/>
            <param name="flow" value="testflow.flow" ftype="mothur.sff.flow"/>
            <param name="error" value="Mock_S280_L001_R1_001_small.trim.contigs.good.error.summary" ftype="tabular"/>
            <output name="lookup_out" ftype="txt">
                <assert_contents>
                    <has_line_matching expression="^(-?[(\d\.|nan)]+\t?)+$"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test sanitizers -->
            <param name="source" value="hist"/>
            <param name="template" value="HMP_MOCK.v35.align" ftype="mothur.align"/>
            <param name="flow" value="testflow.flow" ftype="mothur.sff.flow"/>
            <param name="error" value="Mock_S280_L001_R1_001_small.trim.contigs.good.error.summary" ftype="tabular"/>
            <param name="barcode" value="XAXAXCXCXGXTXGXTXC"/><!-- should be converted to default value -->
            <param name="key" value="XTXCXAXGX"/><!-- should be converted to default value -->
            <output name="lookup_out" ftype="txt">
                <assert_contents>
                    <has_line_matching expression="^(-?[(\d\.|nan)]+\t?)+$"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The make.lookup_ allows you to create custom lookup files for use with shhh.flows.

.. _make.lookup: https://www.mothur.org/wiki/Make.lookup

    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1038/nmeth.1361</citation>
    </expand>
</tool>