Cell-type contact network
Which cell types touch which, from a Delaunay triangulation of the cells, as a network and a matrix corrected for abundance.
In PointillViz: Tools → Store → Install, or Install from file with the download. How to install and run a tool
- This tool writes to the filesystem.
This runs as you: a tool is arbitrary code, with your privileges. Safety note

Readme
Which cell types touch which, and which of those contacts are more common, or rarer, than the types’ abundance predicts?
The tool runs a Delaunay triangulation on each section’s cells, in 2D or 3D, and counts every edge as one contact between two neighbouring cells. Tallying each cell’s neighbours by type gives a count matrix , whose rows are then normalised:
is the fraction of type ‘s contacts that are with type . It is not symmetric, because i → j and j → i are divided by different totals. The enrichment corrects for abundance, where is the fraction of all cells that are type :
> 0 means touches more than ‘s abundance predicts, and < 0 less. With several sections, is computed per section and each row is averaged across them, weighted by how many cells of type each has.
Network. One node per cell type, its area growing with its number of cells. Its place comes from a layout of the whole dataset, so nodes stay put between sections. An arrow i → j appears where reaches the cutoff, with its width growing as √ and its colour showing , from blue (depleted) to red (enriched). The ring around a node is its self-contact: the further the ring stands from the node, the larger .
Matrix. The same and with no cutoff. Colour shows , the numbers are in percent, and grey means no contact. Types with similar contacts sit together.
Table and downloads. Every contact between the types shown, the two figures as SVG, and the numbers for all types as CSV.
Delaunay edges are geometric neighbours, not measured contact, and has no p-value, so read it together with the contact count in the table. Cells across a gap are joined unless Longest contact is set.
Parameters
| Parameter | Default | What it does |
|---|---|---|
Cell-type column field |
optionala categorical column | Selects the annotation whose groups are the network’s nodes. Cell types, unless the dataset has none or you choose another column. |
Longest contact (microns) max_distance |
Default: 0Range 0 to 500. | Drops contacts longer than this, so that cells across a gap do not count as touching. 0 keeps every contact. In the dataset’s own coordinates when it records no physical size. |
Arrow cutoff (%) cutoff |
Default: 4Range 0.5 to 50. | Draws an arrow from one type to another only when at least this share of the first type’s contacts are with the second. The matrix has no cutoff. |
Cell types shown max_types |
Default: 30Range 5 to 60. | Shows only this many of the most abundant types, in the network and in the matrix. The others still count in every share, and the download holds them all. |
Outputs
summaryWrites a summaryimagesReturns figurestableReturns a tablefilesReturns files to download
More tools
-

Cell-Type Co-occurrence
Which cell types are found near each other more often than expected by chance.
-

Neighborhood Composition & Mixing
How mixed each cell’s neighbourhood is, and who sits next to whom.
-

Ridge Map
How a gene, or the density of cells, rises and falls across a section, drawn as a relief of ridges.
-

Smoothie
Which genes share a spatial pattern across the tissue, grouped into modules.