View source: R/confidenceScores.R
calcPerClusterMappingMetric | R Documentation |
Per-cluster Confidence Score: Calculates the Mahalanobis distance from user-defined query clusters to their nearest reference centroid after initial projection into reference PCA space. All query cells in a cluster get the same score. Higher distance indicates less confidence. Due to the instability of estimating covariance with small numbers of cells, we do not assign a score to clusters smaller than u * d, where d is the dimensionality of the embedding and u is specified.
calcPerClusterMappingMetric( reference, query, query_cluster_labels, metric = "mahalanobis", u = 2, lambda = 0 )
reference |
Reference object as returned by Symphony buildReference() |
query |
Query object as returned by Symphony mapQuery() |
query_cluster_labels |
Vector of user-defined labels denoting clusters / putative novel cell type to calculate the score for |
metric |
Uses Mahalanobis by default, but added as a parameter for potential future use |
u |
Do not assign scores to clusters smaller than u * d (see above description) |
lambda |
Optional ridge parameter added to covariance diagonal to help stabilize numeric estimates |
A data.frame of per-cluster mapping metric scores for each user-specified query cluster.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.