Entering edit mode
10.3 years ago
Ron
★
1.2k
Hi,
I want to make a heat map with 4 genes across the samples but the dendrogram should be according to all 20k genes expression values.
The code for heat map is:
heatmap.2(data1, col=redgreen(75), Rowv = FALSE, Colv = FALSE, scale="row",dendrogram="none", trace="none", margin=c(20, 10))
And the code for making a separate complete dendrogram is:
dend contains log of the expression values of all genes across the samples.
d <- hclust(as.dist(1-cor(dend,method="pearson")), method="average")
plot(d)
I think the heat map.2 function can be used for this purpose? Creating the heat map based on 4 genes,but clustering based on all genes?
Thanks,
Ron