How to remove dendrogram from pheatmaps?
2
0
Entering edit mode
Khawlah • 0
@khawlah-24190
Last seen 22 months 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 • 4.4k views
3
Entering edit mode
Guido Hooiveld ★ 3.4k
@guido-hooiveld-2020
Last seen 4 hours ago
Wageningen University, Wageningen, the …

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

0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour 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.