grassp.pp.neighbors#
- neighbors(data, layer=None, copy=False, **kwargs)[source]#
Compute the nearest neighbors distance matrix using scanpy.pp.neighbors.
This function is a wrapper around
scanpy.pp.neighbors()scanpy.pp.neighborsadding support for using different layers.- Parameters:
- data
The annotated data matrix with proteins as observations (rows).
- layer default:
None Layer to use for nearest neighbors calculation.
- copy
bool(default:False) Return a copy with the neighbors graph instead of writing it to
data.- **kwargs
Additional arguments to pass to scanpy.pp.neighbors.
- Return type:
- Returns:
A copy of
datawith the neighbors graph ifcopy=True, elseNone.