view plotCorrelation.xml @ 9:59ca699c7b77 draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit b'a4965adc865b4c85b35ed205bc10821edc104f20'
author bgruening
date Tue, 19 Jan 2016 10:08:48 -0500
parents a48149b2cb5e
children cc0acb70ded3
line wrap: on
line source

<tool id="deeptools_plot_correlation" name="plotCorrelation" version="@WRAPPER_VERSION@.0">
    <description>creates a heatmap or scatterplot of correlation scores between different samples </description>
    <macros>
        <token name="@BINARY@">plotCorrelation</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command>
<![CDATA[
        @BINARY@
            --corData "$corData"
            --plotFile "$outFileName"
            --corMethod "$corMethod"
            --whatToPlot "$plotting_type.whatToPlot"
            #if str($plotting_type.whatToPlot) == 'heatmap':
                @HEATMAP_OPTIONS@
            #else:
                --plotTitle '$plotting_type.plotTitle'
            #end if
            $skipZeros
            --plotFileFormat "$outFileFormat"
            $removeOutliers
            #if $outFileCorMatrix:
                --outFileCorMatrix "$matrix"
            #end if

]]>
    </command>
    <inputs>
        <param name="corData" format="deeptools_coverage_matrix" type="data" label="Matrix file from the multiBamCoverage tool"/>
        <expand macro="corMethod" />

        <conditional name="plotting_type" >
            <param argument="--whatToPlot" type="select" label="Plotting type">
                <option value="heatmap" selected="True">Heatmap</option>
                <option value="scatterplot">Scatterplot</option>
            </param>
            <when value="heatmap">
                <expand macro="heatmap_options" />
            </when>
            <when value="scatterplot">
                <expand macro="plotTitle" />
            </when>
        </conditional>

        <expand macro="skipZeros" />

        <expand macro="input_image_file_format" />

        <param argument="--removeOutliers" type="boolean"
            truevalue="--removeOutliers" falsevalue="" label="Remove regions with very large counts"
            help="If set, bins with very large counts are removed. Bins
                with abnormally high reads counts artificially
                increase pearson correlation; that's why, by default,
                plotCorrelation tries to remove outliers using the median
                absolute deviation (MAD) method applying a threshold
                of 200 to only consider extremely large deviations
                from the median. ENCODE blacklist page (https://sites.
                google.com/site/anshulkundaje/projects/blacklists)
                contains useful information about regions with
                unusually high counts."/>

        <param name="outFileCorMatrix" type="boolean" label="Save the matrix of values underlying the heatmap"/>

    </inputs>
    <outputs>
        <expand macro="output_image_file_format_not_nested" />
        <data format="tabular" name="matrix" label="${tool.name} on ${on_string}: Correlation matrix">
            <filter>outFileCorMatrix is True</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="corData" value="multiBamCoverage_result1.npz" ftype="deeptools_coverage_matrix" />
            <param name="outFileFormat" value="png" />
            <param name="outFileCorMatrix" value="True" />
            <output name="matrix" file="plotCorrelation_result1.tabular" ftype="tabular" />
            <output name="outFileName" file="plotCorrelation_result1.png" ftype="png" compare="sim_size" delta="100" />
        </test>
        <test>
            <param name="corData" value="multiBamCoverage_result1.npz" ftype="deeptools_coverage_matrix" />
            <param name="outFileFormat" value="png" />
            <param name="whatToPlot" value="scatterplot" />
            <param name="removeOutliers" value="True" />
            <param name="plotTitle" value="Test Plot" />
            <output name="outFileName" file="plotCorrelation_result2.png" ftpye="png" compare="sim_size" delta="100" />
        </test>
    </tests>
    <help>
<![CDATA[
**What it does**

This tools takes a compressed matrix of scores (such as read coverages) for a number of genomic regions
and different samples. It can visualize the correlation among samples as scatterplots or as
a heatmap of correlation coefficients. Further output files are optional.
The compressed input matrices are easily generated using the "multiBamCoverage" and "multiBigwigSummary" tools.


.. image:: $PATH_TO_IMAGES/QC_multiBamCoverage_humanSamples.png
   :alt: Heatmap of RNA Polymerase II ChIP-seq


You can find more details on plotCorrelation here http://deeptools.readthedocs.org/en/master/content/tools/plotCorrelation.html


**Output files**:

- **diagnostic plot**: Either a scatterplot or clustered heatmap (select above) displaying the values for each pair-wise correlation,
  see below for an example
- data matrix (optional): if you want to analyze or plot the correlation values using a different program, e.g. R, this matrix can be used

**Output with test dataset**:

The following is the output of plotCorrelation with our test ChIP-Seq datasets. Average coverages were computed over 10kb bins for chromosome X,
from bigwig files using multiBigwigSummary. The output was used by plotCorrelation to make a heatmap of spearman correlation between samples.

.. image:: $PATH_TO_IMAGES/plotCorrelation_galaxy_bw_heatmap_output.png


-----

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