Skip to main content

Module cell_pairs

Module cell_pairs 

Source
Expand description

Cell-cell interaction counts: a graph over cells paired with the counts those cells came from.

CellPairs borrows a SparseIoVec and owns the KnnGraph whose edges are the interacting pairs. Nothing here knows about spatial coordinates — a graph built from tissue positions and one built from an expression embedding are the same object at this level. Front-ends that do carry geometry wrap this and add it themselves (e.g. pinto’s SrtCellPairs).

Originally lived in pinto/src/util/cell_pairs.rs; moved here so senna / faba / chickpea can share one cell-pair representation instead of each growing an inline edge list.

Structs§

CellPairs
Interacting cell pairs paired with the counts their endpoints index into.
PairSet
A set of interacting pairs over some node indexing, plus optional per-pair weights.

Functions§

collapse_pairs
Collapse pairs by node label: every pair whose endpoints carry the same unordered label pair becomes one coarse pair.