cluster based on full dataset but only show heatmap for 4 genes
1
0
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

RNA-Seq cluster heatmap • 2.6k views
ADD COMMENT
0
Entering edit mode
10.3 years ago
Ron ★ 1.2k

I used this command:

heatmap.2(data1, col=my_palette, Rowv = FALSE, Colv = as.dendrogram(d), scale="row",dendrogram="col", trace="none", margin=c(20, 10))
ADD COMMENT

Login before adding your answer.

Traffic: 4104 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6