How to keep cells square in heatplot function of enrichplot
1
0
Entering edit mode
@5215d925
Last seen 4 weeks ago
Spain

Hello! I'm trying to keep cells square in my heatmap generated from heatplot function of enrichplot package from an enrichment object.

I have seen this can be achieved in seaborn.heatmap function using as an argument square=TRUE. However, I'm trying to modify heatplot function of enrichplot package to obtain the same results without success.

Is there any way to achieve what I'm proposing?

I provide the code to reproduce a data example:

library(DOSE)
library(enrichplot)

# load the data:
data(geneList)

# differentially expressed genes:
deg <- names(geneList)[abs(geneList) > 2]

# DisGeNET enrichment
enrichment.result <- enrichDGN(deg)

# gene ID conversion to Symbol
edox <- setReadable(enrichment.result, "org.Hs.eg.db", "ENTREZID")

# heatmap:
heatplot(edox, showCategory = 3)

sessionInfo( )
## R version 4.1.1 (2021-08-10)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 11.6

enter image description here

Thanks in advance!

clusterProfiler enrichplot heatplot • 110 views
1
Entering edit mode
@5215d925
Last seen 4 weeks ago
Spain

I already figured it out using coord_equal():

heatplot(edox, showCategory = 3) + coord_equal()

enter image description here

Login before adding your answer.

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