Description Usage Arguments Value

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ```
MappingScore(anchors, ...)
## Default S3 method:
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 class '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,
...
)
``` |

`anchors` |
AnchorSet object or just anchor matrix from the Anchorset object returned from FindTransferAnchors |

`...` |
Reserved for internal use |

`combined.object` |
Combined object (ref + query) from the Anchorset object returned |

`query.neighbors` |
Neighbors object computed on query cells |

`ref.embeddings` |
Reference embeddings matrix |

`query.embeddings` |
Query embeddings matrix |

`kanchors` |
Number of anchors to use in projection steps when computing weights |

`ndim` |
Number of dimensions to use when working with low dimensional projections of the data |

`ksmooth` |
Number of cells to average over when computing transition probabilities |

`ksnn` |
Number of cells to average over when determining the kernel bandwidth from the SNN graph |

`snn.prune` |
Amount of pruning to apply to edges in SNN graph |

`subtract.first.nn` |
Option to the scoring function when computing distances to subtract the distance to the first nearest neighbor |

`nn.method` |
Nearest neighbor method to use (annoy or RANN) |

`n.trees` |
More trees gives higher precision when using annoy approximate nearest neighbor search |

`query.weights` |
Query weights matrix for reuse |

`verbose` |
Display messages/progress |

Returns a vector of cell scores

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.