view filter.shared.xml @ 1:6cca4d09073c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 721531d2e9fd1e208a3fba8cfbe5dcd572599ca2
author iuc
date Tue, 05 Sep 2017 16:54:33 -0400
parents bccb5efbc4ee
children 644b7baba854
line wrap: on
line source

<tool profile="16.07" id="mothur_filter_shared" name="Filter.shared" version="@WRAPPER_VERSION@.0">
    <description>remove OTUs based on various critieria</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 "$otu" otu.dat &&

        echo 'filter.shared(
            shared=otu.dat,
            #if $label:
                label=${ str($label).replace(",","-") },
            #end if
            #if $label:
                groups=${ str($groups).replace(",","-") },
            #end if
            minabund=$minabund,
            minpercent=$minpercent,
            rarepercent=$rarepercent,
            keepties=$keepties,
            minnumsamples=$minnumsamples,
            minpercentsamples=$minpercentsamples,
            mintotal=$mintotal,
            makerare=$makerare
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.shared" label="shared - specify your shared file"/>
        <param name="label" type="select" optional="true" multiple="true" label="label - OTU Labels" help="If none selected, all labels will be output">
            <expand macro="labeloptions"/>
        </param>
        <param name="groups" type="select" optional="true" multiple="true" label="Select groups for to include in this grouping">
            <options>
                <filter type="data_meta" ref="otu" key="groups"/>
            </options>
        </param>
        <param name="minabund" type="integer" value="0" min="0" label="minabund - indicate the minimum abundance required for each sample in a given OTU" help="If any samples abundance falls below the minimum, the OTU is removed. Default=0"/>
        <param name="minpercent" type="integer" value="0" min="0" max="100" label="minpercent - indicate the minimum relative abundance of an OTU" help="For example, if the OTUs total abundance across all samples is 8, and the total abundance across all OTUs is 1000, and minpercent=1. The OTU's relative abundance is 0.008, the minimum is 0.01, so the OTU will be removed (Default=0)"/>
        <param name="rarepercent" type="integer" value="0" min="0" max="100" label="rarepercent - indicate the percentage of otus to remove" help="The OTUs chosen to be removed are the rarest.  For example if you have 1000 OTUs, rarepercent=20 would remove the 200 OTUs with the lowest abundance (Default=0)"/>
        <param name="keepties" type="boolean" truevalue="true" falsevalue="false" checked="true" label="keepties - indicate you want to keep the OTUs with the same abundance as the first 'not rare' OTU" help="For example if you have 10 OTUs, rarepercent=20 abundances of 20, 18, 15, 15, 10, 5, 3, 3, 3, 1. keepties=t, would remove the 10th OTU, but keep the 9th because its abundance ties the 8th OTU. keepties=f would remove OTUs 9 and 10 (Default=T)"/>
        <param name="minnumsamples" type="integer" value="0" min="0" label="minnumsamples - indicate the minimum number of samples present in an OTU" help="If the number of samples present falls below the minimum, the OTU is removed (Default=0)"/>
        <param name="minpercentsamples" type="integer" value="0" min="0" max="100" label="minpercentsamples - indicate the minimum percent of sample present in an OTU" help="For example, if the total number of samples is 10, the number present is 3, and the minpercentsamples=50. The OTU's precent of samples is 0.333, the minimum is 0.50, so the OTU will be removed (Default=0)"/>
        <param name="mintotal" type="integer" value="0" min="0" max="100" label="mintotal - indicate the minimum abundance required for a given OTU" help="If abundance across all samples falls below the minimum, the OTU is removed (Default=0)"/>
        <param name="makerare" type="boolean" truevalue="true" falsevalue="false" checked="true" label="makerare - indicate you want the abundances of any removed OTUs to be saved and a new rare OTU created with its abundances equal to the sum of the OTUs removed" help="This will preserve the number of reads in your dataset (Default=T)"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <collection name="filter_shared" type="list" label="${tool.name} on ${on_string}: filter.shared">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.filter\.dat" format="mothur.shared"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="minabund" value="1"/>
            <output_collection name="filter_shared" count="36">
                <element name="0.29" md5="db8387475c126110f2ac21066344c933" ftype="mothur.shared"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with label and group select -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="label" value="0.05,0.29,0.33"/>
            <param name="groups" value="forest,pasture"/>
            <param name="minabund" value="1"/>
            <output_collection name="filter_shared" count="3">
                <element name="0.29" md5="db8387475c126110f2ac21066344c933" ftype="mothur.shared"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The filter.shared_ is used to remove OTUs based on various critieria.

.. _filter.shared: https://www.mothur.org/wiki/Filter.shared

]]>
    </help>
    <citations>
        <citation type="doi">10.1128/AEM.01541-09</citation>
    </citations>
</tool>