Ligand-receptor signaling¶
Ligand-Receptor scores, for every cell and every ligand-receptor pair, how strongly that cell is receiving the signal from the cells around it, and tests where the score is higher than a spatial null would give. It answers "where in the tissue is this interaction active?" at cellular resolution, rather than "which cell types could talk?".
Where to find it
Analyze → Spatial → Ligand-Receptor → Open Ligand-Receptor tool…
How it works¶
Skopia's implementation is a NumPy/SciPy port of the core score and permutation statistics of CytoSignal (Liu et al. 2026). CytoSignal's velocity and dynamics analyses are not included.
Each pair in the database is tagged by how the ligand acts:
- Diffusion (secreted ligands): the ligand around a cell is imputed over a Gaussian neighborhood of radius Diffusion radius, with bandwidth
radius / 3.717so the kernel falls to 0.001 at the radius. - Contact (membrane ligands): the ligand is imputed over the cell's direct Delaunay neighbors only, ignoring edges longer than the radius.
For each cell and pair:
- The imputed ligand counts and the cell's own receptor counts are library-size normalized (to 10,000) and
log1p-transformed, then each is averaged over the cell's Delaunay neighbors. - The score is the sum over ligand subunits times the sum over receptor subunits, so multi-subunit complexes count all their genes.
- The score field is smoothed over the Gaussian neighborhood, which strengthens contiguous signaling and damps isolated spikes.
Significance. The null shuffles which cells supply ligand to each neighborhood while every cell keeps its own receptor, then recomputes and smooths the score the same way. All permuted scores for a pair are pooled into one null distribution. Each cell gets an empirical p-value against it, Benjamini-Hochberg adjusted across cells for that pair (Benjamini and Hochberg 1995). A cell is significant when its adjusted p-value is below p-value threshold and its score is above 0.
Interactions are ranked by the number of significant cells, then by mean score. The tool builds its own Gaussian and Delaunay graphs every run; it does not use the Spatial Neighbors graph.
The database¶
Skopia ships lr_pairs.csv with 2,508 pairs (2,204 diffusion, 304 contact) distilled from CellPhoneDB v5 (Troulé et al. 2025), keeping multi-subunit complexes and the diffusion/contact split.
The table uses human (uppercase) symbols. Skopia matches them to your gene names without regard to case, so PDGFB finds Pdgfb in mouse data, as CytoSignal does. Written columns use your dataset's own gene names.
Mouse data: case matching is not orthology
Case-insensitive matching works only where the mouse symbol is the human symbol in a different case. A mouse gene whose symbol differs from its human ortholog's, or a one-to-many ortholog, is silently not matched, and pairs that need it are not tested. A proper mouse-to-human ortholog table is planned.
A pair is tested only when every ligand and receptor subunit is present and detected in at least Min cells / gene cells (and, if set, inside Gene subset).
Run it¶
- Open Analyze → Spatial → Ligand-Receptor → Open Ligand-Receptor tool…. Radius, permutations and minimum cells are prefilled from the data.
- Adjust parameters if needed (hover each label for its tip).
- Click Score interactions. A progress bar shows permutations, percentage and time left.
- Review the ranked table: Interaction (ligand → receptor), Type, Sig cells and Mean score. Interactions with no significant cells are dimmed.
- Tick the interactions to inspect, optionally tick Also write a significant/ns column for each selected interaction, and click Visualize. Cells are colored by the first selected score.
Reopening the tool shows the stored ranking, so you can visualize other interactions without recomputing. ← Change parameters returns to the form to run again.
Parameters¶
| Parameter | Default | What it does |
|---|---|---|
| Signaling type | Both | Test diffusion pairs, contact pairs, or both. |
| Diffusion radius | 3 × the median nearest-neighbor distance | Reach of secreted ligands in coordinate units; also caps contact edges and sets the score smoothing. Lower it for short-range signaling. |
| Permutations | about 100,000 / number of cells, clamped to 20 to 200 | Shuffles for the null. Because the null pools every cell's permuted scores, the total number of null draws is what sets p-value resolution. |
| Min cells / gene | 0.5% of cells, at least 3 | Drop pairs whose genes are detected in fewer cells. |
| p-value threshold | 0.05 | BH-adjusted cutoff for calling a cell significant. |
| Max interactions | 400 | Cap on pairs scored. Above it, the pairs whose genes are detected in the most cells are kept, and the result says how many were dropped. |
| Section column | none | Keep neighborhoods and the permutation null inside each section. |
| Gene subset | All genes | Restrict eligible genes to a boolean .var column such as highly_variable or spatially_variable. Off by default, because ligand and receptor genes need not be variable to signal. |
| Smooth receptor over neighbors | off | Average receptor counts over direct neighbors before normalizing. For sparse or noisy data. |
p-value threshold, Max interactions, Signaling type, Smooth receptor over neighbors and the significance-column checkbox defaults can be set in config.yaml under ligrec: (see Configure defaults).
What it writes¶
| Where | What |
|---|---|
obsm['lrscore'] |
Cells × tested interactions, the smoothed score. |
obsm['lrscore_significant'] |
Cells × tested interactions, 1 where significant. |
uns['lrscore'] |
Interaction ids, their resolved ligand and receptor genes and types, the ranked summary, the parameters and how many pairs the cap dropped. |
obs['LR_<ligand>_to_<receptor>'] |
Written by Visualize: one interaction's score. Multi-subunit genes are joined with _. |
obs['LR_<ligand>_to_<receptor>_sig'] |
With the significance option: significant or ns. |
A new run replaces obsm['lrscore'], obsm['lrscore_significant'] and uns['lrscore'].
Tips and pitfalls¶
.X should hold raw counts
The score reads .X and normalizes it itself (library size to 10,000, then log1p). If .X is already log-normalized, the tool normalizes it a second time and the scores lose their meaning. There is no layer picker; put counts in .X first.
Try the bundled test dataset
toy_spatial_ligrec.h5ad is a 1,600-cell jittered grid with three planted signaling sources: PDGFB → PDGFRA and ADCYAP1 → ADCYAP1R1 (diffusion) and DLL1 → NOTCH1 (contact), each with its receptor expressed broadly, so signaling should appear as a ring around each source. EFNA1 → EPHA2 is a negative control: the ligand is weak and everywhere, so no localized signaling should be found.
Predicted coordinates
On a dataset localized onto a spatial reference, the neighborhoods are built from predicted positions and inherit their error. Check the map under Localize's Map quality before reading a score as signaling.
Several sections
Without a section column, Gaussian neighborhoods can reach across the gap between two sections and the null mixes them.