Category

Plot


Usage

plotCorrelation [options] --corData FILE --corMethod {spearman,pearson} --whatToPlot {heatmap,scatterplot}


Manual

plotCorrelation is a tool from the deepTools suite. The information on this page is based on deepTools version 3.5.1.

Required arguments

  • --corData, -in FILE: Compressed matrix of values generated by multiBigwigSummary or multiBamSummary.
  • --corMethod, -c {spearman,pearson}: Correlation method. The method can be either Pearson or Spearman.
  • --whatToPlot, -p {heatmap,scatterplot}: Choose between a heatmap or pairwise scatter plots.

Options

  • --plotFile, -o FILE: File to save the heatmap to. The file extension determines the format (e.g., .png, .eps, .pdf, .svg).
  • --skipZeros: By setting this option, genomic regions that have zero or missing (nan) values in all samples are excluded.
  • --labels, -l sample1 sample2 [...]: User-defined labels instead of default labels from file names.
  • --plotTitle, -T PLOTTITLE: Title of the plot, to be printed on top of the generated image. Leave blank for no title.
  • --plotFileFormat FILETYPE: Image format type. This option overrides the image format based on the plotFile ending (e.g., png, eps, pdf, svg).
  • --removeOutliers: If set, bins with very large counts are removed. The ENCODE blacklist page contains useful information about regions with unusually high counts that may be worth removing.
  • --version: Show the program's version number and exit.
Output optional options
  • --outFileCorMatrix FILE: Save matrix with pairwise correlation values to a tab-separated file.
Heatmap options
  • --plotHeight PLOTHEIGHT: Plot height in cm (Default: 9.5).
  • --plotWidth PLOTWIDTH: Plot width in cm. The minimum value is 1 cm (Default: 11).
  • --zMin, -min ZMIN: Minimum value for the heatmap intensities. If not specified, the value is set automatically.
  • --zMax, -max ZMAX: Maximum value for the heatmap intensities. If not specified, the value is set automatically.
  • --colorMap: Color map to use for the heatmap. Available values can be seen at the provided link.
  • --plotNumbers: If set, then the correlation number is plotted on top of the heatmap. This option is only valid when plotting a heatmap.
Scatter plot options
  • --xRange XRANGE XRANGE: The X-axis range. The default scales these such that the full range of dots is displayed.
  • --yRange YRANGE YRANGE: The Y-axis range. The default scales these such that the full range of dots is displayed.
  • --log1p: Plot the natural log of the scatter plot after adding 1. Note that this is ONLY for plotting; the correlation is unaffected.

Examples

Scatterplot

Here we make pairwose scatterplots of the average scores per transcript that we calculated using multiBigwigSummary and include the Pearson correlation coefficients for each comparison.

$ plotCorrelation \
-in scores_per_transcript.npz \
--corMethod pearson --skipZeros \
--plotTitle "Pearson Correlation of Average Scores Per Transcript" \
--whatToPlot scatterplot \
-o scatterplot_PearsonCorr_bigwigScores.png \
--outFileCorMatrix PearsonCorr_bigwigScores.tab

Besides the correlation scatter plot, we also export the correlation matrix to the file PearsonCorr_bigwigScores.tab:

$ cat PearsonCorr_bigwigScores.tab
    'H3K27me3'      'H3K4me1'       'H3K4me3'       'HeK9me3'       'input'
    'H3K27me3'      1.0000  -0.1032 -0.1269 -0.0339 -0.0395
    'H3K4me1'       -0.1032 1.0000  0.3985  -0.1863 0.3328
    'H3K4me3'       -0.1269 0.3985  1.0000  -0.0480 0.2822
    'HeK9me3'       -0.0339 -0.1863 -0.0480 1.0000  -0.0353
    'input' -0.0395 0.3328  0.2822  -0.0353 1.0000

 


Share your experience or ask a question