view hcluster.xml @ 1:989184322514 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 721531d2e9fd1e208a3fba8cfbe5dcd572599ca2
author iuc
date Tue, 05 Sep 2017 16:56:41 -0400
parents 8e77c6d5c69c
children
line wrap: on
line source

<tool profile="16.07" id="mothur_hcluster" name="Hcluster" version="@WRAPPER_VERSION@.0">
    <description>Assign sequences to OTUs (Operational Taxonomic Unit)</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 "$matrix.dist" matrix.dist.dat &&
        ln -s "$matrix.name" matrix.name.dat &&

        echo 'hcluster(
            #if $matrix.format == "column":
                column=matrix.dist.dat,
                name=matrix.name.dat,
            #elif $matrix.format == "phylip":
                phylip=matrix.dist.dat,
                #if $matrix.name:
                    name=matrix.name.dat,
                #end if
            #end if
            method=$method,
            #if $cutoff:
                cutoff=$cutoff,
            #end if
            precision=$precision,
            hard=$hard,
            sorted=$sorted,
            showabund=$showabund
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="matrix">
            <param name="format" type="select" label="Select a Distance Matrix Format" help="">
                <option value="column">Pairwise Column Matrix</option>
                <option value="phylip">Phylip Distance Matrix</option>
            </param>
            <when value="column">
                <param name="dist" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/>
                <param name="name" type="data" format="mothur.names" label="name - Names"/>
            </when>
            <when value="phylip">
                <param name="dist" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
                <param name="name" type="data" format="mothur.names" optional="true" label="name - Names"/>
            </when>
        </conditional>
        <param name="cutoff" type="float" value="" min="0" optional="true" label="cutoff - Distance Cutoff threshold - ignored if not > 0" help="Ignore pairwise distances larger than this, a common value would be 0.10"/>
        <param name="hard" type="boolean" checked="true" truevalue="true" falsevalue="false" label="hard - Use hard cutoff instead of rounding"/>
        <param name="precision" type="select" optional="true" label="precision - Precision for rounding distance values" help="Set higher precision for longer genome scale sequence lengths">
            <option value="10">.1</option>
            <option value="100" selected="true">.01</option>
            <option value="1000">.001</option>
            <option value="10000">.0001</option>
            <option value="100000">.00001</option>
            <option value="1000000">.000001</option>
        </param>
        <param name="method" type="select" label="method - Select a Clustering Method" help="">
            <option value="average" selected="true">Average neighbor</option>
            <option value="nearest">Nearest neighbor</option>
            <option value="furthest">Furthest neighbor</option>
            <option value="weighted">Weighted</option>
        </param>
        <param name="sorted" type="boolean" checked="false" truevalue="true" falsevalue="false" label="sorted - The input matrix is already sorted"/>
        <param name="showabund" type="boolean" checked="true" truevalue="true" falsevalue="false" label="showabund - Verbose ouput"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="rabund" format="mothur.rabund" from_work_dir="matrix.dist*.rabund" label="${tool.name} on ${on_string}: rabund (Rank Abundance)"/>
        <data name="sabund" format="mothur.sabund" from_work_dir="matrix.dist*.sabund" label="${tool.name} on ${on_string}: sabund (Species Abundance)"/>
        <data name="otulist" format="mothur.list" from_work_dir="matrix.dist*.list" label="${tool.name} on ${on_string}: list (OTU List)"/>
    </outputs>
    <tests>
        <test><!-- test with phylip input-->
            <param name="format" value="phylip"/>
            <param name="dist" value="98_sq_phylip_amazon.dist"/>
            <output name="rabund" ftype="mothur.rabund">
                <assert_contents>
                    <has_line_matching expression="0\.[0-9]+(\t[0-9]+)+"/>
                </assert_contents>
            </output>
            <output name="sabund" ftype="mothur.sabund">
                <assert_contents>
                    <has_line_matching expression="0\.[0-9]+(\t[0-9]+)+"/>
                </assert_contents>
            </output>
            <output name="otulist" ftype="mothur.list">
                <assert_contents>
                    <has_text text="unique"/>
                    <has_text text="label"/>
                    <has_text text="numOtus"/>
                    <has_text text="Otu98"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with column and name input -->
            <param name="format" value="column"/>
            <param name="dist" value="amazon.pair.dist"/>
            <param name="name" value="amazon.names"/>
            <output name="rabund" md5="ec88216404729d0f4a0463e50e60c9ad" ftype="mothur.rabund"/>
            <output name="sabund" md5="f2c714531430b98d8cdfd3497468eec2" ftype="mothur.sabund"/>
            <output name="otulist" ftype="mothur.list">
                <assert_contents>
                    <has_text text="unique"/>
                    <has_text text="label"/>
                    <has_text text="numOtus"/>
                    <has_text text="Otu96"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The hcluster_ command assign sequences to OTUs (Operational Taxonomy Unit).  The assignment is based on a phylip-formatted_distance_matrix_ or a  column-formatted_distance_matrix_ and name_ file.  It generates a list_, a sabund_ (Species Abundance), and a rabund_ (Relative Abundance) file.

.. _phylip-formatted_distance_matrix: https://www.mothur.org/wiki/Phylip-formatted_distance_matrix
.. _column-formatted_distance_matrix: https://www.mothur.org/wiki/Column-formatted_distance_matrix
.. _name: https://www.mothur.org/wiki/Name_file
.. _list: https://www.mothur.org/wiki/List_file
.. _rabund: https://www.mothur.org/wiki/Rabund_file
.. _sabund: https://www.mothur.org/wiki/Sabund_file

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