view define_clusters_by_cutting_tree.xml @ 17:5192f657f305 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/trinity commit 1b2ce625fad2514549bf2a675c26517c3d46ed81"
author iuc
date Sun, 19 Dec 2021 16:26:45 +0000
parents 8928f2226e40
children ae501908a17f
line wrap: on
line source

<tool id="trinity_define_clusters_by_cutting_tree" name="Partition genes into expression clusters" version="@WRAPPER_VERSION@+galaxy1">
    <description>after differential expression analysis using a Trinity assembly</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements">
        <requirement type="package" version="2.44.0">bioconductor-biobase</requirement>
        <requirement type="package" version="2.0.8">r-cluster</requirement>
        <requirement type="package" version="1.1.25">r-fastcluster</requirement>
    </expand>
    <command detect_errors="aggressive"><![CDATA[

        define_clusters_by_cutting_tree.pl

        -R '${rdata}'

        #if str( $method.method_selector ) == "--Ptree":
            --Ptree ${method.ptree}
        #else
            #if str( $method.method_selector ) == "--Ktree":
                --Ktree ${method.ktree}
            #else
                -K ${method.k}
            #end if
        #end if

        $additional_params.column_ordering

        &&
        mv *.clusters_fixed_*/* .

    ]]></command>
    <inputs>
        <param format="rdata" name="rdata" argument="-R" type="data" label="RData file" help="RData file produced by 'Extract and cluster differentially expressed transcripts from a Trinity assembly' tool"/>
        <conditional name="method">
            <param name="method_selector" type="select" label="Method for partitioning genes into clusters">
                <option value="--Ptree">Cut tree based on x percent of max(height) of tree</option>
                <option value="--Ktree">Cut tree into K clusters</option>
                <option value="-K">Define K clusters via k-means algorithm</option>
            </param>
            <when value="--Ptree">
                <param name="ptree" type="float" argument="--Ptree" value="20" label="Cut tree based on this percent of max(height) of tree" help="Give a percent value"/>
            </when>
            <when value="--Ktree">
                <param name="ktree" type="integer" argument="--Ktree" value="2" label="Cut tree into K clusters "/>
            </when>
            <when value="-K">
                <param name="k" type="integer" argument="-K" value="2" label="Define K clusters via k-means algorithm" help="This does not leverage the already hierarchically clustered genes, and instead uses a least-sum-of-squares method to define exactly k gene clusters."/>
            </when>
        </conditional>
        <section name="additional_params" title="Additional Options" expanded="False">
            <param name="column_ordering" type="select" label="Column ordering in expression matrices" argument="--no_column_reordering / --lexical_column_ordering">
                <option value="">Order based on sample clustering</option>
                <option value="--no_column_reordering">No reordering based on sample clustering</option>
                <option value="--lexical_column_ordering">Reorder column names according to lexical ordering</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <collection name="expression_matrices" type="list" label="${tool.name} on ${on_string}: expression matrices for each cluster">
            <discover_datasets pattern="(?P&lt;name&gt;.+_log2_medianCentered_fpkm\.matrix)$" ext="tabular" />
        </collection>
        <data format="pdf" name="cluster_plots" label="${tool.name} on ${on_string}: cluster plots" from_work_dir="my_cluster_plots.pdf"/>
    </outputs>
    <tests>
        <test>
            <param name="rdata" value="count/analyze_diff_expr/results.matrix.RData"/>
            <conditional name="method">
                <param name="method_selector" value="--Ptree"/>
                <param name="ptree" value="60"/>
            </conditional>
            <output_collection name="expression_matrices">
                <element name="subcluster_1_log2_medianCentered_fpkm.matrix" compare="sim_size" file="count/define_clusters_by_cutting_tree/subcluster_1_log2_medianCentered_fpkm.matrix"/>
                <element name="subcluster_2_log2_medianCentered_fpkm.matrix" compare="sim_size" file="count/define_clusters_by_cutting_tree/subcluster_2_log2_medianCentered_fpkm.matrix"/>
            </output_collection>
            <output name="cluster_plots" delta="100" compare="sim_size" file="count/define_clusters_by_cutting_tree/my_cluster_plots.pdf"/>
        </test>
    </tests>
    <help>
<![CDATA[
Trinity_ assembles transcript sequences from Illumina RNA-Seq data.
This tool partitions the differentially expressed genes into gene clusters with similar expression patterns by one of several available methods, once differential expression analyses have been runned. It is a companion tool for the tool 'Extract and cluster differentially expressed transcripts from a Trinity assembly'.

**Inputs**

This tool uses the RData file produced by 'Extract and cluster differentially expressed transcripts from a Trinity assembly' tool.

.. _Trinity: http://trinityrnaseq.github.io
]]>
    </help>

    <expand macro="citation" />
</tool>