View source: R/merge_cluster.R
merge_cluster | R Documentation |
merge cluster into adjacent cluster if the merged cluster single cell number less than the cutoff.
merge_cluster(dat, cutoff=5)
dat |
single cell coordinates from umap or tSNE or ... |
cutoff |
cutoff for the cell number |
A list of indices of data and a list of names of data.
rm(list=ls());
library(scCorr);
## simulate data
set.seed(1234);
## length of list
list.l <- 50;
out.s <- NULL;
for (i in 1:list.l){
n <- sample(1:50, 1);
out.s[[i]] <- sample(1:100, n);
}
## check length
lengths(out.s);
out <- merge_cluster(out.s, cutoff=10)
## check output list lengths
lengths(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.