Estimate KNN density on 2d embedding.
EstimateKnnDensity(emb.mat, k = 10, n.bins = 50, n.mesh = 2, do.plot = TRUE)
a embedding matrix, rows are cells, columns are dimensions.
Number of neighbors. Default: 10
number of bins for density resampling. Default: 50
in each bin, density will be calculated around (n.mesh^2) points. Default: 3
whether plot results. Default: TRUE.
a GridDensity object