Score cells based on their proximity to simulated doublets using k-nearest neighbors algorithms
score_doublets.RdFor each real cell, compute the fraction of its k-nearest neighbors in a combined (cells + simulated doublets) embedding that are simulated doublets, then normalise to an enrichment score relative to the expected fraction
Arguments
- project_res
(list) Named list containing reduced dimension projection results returned by
project_doublets.- scoring_method
(character) The name of the dimensionality reduction method to use for k-nearest neighbors calculation and scoring. Possible values are "UMAP" or "LSI". Default and recommended is "UMAP".
- knn_method
(function) KNN method. Default
knn_hnsw(k = 10L, metric = "euclidean", ef = 200L). Put KNN-specific arguments such askormetricinside the partial function.- verbose
(logical) Print progress messages. Default
getOption("MarchR.verbose", FALSE).