view abundance_estimates_to_matrix.xml @ 2:5a97898c6e63 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/trinity commit 30192223eeb60f33a42046921351c6ba3c80c90c
author iuc
date Mon, 21 Nov 2016 09:20:39 -0500
parents fba77b1f69b4
children 8b5039bdf1f6
line wrap: on
line source

<tool id="trinity_abundance_estimates_to_matrix" name="Build expression matrix" version="@WRAPPER_VERSION@.1">
    <description>for a de novo assembly of RNA-Seq data by Trinity</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements">
        <requirement type="package" version="3.14.0">bioconductor-edger</requirement>
        <requirement type="package" version="0.7.2">salmon</requirement>
    </expand>
    <expand macro="stdio"/>
    <command><![CDATA[
        #import re
        #for $entry in $samples:
            ln -s '${entry}' '${re.sub('[^\w\-_]', '_', entry.element_identifier)}' &&
        #end for

        abundance_estimates_to_matrix.pl

        --est_method ${est_method}
        --cross_sample_norm ${additional_params.cross_sample_norm}

        #for $entry in $samples:
            '${re.sub('[^\w\-_]', '_', entry.element_identifier)}'
        #end for
    ]]></command>
    <inputs>
        <param name="samples" label="Abundance estimates" type="data" multiple="true" format="tabular" help="output(s) from 'Align reads and estimate abundance' tool" />

        <param type="select" name="est_method" argument="--est_method" label="Abundance estimation method">
            <option value="RSEM">RSEM</option>
            <option value="eXpress">eXpress</option>
            <option value="salmon">Salmon</option>
        </param>

        <section name="additional_params" title="Additional Options" expanded="False">
            <param type="select" name="cross_sample_norm" argument="--cross_sample_norm" label="Cross sample normalization">
                <option value="TMM">TMM</option>
                <option value="UpperQuartile">UpperQuartile</option>
                <option value="none">None</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <data format="tabular" name="trans_counts" label="${tool.name} on ${on_string}: estimated RNA-Seq fragment counts (raw counts)" from_work_dir="matrix.counts.matrix"/>
        <data format="tabular" name="TPM_no_norm" label="${tool.name} on ${on_string}: matrix of TPM expression values (not cross-sample normalized)" from_work_dir="matrix.TPM.not_cross_norm"/>
        <data format="tabular" name="norm" label="${tool.name} on ${on_string}: matrix of TMM-normalized expression values" from_work_dir="matrix.TMM.EXPR.matrix">
            <filter>additional_params['cross_sample_norm'] == "TMM"</filter>
        </data>
        <data format="tabular" name="norm" label="${tool.name} on ${on_string}: matrix of UpperQuartile-normalized expression values" from_work_dir="matrix.UpperQuartile.EXPR.matrix">
            <filter>additional_params['cross_sample_norm'] == "UpperQuartile"</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="samples" ftype="tabular" value="count/rsem_bowtie/sample_A,count/rsem_bowtie/sample_B"/>
            <param name="est_method" value="RSEM"/>
            <param name="cross_sample_norm" value="TMM"/>
            <output name="trans_counts">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="TPM_no_norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="samples" ftype="tabular" value="count/rsem_bowtie2/sample_A,count/rsem_bowtie2/sample_B"/>
            <param name="est_method" value="RSEM"/>
            <param name="cross_sample_norm" value="TMM"/>
            <output name="trans_counts">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="TPM_no_norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="samples" ftype="tabular" value="count/express_bowtie/sample_A,count/express_bowtie/sample_B"/>
            <param name="est_method" value="eXpress"/>
            <param name="cross_sample_norm" value="TMM"/>
            <output name="trans_counts">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="TPM_no_norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="samples" ftype="tabular" value="count/rsem_bowtie/sample_A,count/rsem_bowtie/sample_B"/>
            <param name="est_method" value="RSEM"/>
            <param name="cross_sample_norm" value="UpperQuartile"/>
            <output name="trans_counts">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="TPM_no_norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="samples" ftype="tabular" value="count/rsem_bowtie/sample_A,count/rsem_bowtie/sample_B"/>
            <param name="est_method" value="RSEM"/>
            <param name="cross_sample_norm" value="none"/>
            <output name="trans_counts">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="TPM_no_norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="samples" ftype="tabular" value="count/salmon/sample_A,count/salmon/sample_B"/>
            <param name="est_method" value="salmon"/>
            <param name="cross_sample_norm" value="none"/>
            <output name="trans_counts">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
            <output name="TPM_no_norm">
                <assert_contents>
                    <has_line_matching expression="TRINITY_DN3_c0_g1&#009;.*" />
                    <has_n_columns n="3" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
<![CDATA[
Trinity_ assembles transcript sequences from Illumina RNA-Seq data.
This tool will combine abundance estimations (produced by 'Align reads and estimate abundance on a de novo assembly of RNA-Seq data' tool) from multiple samples into a single tabular file.
This matrix can then be used by 'RNASeq samples quality check for transcript quantification' and 'Differential Expression Analysis using a Trinity assembly' tools.

**Inputs**

It takes as input multiple results from 'Align reads and estimate abundance on a de novo assembly of RNA-Seq data' tool/
Each sample must have a name, that should be used in subsequent tools.

**Output**

This tool will produce a single matrix file. More details on this page:

.. _Trinity manual: https://github.com/trinityrnaseq/trinityrnaseq/wiki/Trinity-Transcript-Quantification


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

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