View source: R/get_neighborhood_preservation_scores.R
get_neighs_all_stat | R Documentation |
Calculates intermediate stats relevant for cell neighborhoud preservation score that can be recycled for different selection.
get_neighs_all_stat(
sce,
genes.all = rownames(sce),
batch = NULL,
n.neigh = 5,
nPC.all = 50,
option = "exact",
...
)
sce |
SingleCellExperiment object containing gene counts matrix. |
genes.all |
String specifying genes to be used for construction of True kNN-graph. |
batch |
Name of the field in colData(sce) to specify batch. Default batch=NULL if no batch is applied. |
n.neigh |
Positive integer > 1, specifying number of neighbors to use for kNN-graph. Default n.neigh=5. |
nPC.all |
Scalar specifying number of PCs to use for construction of True kNN-graph. Default nPC.all=50. |
option |
String specifying how average distance for each cell should be calculated. If = 'exact', all other cells are taken into account. If = 'approx', the random subset of 10000 cells will be used. 'exact' is default and 'approx' is recommended for big datasets. |
... |
Additional arguments. |
List containing fields 'counts' - PC coordinates for cells in True graph; 'neighs.all' - kNN-graph with assigned neighbors in True graph; 'mean_dist' - vector (for each cell) containing mean distance to other cells.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.