Spatial statistics between groups

Are two cell types more often neighbors in one group than another? SituCraft answers with each sample's own number as one observation, by a model of the design, and gives the effect with its interval.

Each sample's numbers

The same steps on every sample answer the same spatial questions of each (see Sample summaries), and the cohort table holds each sample's numbers. Spatial statistics between groups in the Cohort view compares three families of them:

Niches' shares are counts of cells, compared in Differential abundance by models of counts. A design row's value is the mean of its samples' (on the log2 scale for a ratio). A statistic that some row has none of, such as a pair's enrichment where a sample has none of one label, is left untested, and the reason is said.

The model

Each statistic is a linear model of the design, with its pairing and covariates, fitted by least squares. A family's statistics are fitted together: each one's variance is moderated toward the family's common one, by as much as their variances agree, and each contrast is tested by the moderated t (Smyth 2004), as limma tests genes. A family of one statistic is tested by its own variance alone. P-values are adjusted by Benjamini and Hochberg over each family's tests, and the universe is stated with them.

Reading the results

Choose a family: the table lists its statistics by p-value, each effect with its interval (95% by default), its p-value and adjusted p. Choosing a row plots each row's value by group, with each group's mean. The results (CSV) writes every test.

The Cohort view's comparison of the simulated cohort's neighbor enrichment between conditions: the ten pairs of labels with their ratios, the epithelial-like and immune-like pair chosen first, and its subjects' enrichments by condition, higher in the treatedThe Cohort view's comparison of the simulated cohort's neighbor enrichment between conditions: the ten pairs of labels with their ratios, the epithelial-like and immune-like pair chosen first, and its subjects' enrichments by condition, higher in the treated
The simulated cohort's subjects compared by condition: the epithelial-like and immune-like cells are neighbors 1.35 times as much in the treated subjects (1.07 to 1.70), where the simulator mixes immune-like cells into epithelial-like domains.

With four subjects a group, that change is the family's strongest, and its interval is above 1. Adjusted over the ten pairs, it is not below 0.05 (0.084): a larger cohort, or pairing, would say more.

By remote control

compare_spatial compares the samples' spatial statistics (every family the summary has, or those named; by the design draft or a saved design) and answers every test. See Remote control.

How it is checked