This function will take a query dataset and project it into the coordinates of a provided reference UMAP. This is essentially a wrapper around two steps:
FindNeighbors - Find the nearest reference cell neighbors and their distances for each query cell.
RunUMAP - Perform umap projection by providing the neighbor set calculated above and the umap model previously computed 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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ProjectUMAP(query, ...)
## Default S3 method:
ProjectUMAP(
query,
query.dims = NULL,
reference,
reference.dims = NULL,
k.param = 30,
nn.method = "annoy",
n.trees = 50,
annoy.metric = "cosine",
l2.norm = FALSE,
cache.index = TRUE,
index = NULL,
neighbor.name = "query_ref.nn",
reduction.model,
...
)
## S3 method for class 'DimReduc'
ProjectUMAP(
query,
query.dims = NULL,
reference,
reference.dims = NULL,
k.param = 30,
nn.method = "annoy",
n.trees = 50,
annoy.metric = "cosine",
l2.norm = FALSE,
cache.index = TRUE,
index = NULL,
neighbor.name = "query_ref.nn",
reduction.model,
...
)
## S3 method for class 'Seurat'
ProjectUMAP(
query,
query.reduction,
query.dims = NULL,
reference,
reference.reduction,
reference.dims = NULL,
k.param = 30,
nn.method = "annoy",
n.trees = 50,
annoy.metric = "cosine",
l2.norm = FALSE,
cache.index = TRUE,
index = NULL,
neighbor.name = "query_ref.nn",
reduction.model,
reduction.name = "ref.umap",
reduction.key = "refUMAP_",
...
)
|
query |
Query dataset |
... |
Additional parameters to |
query.dims |
Dimensions (columns) to use from query |
reference |
Reference dataset |
reference.dims |
Dimensions (columns) to use from reference |
k.param |
Defines k for the k-nearest neighbor algorithm |
nn.method |
Method for nearest neighbor finding. Options include: rann, annoy |
n.trees |
More trees gives higher precision when using annoy approximate nearest neighbor search |
annoy.metric |
Distance metric for annoy. Options include: euclidean, cosine, manhattan, and hamming |
l2.norm |
Take L2Norm of the data |
cache.index |
Include cached index in returned Neighbor object (only relevant if return.neighbor = TRUE) |
index |
Precomputed index. Useful if querying new data against existing index to avoid recomputing. |
neighbor.name |
Name to store neighbor information in the query |
reduction.model |
|
query.reduction |
Name of reduction to use from the query for neighbor finding |
reference.reduction |
Name of reduction to use from the reference for neighbor finding |
reduction.name |
Name of projected UMAP to store in the query |
reduction.key |
Value for the projected UMAP key |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.