Using RANN::nn2 function to get the cell-cell distance by a given distance.

findNearCellsByRadius(
  seu,
  maxRadius,
  spatialCoordsNames = c("Cell.X", "Cell.Y")
)

Arguments

seu

An seurat object.

maxRadius

numeric(1L). Maximal Euclidean distance.

spatialCoordsNames

The column names of coordinates

Value

A data.frame of distance pairs with column name as 'cell_1', 'cell_2', 'dist'

Examples

# example code