Can I pre-set the number of clusters with scater? I'm comparing scRNAseq analysis tools, and the same dataset clustered into 8 by Seurat is clustered into 20 by scater. For my purpose, I'd prefer to have fewer clusters than 20 and I can't figure out how to do it with scater. Thanks!
scater doesn't have any clustering functions, as far as I remember. Perhaps you're referring to scran's
buildSNNGraph? There are a bunch of parameters that you can fiddle with, but the most direct approach is to increase
k. This follows the opposite reasoning described in the comments section of the workflow.
You can also try a variety of different clustering algorithms from igraph. Based on my theoretical understanding, the closest reproduction of Seurat's clustering algorithm would be to set
buildSNNGraph and then use
igraph::cluster_louvain. I don't know how similar this actually is, though, so YMMV.