plotUMAP and ggplotly Cell IDs Display
0
0
Entering edit mode
Dario Strbenac ★ 1.5k
@dario-strbenac-5916
Last seen 5 days ago
Australia

How should plotUMAP be used to retain cell IDs so that ggplotly(someUMAP) will show IDs on hover? I have made a faceted UMAP plot, faceted by cell types and some clusters are completely overlapping and not seen to have different cell types in them unless they are faceted. So, I would like to get cell IDs of some cells from cancer facet and cell IDs from fibroblast facet to examine the known marker genes for cancer and fibroblasts of the cells with different cell type but overlapping almost perfectly in UMAP. I have tried using iSEE but found it clunky and was unsuccessful for this task, so am hoping for a lightweight approach to work.

scater • 574 views
ADD COMMENT
1
Entering edit mode

You could at some point add extra geoms to a plot into ggplotly that would show up in the hovertext, eg a text geom to ggplotly that will come up in the hovertext. So something like:

library("scater")

sce <- mockSCE()

sce <- logNormCounts(sce)
sce <- runUMAP(sce)
sce$Cell_name <- colnames(sce)

ggplotly(ggcells(sce) + geom_point(aes(UMAP.1, UMAP.2, text=Cell_name)) + facet_wrap(~Cell_Cycle))
ADD REPLY

Login before adding your answer.

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