view plotCorrelation.xml @ 5:ae54e08b15d7 draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 8b9cdb8dc4a8fedd2b2286e7afab6529e49a9d22-dirty
author bgruening
date Tue, 22 Dec 2015 13:45:00 -0500
parents e556e34fc12a
children 7cbaaf80dced
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 bamCorrelate 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,
                bamCorrelate 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="bamCorrelate_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="bamCorrelate_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
heatmap of correlation coefficients. Further output files are optional.
The compressed input matrices are easily generated using the "bamCorrelate" and "bigwigCorrelate" modules of deeptools.


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


You can find more details on plotCorrelation here http://deeptools.readthedocs.org/en/release-1.6/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**:

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 bigwigCorrelate. 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>