Mercurial > repos > bgruening > deeptools_plot_correlation
view plotCorrelation.xml @ 30:bad3ca889618 draft default tip
planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit 4a4029b5c2e725b7cebc27217b76d23910508412
author | bgruening |
---|---|
date | Wed, 27 Sep 2023 20:26:36 +0000 |
parents | 2c66e43f1c86 |
children |
line wrap: on
line source
<tool id="deeptools_plot_correlation" name="plotCorrelation" version="@TOOL_VERSION@+galaxy0" profile="@GALAXY_VERSION@"> <description>Create 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@ --plotWidth $plotting_type.plotWidth --plotHeight $plotting_type.plotHeight #else: --plotTitle '$plotting_type.plotTitle' #if str($plotting_type.xrange_conditional.xrange_select) == 'yes': --xRange $plotting_type.xrange_conditional.xRange_min $plotting_type.xrange_conditional.xRange_max #end if #if str($plotting_type.yrange_conditional.yrange_select) == 'yes': --yRange $plotting_type.yrange_conditional.yRange_min $plotting_type.yrange_conditional.yRange_max #end if $plotting_type.log1p #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 multiBamSummary 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" /> <expand macro="plotWidthHeight" PLOTWIDTH="11.0" PLOTHEIGHT="9.5" /> </when> <when value="scatterplot"> <expand macro="plotTitle" /> <conditional name="xrange_conditional"> <param type="select" name="xrange_select" label="Manually set X axis range?"> <option value="no" selected="True">No</option> <option value="yes">Yes</option> </param> <when value="yes"> <param name="xRange_min" type="integer" value="0" label="X axis minimum value" help="X axis minimum value. Not specifying this scales these such that the full range of dots is displayed." /> <param name="xRange_max" type="integer" value="1000" label="X axis maximum value" help="X axis maximum value. Not specifying this scales these such that the full range of dots is displayed." /> </when> <when value="no" /> </conditional> <conditional name="yrange_conditional"> <param type="select" name="yrange_select" label="Manually set Y axis range?"> <option value="no" selected="True">No</option> <option value="yes">Yes</option> </param> <when value="yes"> <param name="yRange_min" type="integer" value="0" label="Y axis minimum value" help="Y axis minimum value. Not specifying this scales these such that the full range of dots is displayed." /> <param name="yRange_max" type="integer" value="1000" label="Y axis maximum value" help="Y axis maximum value. Not specifying this scales these such that the full range of dots is displayed." /> </when> <when value="no" /> </conditional> <param argument="--log1p" type="boolean" truevalue="--log1p" falsevalue="" label="Log transform" help="Plot the natural log of the scatter plot after adding 1. Note that this is ONLY for plotting, the correlation is unaffected." /> </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="multiBamSummary_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="400" /> </test> <test> <param name="corData" value="multiBamSummary_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" ftype="png" compare="sim_size" delta="300" /> </test> </tests> <help> <![CDATA[ What it does ------------ This tools takes the default output of ``multiBamSummary`` or ``multiBigwigSummary``, and computes the pairwise correlation among samples. Results can be visualized as **scatterplots** or as a **heatmap** of correlation coefficients (see below for examples). Theoretical Background ---------------------- The result of the correlation computation is a **table of correlation coefficients** that indicates how "strong" the relationship between two samples is and it will consist of numbers between -1 and 1. (-1 indicates perfect anti-correlation, 1 perfect correlation.) We offer two different functions for the correlation computation: *Pearson* or *Spearman*. The *Pearson method* measures the **metric differences** between samples and is therefore influenced by outliers. The *Spearman method* is based on **rankings**. Output ------ The default output is a **diagnostic plot** -- either a scatterplot or a clustered heatmap displaying the values for each pair-wise correlation (see below for example plots). Optionally, you can also obtain a table of the pairwise correlation coefficients. .. image:: $PATH_TO_IMAGES/plotCorrelation_output.png :width: 600 :height: 271 Example plots ------------- The following is the output of ``plotCorrelation`` with our test ChIP-Seq datasets (to be found under "Shared Data" --> "Data Library"). Average coverages were computed over 10 kb bins for chromosome X, from bigWig files using ``multiBigwigSummary``. This was then used with ``plotCorrelation`` to make a heatmap of Spearman correlation coefficients. .. image:: $PATH_TO_IMAGES/plotCorrelation_galaxy_bw_heatmap_output.png :width: 600 :height: 518 The scatterplot could look like this: .. image:: $PATH_TO_IMAGES/plotCorrelation_scatterplot_PearsonCorr_bigwigScores.png :width: 600 :height: 600 ----- @REFERENCES@ ]]> </help> <expand macro="citations" /> </tool>