Commit 667b5255 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Reduce n.neighbors for umap calc base on cell #

parent 72d56204
......@@ -602,7 +602,13 @@ scCluster <- function(sc10x,res=0.1,red="pca",dim,print="umap",folder=FALSE,assa
#Calculste Vis
#sc10x <- RunTSNE(sc10x,dims=1:dim,reduction="pca",assay=assay)
sc10x <- RunUMAP(sc10x,dims=1:dim,reduction="pca",assay=assay)
if (ncol(sc10x) > 30) {
n.neighbors <- 30
} else if (ncol(sc10x.temp) <= 30) {
n.neighbors <- ncol(sc10x)-1
}
sc10x <- RunUMAP(sc10x,dims=1:dim,reduction="pca",assay=assay,n.neighbors=n.neighbors)
sc10x <- FindNeighbors(sc10x,reduction=red,verbose=FALSE,assay=assay)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment