How to remove dendrogram from pheatmaps?
2
0
Entering edit mode
Khawlah • 0
@khawlah-24190
Last seen 4.1 years ago

Hi,

I want to cluster rows in heat map but don't want the dendrogram shown. How can I do that. That's the code I have used

Code should be placed in three backticks as shown below


 p1<-pheatmap(assay(ntd_sub)[select,], cluster_rows=TRUE, show_rownames=TRUE,
               cluster_cols=FALSE, annotation_col=df)


sessionInfo( )
pheatmapr DESeq2 Bioconductor • 13k views
ADD COMMENT
5
Entering edit mode
Guido Hooiveld ★ 4.1k
@guido-hooiveld-2020
Last seen 3 hours ago
Wageningen University, Wageningen, the …

To hide the dendrogram in pheatmap you can set the argument treeheight_row or treeheight_col to zero.

ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States

Do note that pheatmap is a CRAN package, so you should probably be asking your question on r-help@r-project.org, or perhaps stackoverflow.com. Or you could just use a Google search.

I don't personally use pheatmap, as I find ComplexHeatmap to be a superior alternative, and which has an argument show_row_dend which you can set to FALSE to do what you want.

ADD COMMENT

Login before adding your answer.

Traffic: 961 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