A wrapper function that builds a Neighbor object from a single reduction (e.g. the PLS embedding), mapping every cell to its nearest landmark cells.
Usage
FindsmNN(
object,
sketch.assay = NULL,
reduction,
dims = NULL,
k.nn = 20,
l2.norm = TRUE,
nn.name = "single.nn",
verbose = TRUE,
...
)Arguments
- object
A Seurat object
- sketch.assay
The name of the sketched assay of the landmark cells.
- reduction
The name of a single dimensional reduction to use (e.g.
"proj.pls").- dims
The dimensions of the reduction to use. If
NULL(default), all dimensions are used.- k.nn
The number of nearest neighbors to compute for each cell. Honored as given (unlike
FindmmNN, which clamps to a minimum of 20).- l2.norm
Perform L2 normalization on the cell embeddings
- nn.name
Name under which the resulting Neighbor object is stored.
- verbose
Print progress bars and output
- ...
Arguments passed to
Seurat::FindNeighbors
Value
return a Seurat object that contains a Neighbor object between the landmark cells and all the other cells.
Details
This is the single-modality counterpart of FindmmNN: instead of
combining several reductions with WNN weights, it runs a single
Seurat::FindNeighbors call on one reduction, with the landmark (sketched)
cells as the reference and all cells as the query. The resulting Neighbor object
is a drop-in replacement for the weighted.nn produced by FindmmNN
and is consumed by GenerateSampleObject in the same way.