R heatmap.2带颜色键的一排热图 [英] R heatmap.2 One row heatmap with color key
问题描述
我是R的新手,我想使用heatmap.2从我的数据生成单行热图,如图3C中的宽动态DNA甲基化反应"(Dowen等人,2012)中所述. .以下是文章的链接:pnas.org/content/109/32/E2183/1
I'm new to R and i want to generate a one row heatmap from my data using heatmap.2 as reported in "Widespread dynamic DNA methylation in response to biotic stress", Figure 3C (Dowen et al., 2012). The following is a link to the article: pnas.org/content/109/32/E2183/1
我的有效数据只是一列,其值在-1和1之间:
My effective data is just a column with values between -1 and 1:
deltaMeth
-1
-1
-0.9
-0.8
-0.2
0.3
0.6
0.7
0.8
1
我的目标是使用我的数据集创建类似于(Dowen et al.,2012)报告的热点图.
My goal is to create a heatmap similar to the reported by (Dowen et al., 2012) using my dataset.
谢谢.
推荐答案
您可以使用image
绘制单列数据集的热图:
You can plot a heatmap of a one-column dataset with image
:
library(graphics)
mat <- matrix(c(-1, -1, -.9, -.8, -.2, .3, .6, .7, .8, 1))
image(mat)
这篇关于R heatmap.2带颜色键的一排热图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!