UMAP to replace tSNE
Hi,
Could you please advise how tSNE can by replaced by UMAP throughout the workflow?
Many thanks
I have the same problem, any suggestion please?
I found in the AUCell package that if you use
umap.coord <- reducedDims(SCE)[["UMAP"]]
colnames(umap.coord) <- c("UMAP_1", "UMAP_2")
AUCell_plotTSNE(tSNE=umap.coord, exprMat=exprMatrix,...)
You can actually plot the enrichment for gene sets on UMAP coordinates that you have calculated previously (eventhough the function name suggests it would be restricted to TSNE). But I am still not sure how UMAP can be more broadly implemented throughout the SCENIC workflow... Any input from the developpers would be greatly appreciated...
Hi,
Could you please advise how tSNE can by replaced by UMAP throughout the workflow?
Many thanks
I have the same problem, any suggestion please?
Me too!!
RM-SCB, did you come across the error "The t-SNE should be a matrix with 2 columns (cell coordinates)"
Using UMAP worked when using the plot function in AUCells. But it doesn't seem to like UMAP when using for AUCELL_plotTSNE.
Well no idea if anyone still here, but if you take your original seurat object = downsampled.obj. Then, pbmc_umap_coord <- downsampled.obj@reductions$umap pbmc_umap_coord <- [email protected]
now you can just use AUCell_ploTSNE but feed it pbmc_umap_coord like so
AUCell::AUCell_plotTSNE(pbmc_umap_coord, exprMat, aucell_regulonAUC[onlyNonDuplicatedExtended(rownames(aucell_regulonAUC))[c("SPI1", "ELF2", "IRF1")],], plots="Expression")
umap.coord <- sce@reductions[["umap"]]@cell.embeddings
plotTsne_AUCellApp <- function(scenicOptions, exprMat, tSNE_fileName=NULL, skipDuplicatedExtended=TRUE) { if(is.null(tSNE_fileName)) tSNE_fileName <- tsneFileName(scenicOptions) tSNE <- readRDS(tSNE_fileName) regulonAUC <- loadInt(scenicOptions, "aucell_regulonAUC") thresholds <- loadInt(scenicOptions, "aucell_thresholds", ifNotExists="null") cellInfo <- loadFile(scenicOptions, getDatasetInfo(scenicOptions, "cellInfo"), ifNotExists="null") colVars <- loadFile(scenicOptions, getDatasetInfo(scenicOptions, "colVars"), ifNotExists="null")
if(skipDuplicatedExtended) { regulons2plot <- onlyNonDuplicatedExtended(rownames(regulonAUC)) regulonAUC <- regulonAUC[regulons2plot,] thresholds <- thresholds[regulons2plot] } aucellApp <- AUCell_createViewerApp(auc=regulonAUC, thresholds=thresholds, tSNE=umap.coord, exprMat=exprMat, cellInfo=cellInfo, colVars=colVars) invisible(aucellApp) }
exprMat_log <- exprMat # Better if it is logged/normalized aucellApp <- plotTsne_AUCellApp(scenicOptions, exprMat_log) # default t-SNE savedSelections <- shiny::runApp(aucellApp)