-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime of getting UMAP reductions #18
Comments
This was a bug my mistake I updated it to this
Best Jeff |
Works like charm! Thanks a lot. se@metadata$optimizeLSI <- lsiObj
se@metadata$matSVD <- lsiObj[[length(lsiObj)]][[1]][[1]] #Last one
se@metadata$variableGenes <- rownames(se)[lsiObj[[length(lsiObj)]]$varFeatures] #Variable genes
####################################################
#For Creating UMAP Start Here
####################################################
matSVD <- se@metadata$matSVD
clusters <- colData(se)$Clusters
#Set Seed and perform UMAP on LSI-SVD Matrix
set.seed(1)
uwotUmap <- uwot::umap(
matSVD,
n_neighbors = 35,
min_dist = 0.45,
metric = "euclidean",
n_threads = 1,
verbose = TRUE,
ret_nn = TRUE,
ret_model = TRUE
)
pdf("Plot_UMAP-NN-35-MD-45.pdf", width = 12, height = 12, useDingbats = FALSE)
df <- data.frame(
x = uwotUmap[[1]][,1],
y = -uwotUmap[[1]][,2],
color = clusters
)
ggplot(df,aes(x,y,color=color)) +
geom_point() +
theme_bw() +
scale_color_manual(values=se@metadata$colorMap$Clusters) +
xlab("UMAP Dimension 1") +
ylab("UMAP Dimension 2")
dev.off() |
Hi @mohit1997 , I am trying to replicate 'scRNA_02_Cluster_Disease_w_Reference_v1.R' . (for
) Thanks! |
Hi,
Hi @mohit1997 , How do you think about these errors? |
I am trying to run
scRNA_01_Clustering_UMAP_v1.R
, and apparently the functionoptimizeLSI
is iterative. The code shows that each iteration take 30 seconds and the maximum number of iterations is 3000. Am I doing something wrong or is it supposed to be this slow?The text was updated successfully, but these errors were encountered: