-
Notifications
You must be signed in to change notification settings - Fork 3
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
Annoy algorithm in bluster
cannot accelerate the clustering process
#12
Comments
@LTLA , thanks for your reply and the development of the great single cell toolkit in Bioconducot. Since I only used the first 50 PCs to clustering, |
here is my sessionInfo:
|
Works fine for me. library(bluster)
library(BiocNeighbors)
m <- matrix(rnorm(5e6), ncol=50)
system.time(X <- clusterRows(m, BLUSPARAM = SNNGraphParam(cluster.fun="louvain", BNPARAM=AnnoyParam())))
## user system elapsed
## 181.504 1.076 182.632
system.time(X <- clusterRows(m, BLUSPARAM = SNNGraphParam(cluster.fun="louvain")))
# ... DNF after 10 minutes... For smaller datasets, there may not be any speed-up as the Annoy approach writes its index to file for more general multi-threading via Session informationStill on the last devel cycle, but there weren't any major changes in the latest release, so it shouldn't matter.
|
FWIW the vast majority of time is spent inside igraph's You can speed up the graph construction by parallelizing it via IIRC Seurat had their own implementation of the Louvain algorithm. I don't know whether or not this is of the same quality as igraph's implementation, but if it's noticeably faster, they may be taking some short-cuts that igraph does not. |
Thanks for your detail explanation, I'll persist in bioconductor single cell toolkit instead of pursuing performance blindly. So from from my side it would be ok to close the issue now, and I also got the same description that we won't get any benifits from annoy for small datasets in http://bioconductor.org/books/3.15/OSCA.advanced/dealing-with-big-data.html#fast-approximations, I'll read this book again. Thanks for your help @LTLA |
Hi, It seems Annoy algorithm in
bluster
cannot accelerate the clustering process. theuncorrected_sce
is aSingleCellExperiment
object with areducedDimNames
slotPCA
which has a dim ([1] 111455 50
).seurat_obj
is converted fromuncorrected_sce
The text was updated successfully, but these errors were encountered: