How to remove dendrogram from pheatmaps?
2
0
Entering edit mode
Khawlah • 0
@khawlah-24190
Last seen 8 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 • 688 views
ADD COMMENT
1
Entering edit mode
Guido Hooiveld ★ 3.0k
@guido-hooiveld-2020
Last seen 1 day 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 6 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.

Login before adding your answer.

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