Calculate number of nearest neighbours between batches out of a knn graph
Usage
GetNeighborsPerBatch(
object,
batch.var,
graph.name = "RNA_nn",
count.self = TRUE
)
# S4 method for class 'Seurat,character'
GetNeighborsPerBatch(
object,
batch.var,
graph.name = "RNA_nn",
count.self = TRUE
)Arguments
- object
a
Seuratobject- batch.var
name of a column in the
Seuratobject's metadata containing batch information- graph.name
name of a
GraphorNeighborinstance stored inobject. When available, prefer the distance based network to the connectivities graph (especially when computed with the UMAP method).- count.self
whether to include self-to-self vertices in the calculation
