view get.otus.xml @ 4:971ab18e74d7 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit be5c8af076296a53959fc3ed2b82d92dc7607eeb
author iuc
date Mon, 23 Apr 2018 09:47:41 -0400
parents 04a479ceb84a
children 3f68e8e700c9
line wrap: on
line source

<tool profile="16.07" id="mothur_get_otus" name="Get.otus" version="@WRAPPER_VERSION@.0">
    <description>Get otus containing sequences from specified groups</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## create symlinks to input datasets
ln -s '$accnos' accnos.dat &&
#if $list:
    ln -s '$list' list.dat &&
#end if
#if $shared:
    ln -s '$shared' shared.dat &&
#end if
#if $constaxonomy:
    ln -s '$constaxonomy' constaxonomy.dat &&
#end if
#if $corraxes:
    ln -s '$corraxes' corraxes.dat &&
#end if
#if $otucorr:
    ln -s '$otucorr' otucorr.dat &&
#end if

echo 'get.otus(
    #if $list
        list=list.dat,
    #end if
    #if $shared
        shared=shared.dat,
    #end if
    #if $corraxes:
        corraxes=corraxes.dat,
    #end if
    #if $otucorr:
        otucorr=otucorr.dat,
    #end if
    #if $constaxonomy
        constaxonomy=constaxonomy.dat,
    #end if
    accnos=accnos.dat
    #if $labelsource.label:
        ,label=${ str($labelsource.label).replace(",","-") }
    #end if
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <param argument="accnos" type="data" format="mothur.accnos" label="accnos - Group Names from your history"/>
        <param argument="list" type="data" format="mothur.list" optional="true" label="OTU List"/>
        <param argument="shared" type="data" format="mothur.shared" optional="true" label="OTU List OTU Shared file"/>
        <param argument="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 argument="otucorr" type="data" format="mothur.otu.corr" optional="true" label="OTU correlation file"
            help="otu correlation coefficients are output by the otu.association command"/>
        <param argument="corraxes" type="data" format="mothur.axes" optional="true" label="Correlation axes file"
            help="correlation axes file is output by the corr.axes command"/>

        <conditional name="labelsource">
            <param name="source" type="select" label="Select a label from">
                <option value="list"> OTU list file </option>
                <option value="shared"> OTU shared file </option>
            </param>
            <when value="list">
                <param argument="label" type="select" optional="true" multiple="false" label="label - OTU Label"
                    help="select exactly one label. If none selected, the first label in your file will be used">
                    <options>
                        <filter type="data_meta" ref="list" key="labels"/>
                    </options>
                </param>
            </when>
            <when value="shared">
                <param argument="label" type="select" optional="true" multiple="false" label="label - OTU Label"
                    help="select exactly one label. If none selected, the first label in your file will be used">
                    <options>
                        <filter type="data_meta" ref="shared" key="labels"/>
                    </options>
                </param>
            </when>
        </conditional>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="list_out" format="mothur.list" from_work_dir="list*.pick.*" label="${tool.name} on ${on_string}: pick.list">
            <filter> $list </filter>
        </data>
        <data name="shared_out" format="mothur.shared" from_work_dir="shared*.pick.*" label="${tool.name} on ${on_string}: pick.shared">
            <filter> $shared </filter>
        </data>
        <data name="constaxonomy_out" format="mothur.cons.taxonomy" from_work_dir="constaxonomy*.pick.*" label="${tool.name} on ${on_string}: pick.cons.taxonomy">
            <filter> $constaxonomy </filter>
        </data>
        <data name="otucorr_out" format="mothur.otu.corr" from_work_dir="otucorr*.pick.*" label="${tool.name} on ${on_string}: pick.otu.corr">
            <filter> $otucorr </filter>
        </data>
        <data name="corraxes_out" format="mothur.axes" from_work_dir="corraxes*.pick.*" label="${tool.name} on ${on_string}: pick.axes">
            <filter> $corraxes </filter>
        </data>
    </outputs>
    <tests>
        <test><!-- test with list file input and default settings -->
            <param name="list" value="amazon.an.list" ftype="mothur.list"/>
            <param name="accnos" value="amazon.otus.accnos" ftype="mothur.accnos"/>
            <output name="list_out" ftype="mothur.list">
                <assert_contents>
                    <expand macro="test-list-format"/>
                    <has_text text="unique"/>
                    <has_text text="Otu01"/>
                    <has_text text="Otu17"/>
                    <has_text text="Otu42"/>
                    <not_has_text text="Otu43"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with shared and otu.corr file and label select -->
            <param name="shared" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="accnos" value="amazon.otus.accnos" ftype="mothur.accnos"/>
            <param name="label" value="0.03"/>
            <param name="source" value="shared"/>
            <param name="otucorr" value="amazon.an.0.03.pearson.otu.corr" ftype="mothur.cons.taxonomy"/>
            <output name="shared_out" ftype="mothur.shared">
                <assert_contents>
                    <expand macro="test-shared-format"/>
                    <has_text text="0.03"/>
                    <has_text text="Otu01"/>
                    <has_text text="Otu17"/>
                    <has_text text="Otu42"/>
                    <not_has_text text="Otu43"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The get.otus command selects otus from a given list.

.. _list: https://www.mothur.org/wiki/List_file
.. _get.otus: https://www.mothur.org/wiki/Get.otus

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