view deseq2_visualisation.xml @ 3:8edcbafb3b4e draft

"planemo upload for repository https://github.com/geraldinepascal/FROGS-wrappers/ commit 2024a13846ea6f9bd94ae62e3b2a5a3aba8cd304-dirty"
author frogs
date Tue, 24 Aug 2021 08:21:23 +0000
parents 094a2469204d
children 445b04a65ed8
line wrap: on
line source

<?xml version="1.0"?>
<!--
# Copyright (C) 2017 INRA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->
<tool id="FROGSSTAT_DESeq2_Visualisation" name="FROGSTAT Deseq2 Visualisation" version="@TOOL_VERSION@+galaxy2">
    <description>to extract and visualise differentially abundant OTUs</description>

    <macros>
        <import>macros.xml</import>
    </macros>

    <expand macro="requirements_phyloseq">
        <requirement type="package" version="1.30.1">bioconductor-deseq2</requirement>
        <requirement type="package" version="0.18">r-dt</requirement>
    </expand>

    <stdio>
        <exit_code range="1:" />
        <exit_code range=":-1" />
    </stdio>
    <command>deseq2_visualisation.py --phyloseqData '$input_phyloseq'
                                     --dds '$input_DDS'
                                     --var '$var'
                                     #if $varType.vartType_selected == "qual":
                                         --mod1 '$varType.mod1' --mod2 '$varType.mod2'
                                     #end if
                                     --padj $padj
                                     --html '$html'
    </command>
    <inputs>
        <!-- Files -->
        <param format="rdata" name="input_phyloseq" type="data" label="Phyloseq object (format rdata)" help="This is the result of FROGS Phyloseq Import Data, used in FROGSSTAT DESeq2 Preprocess tool" optional="false">
            <validator type="empty_field" message="This parameter is required." />
        </param>
        <param format="rdata" name="input_DDS" type="data" label="DESeq2 object (format rdata)" help="This is the result of FROGSSTAT DESeq2 Preprocess tool." optional="false">
            <validator type="empty_field" message="This parameter is required." />
        </param>
        <!-- Parameters -->
        <param name="var" type="text" label="Experimental variable" help="The factor suspected to have an effect on OTUs' abundances (one of the variables used in FROGS DESeq2 Preprocess tool). Ex : Treatment" optional="false" value="" size="20">
            <validator type="empty_field" message="This parameter is required." />
        </param>
        <conditional name="varType">
            <param type="select" name="vartType_selected" label="Is your Variable quantitative or qualitative?" help="If qualitative, choose 2 conditions to compare." optional="false">
                <option value="qual">qualitative</option>
                <option value="quant">quantitative</option>
            </param>
            <when value="qual">
                <param type="text" name="mod2" label="Condition 1 considered as reference" help="One condition of the experimental variable (e.g. with)." optional="false" value="" size="20">
                    <validator type="empty_field" message="This parameter is required." />
                </param>
                <param type="text" name="mod1" label="Condition 2 to be compared to the reference" help="Another condition of the experimental variable (e.g. without)." optional="false" value="" size="20">
                    <validator type="empty_field" message="This parameter is required." />
                </param>
            </when>
            <when value="quant"/>
        </conditional>
        <param name="padj" type="float" label="Adjusted p-value threshold" help="Threshold used for statistical significance of the differentially abundant OTUs analysis." optional="false" value="0.05">
            <validator type="empty_field" message="This parameter is required." />
        </param>
    </inputs>
    <outputs>
        <data format="html" name="html" label="${tool.name}: report.nb.html" from_work_dir="report.nb.html"/>
    </outputs>
    <tests>
        <test>
            <param name="input_phyloseq" value="references/16-phylo_import.Rdata"/>
            <param name="input_DDS" value="references/23-deseq2_preprocess.Rdata"/>
            <param name="var" value="EnvType" />
            <param name="mod1" value="BoeufHache"/>
            <param name="mod2" value="SaumonFume"/>
            <param name="padj" value="0.05" />
            <output name="html">
                <assert_contents>
                    <has_text text="FROGSSTAT DESeq2: Visualisation" />
                    <has_text text='["otu_01582",' />
                    <!-- baseMean value of otu_01582 -->
                    <has_text text='52.445510949046' />
                    <!-- Log2 FC of otu_01582 -->
                    <has_text text='21.6622901050859' />
                    <!-- lfcSE of otu_01582 -->
                    <has_text text='2.20892675384734' />
                    <!-- pvalue otu_01582 -->
                    <has_text text='1.0535393782052e-22' />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>

@HELP_LOGO@

.. class:: infomark page-header h2

What it does

Launch one Rmarkdown Script to visualise the DESeq2 results.

.. class:: infomark page-header h2

Inputs/Outputs

.. class:: h3

Input

**phyloseq object** (format rdata):
One phyloseq object stored in a rdata file.
This file is the result of FROGSSTAT Phyloseq Import Data.

**dds object** (format rdata):
A DESeq2 dataset (dds) stored in rdata file.
This file is the result of FROGSSTAT DESeq2 preprocess.

.. class:: h3

Ouput

**html file** (format `HTML &lt;https://en.wikipedia.org/wiki/HTML&gt;`_): visualisation of "Differential Abundance".

The html file contains Table, Pie Chart, MA plot, Volcano plot and Heatmap plot. If the experimental variable is qualitative, only samples corresponding to the 2 compared conditions are shown in the Heatmap. Otherwise, samples are sorted in increasing order of the experimental variable.

* Table containing the differentially abundant OTUs.

 .. image:: static/images/FROGS_DESeq2_html_table.png
    :height: 216
    :width: 789

* Pie Chart, MA plot and Volcano plot

 .. image:: static/images/FROGS_DESeq2_html_pieChart.png
    :height: 576
    :width: 768

 .. image:: static/images/FROGS_DESeq2_html_MA_plot.png
    :height: 480
    :width: 672

 .. image:: static/images/FROGS_DESeq2_html_Volcano_plot.png
    :height: 506
    :width: 633

* Heatmap plot corresponding to the differentially abundant OTUs.

 .. image:: static/images/FROGS_DESeq2_html_heatmap_plot.png
    :height: 576
    :width: 768

.. class:: infomark page-header h2

How it works

Based on the variable you precise to construct the model in FROGSSTAT DESeq2 Preprocess, this tool will construct table and graphs to visualise différentially abundant OTU between condition of the selected variables.

You may first precise the variable used to construct the model during the FROGSSTAT DESeq Preprocess step. If you precised variable with a confounding factor (a second variale), you may choose between one of the variables, but remember that you will see the result of this variable corrected by the confounding factor (and reversely) not just the selected variable itself.

If the variable is qualitative (ex: variable Treatment is define by two conditions : treatment1, treatment2, control), you must specify 2 conditions to compare (e.g. treatment1 vs treatment2 or treatment1 vs control, ...).

@HELP_CONTACT@

    </help>

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