view make.biom.xml @ 11:0b5397a74165 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 12:40:48 +0000
parents a3f5c90f1f65
children
line wrap: on
line source

<tool profile="16.07" id="mothur_make_biom" name="Make.biom" version="@WRAPPER_VERSION@.0">
    <description>Make biom files from a shared file</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="biotools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## create symlinks to input datasets
ln -s '$otu' otu.dat &&
ln -s '$constaxonomy' constaxonomy.dat &&
ln -s '$metadata' metadata.dat &&
#if $picrustc.use == "yes":
    ln -s '$picrustc.picrust' picrustc.picrust.dat &&
    ln -s '$picrustc.reftax' picrustc.reftax.dat &&
#end if

echo 'make.biom(
    shared=otu.dat,
    #if $constaxonomy:
        constaxonomy=constaxonomy.dat,
    #end if
    #if $label:
        label=${ str($label).replace(",","-") },
    #end if
    #if $groups:
        groups=${ str($groups).replace(",","-") },
    #end if
    #if $metadata:
        metadata=metadata.dat,
    #end if
    #if $picrustc.use == "yes":
        picrust=picrustc.picrust.dat,
        reftaxonomy=picrustc.reftax.dat,
    #end if
    matrixtype=$matrixtype
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.shared" label="shared - OTU Shared file"/>
        <param name="constaxonomy" type="data" format="mothur.cons.taxonomy" optional="true" label="contaxonomy - consensus taxonomy" help="The contaxonomy file is the taxonomy file outputted by classify.otu"/>
        <param name="metadata" type="data" format="tabular,txt" label="metadata" optional="true" help="You can add sample data support here"/>
        <conditional name="picrustc">
            <param name="use" type="select" label="use picrust program">
                <option value="no" selected="true">no</option>
                <option value="yes">yes</option>
            </param>
            <when value="yes">
                <param name="picrust" type="data" format="tabular" label="picrust" help="The picrust program requires green genes OTU IDs. The picrust parameter allows you to provide the OTU ID mapping table associated with your reference taxonomy"/>
                <param name="reftax" type="data" format="mothur.ref.taxonomy" label="reftaxonomy" help="The referencetax parameter is used with the picrust parameter. Picrust requires the greengenes OTU IDs to be in the biom file, and the referencetax parameter allows you to provide your reference taxonomy file you used when classifying your sequences"/>
            </when>
            <when value="no"/>
        </conditional>
        <param name="matrixtype" type="select" label="matrixtype - sparse or dense">
            <option value="sparse">sparse</option>
            <option value="dense">dense</option>
        </param>
        <param name="groups" type="select" multiple="true" label="groups - Groups to include" help="By default all are included if no selection is made">
            <options>
                <filter type="data_meta" ref="otu" key="groups"/>
            </options>
        </param>
        <param name="label" type="select" optional="true" multiple="true" label="label - Select OTU Labels to include" help="By default all are included if no selection is made">
            <expand macro="labeloptions"/>
        </param>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <collection name="biomfiles" type="list" label="${tool.name} on ${on_string}: biom files">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.biom" format="biom1"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <output_collection name="biomfiles" count="36">
                <element name="0.36" ftype="biom1">
                    <assert_contents>
                        <has_text text="Biological Observation Matrix"/>
                        <has_text text="generated_by"/>
                        <has_text text="forest"/>
                        <has_text text="pasture"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with subset of labels and groups-->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="label" value="0.36,0.38,0.41"/>
            <param name="groups" value="forest"/>
            <output_collection name="biomfiles" count="3">
                <element name="0.36">
                    <assert_contents>
                        <has_text text="Biological Observation Matrix"/>
                        <has_text text="generated_by"/>
                        <has_text text="forest"/>
                        <not_has_text text="pasture"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with constaxonomy and metadata -->
            <param name="otu" value="final.tx.1.subsample.1.pick.shared" ftype="mothur.shared"/>
            <param name="constaxonomy" value="final.tx.1.cons.taxonomy" ftype="mothur.cons.taxonomy"/>
            <param name="metadata" value="metadata"/>
            <output_collection name="biomfiles" count="1">
                <element name="1" ftype="biom1">
                    <assert_contents>
                        <has_text text="Biological Observation Matrix"/>
                        <has_text text="generated_by"/>
                        <has_text text="galaxy rocks"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <!-- TODO: test with picrust option (need file with greengenes OTU IDs) -->
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The make.biom command converts a shared_ shared file to biom_ files.
The output can be filtered by groups and labels.


.. _shared: https://www.mothur.org/wiki/Shared_file
.. _biom:  http://biom-format.org/documentation/biom_format.html
.. _make.biom: https://www.mothur.org/wiki/Make.biom

    ]]></help>
    <expand macro="citations"/>
</tool>