This metric was designed to help identify query cells that aren't well represented in the reference dataset. The intuition for the score is that we are going to project the query cells into a reference-defined space and then project them back onto the query. By comparing the neighborhoods before and after projection, we identify cells who's local neighborhoods are the most affected by this transformation. This could be because there is a population of query cells that aren't present in the reference or the state of the cells in the query is significantly different from the equivalent cell type in the reference.
MappingScore(anchors, ...)
# S3 method for default
MappingScore(
anchors,
combined.object,
query.neighbors,
ref.embeddings,
query.embeddings,
kanchors = 50,
ndim = 50,
ksmooth = 100,
ksnn = 20,
snn.prune = 0,
subtract.first.nn = TRUE,
nn.method = "annoy",
n.trees = 50,
query.weights = NULL,
verbose = TRUE,
...
)
# S3 method for AnchorSet
MappingScore(
anchors,
kanchors = 50,
ndim = 50,
ksmooth = 100,
ksnn = 20,
snn.prune = 0,
subtract.first.nn = TRUE,
nn.method = "annoy",
n.trees = 50,
query.weights = NULL,
verbose = TRUE,
...
)
AnchorSet object or just anchor matrix from the Anchorset object returned from FindTransferAnchors
Reserved for internal use
Combined object (ref + query) from the Anchorset object returned
Neighbors object computed on query cells
Reference embeddings matrix
Query embeddings matrix
Number of anchors to use in projection steps when computing weights
Number of dimensions to use when working with low dimensional projections of the data
Number of cells to average over when computing transition probabilities
Number of cells to average over when determining the kernel bandwidth from the SNN graph
Amount of pruning to apply to edges in SNN graph
Option to the scoring function when computing distances to subtract the distance to the first nearest neighbor
Nearest neighbor method to use (annoy or RANN)
More trees gives higher precision when using annoy approximate nearest neighbor search
Query weights matrix for reuse
Display messages/progress
Returns a vector of cell scores