Question: Draw heatmaps for large dataset 2000x40
0
gravatar for RT
3.6 years ago by
RT330
European Union
RT330 wrote:

Hi All, 

I have created a heatmap for expression data of 2000 genes across 40 different conditions. But it is not informative at all, gene names are not visible etc.. Can anyone suggest me how to do a better heatmap. It will be ok if the heatmap is drawn on a big pdf file or multiple pages pdf file.

Thanks,

RT

r heatmaps • 1.4k views
ADD COMMENTlink modified 3.6 years ago by Alex Reynolds25k • written 3.6 years ago by RT330
0
gravatar for Alex Reynolds
3.6 years ago by
Alex Reynolds25k
Seattle, WA USA
Alex Reynolds25k wrote:

Cluster expression data or otherwise reduce those 2000 rows to a smaller set showing aggregate behavior.

ADD COMMENTlink written 3.6 years ago by Alex Reynolds25k

Hi Alex, These genes are the smallest subset I could extract. If anyone has written a script/tool to plot large datasets then that will be helpful.

ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by RT330
0
gravatar for Siva
3.6 years ago by
Siva1.6k
United States
Siva1.6k wrote:

Can you try Matrix2png?

ADD COMMENTlink written 3.6 years ago by Siva1.6k
0
gravatar for Alex Reynolds
3.6 years ago by
Alex Reynolds25k
Seattle, WA USA
Alex Reynolds25k wrote:

Sorry, are you asking how to make a heatmap, or how to make a better heatmap?

If you're just asking how to make a heatmap, then matrix2png is a good recommendation. However, it will crash on large datasets, unless you explicitly specify the numbers of rows and columns as numr and numc options, which enable it to set up the required memory ahead of time. 

If you're asking how to make a better heatmap, then reducing the heatmap to general features is recommended. You could use R with the gplots library, which has a heatmap.2 routine that makes it easy to render clusters via row- and column-based dendrograms alongside the heatmap, e.g.,:

> library(gplots)
> m_table <- read.table("foo.txt", as.is=T, header=T, stringsAsFactors=T)
> m_matrix <- data.matrix(m_table)
> pdf("foo.pdf", height=30, width=5)
> hwsr <- heatmap.2(m_matrix, hclustfun=function(x) hclust(x, method="ward"), scale="row", cexCol=0.5, cexRow=0.075)
> dev.off()
ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by Alex Reynolds25k

Hi Alex,

Thanks for this. I use R for drawing heatmaps. I used the following code for clustering as a first trial and got the following errors. Can you please help!

hc <- hclust(as.dist(1-cor(data_matrix, method="spearman")), method="complete")
hr <- hclust(as.dist(1-cor(t(data_matrix), method="pearson")),method="complete")
heatmap.2(data_matrix, col=brewer.pal(11,"RdBu"), cexCol=0.7, labRow=NA, Colv=as.dendrogram(hc), density.info="none", scale="row",trace="none",symm = T)

Error in hclust(as.dist(1 - cor(t(data_matrix), method = "pearson")),  : 
  NaN dissimilarity value.
In addition: Warning message:
In cor(t(data_matrix), method = "pearson") : the standard deviation is zero

ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by RT330
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: 1557 users visited in the last hour