Question: How to add significance level to correlation heatmap using ggplot2
0
gravatar for Ana
6 months ago by
Ana170
Ana170 wrote:

I have generated some correlation heatmaps. I want to know how can I replace r-values in each cell of the plot with the p-value? These value inside the heatmap are correlation coefficients, I want to replace them with the p-values, or have both p-value and r-value in each cell! This is my R-table

head(data)
            env Chr01 Chr05 Chr11 Chr13_a Chr13_b
1   env1    0.4816731  -0.44170625    0.4635633     0.50192843    -0.56908075
2  env10    0.1311885   0.09209417    0.0499076    -0.01852129    -0.07120534
3  env11    0.2081285   0.01291618    0.1278969     0.06452087    -0.13677310

enter link description here

I am using this code

heatmap.2(data,col=greenred(10),scale="row", trace="none",cellnote = data)
correlation ggplot R • 707 views
ADD COMMENTlink modified 6 months ago by Alex Reynolds28k • written 6 months ago by Ana170

Please do this: How to add images to a Biostars post

ADD REPLYlink written 6 months ago by genomax70k
0
gravatar for Alex Reynolds
6 months ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

To show two dimensions of data, you could use a so-called "bubble plot", in which the gradient of bubble radii represents r-values and the gradient of bubble color represents p-values (or vice versa).

See the following for a demonstration: http://t-redactyl.io/blog/2016/02/creating-plots-in-r-using-ggplot2-part-6-weighted-scatterplots.html

ADD COMMENTlink written 6 months ago by Alex Reynolds28k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 547 users visited in the last hour