Nested measurements · Choose a method
iPSC experiments: donors, clones and differentiations, and what counts as n
In patient-versus-control iPSC studies the donor is the unit: average clones and differentiations per donor, or, with more donors, model them as nested random effects. Gene-corrected (isogenic) lines give paired comparisons with more power. Python and R code.
On this page
Quick answer. When you compare iPSC-derived cells from patients and healthy controls, the donor (one person’s genetic background) is the unit of comparison. Clones from the same donor and repeated differentiations are nested replicates: average them per donor, clones first and then donors (with only one donor per group no test of disease is possible, however many clones or differentiations you have) (or, with more than 3 donors per group, fit a mixed model with random effects for donor and clone within donor, using t-based tests), and test donors. With no real disease effect, in our simulated design (3 donors per group, 2 clones per donor, 3 differentiations per clone), treating differentiations as n gave a “significant” difference in 44.3% of studies, clones as n 16.0%, donors as n 3.3%. For patient-versus-control comparisons, add donors rather than clones, and where possible compare each patient donor’s line with its gene-corrected (isogenic) line, analysed as pairs: in our simulation with 6 patient donors (assuming each edited line differs from its partner only at the variant), paired isogenic comparisons detected a 30% reduction in 86.8% of studies, against 39.3% for 6 patient vs 6 control donors.
Terms used below. iPSC: induced pluripotent stem cell, reprogrammed from a donor’s cells. Donor: the person the cells came from; donors differ in genetic background. Clone (line): one iPSC line derived from a donor; several clones can come from one donor. Differentiation: one round of turning iPSCs into the cell type studied (a culture batch). Isogenic line: a line edited (for example with CRISPR) to correct or introduce the variant, so that it differs from its partner line only at that variant. Nested: differentiations belong to one clone, clones to one donor. Mixed model: a regression with random effects for donor and clone within donor (differentiations are then the residual level), so that replicates within a donor are not treated as independent; t-based tests (Satterthwaite, as in R’s lmerTest) suit few donors, whereas z-tests (as in Python’s statsmodels MixedLM) are too liberal. DEG: differentially expressed gene. Too liberal: giving more false positives than the stated 5%. Variance components: the standard deviation at each level (donor, clone, differentiation). Log scale: natural logarithms here; exp() of a difference gives the ratio. Welch’s t-test: compares two groups without assuming equal spreads. Paired t-test: compares two measurements from the same donor. 95% confidence interval (CI): the range of values compatible with the data. Power: the chance of detecting an effect that is really there. False positive: a “significant” result when there is no real effect.
Which analysis for your question
| Question | Analysis | Report |
|---|---|---|
| Do patient donors’ lines differ from control donors’ lines? | One value per donor (mean of clone means), Welch’s t-test on log values; with more than 3 donors per group, a mixed model with donor and clone random effects and t-based tests | Ratio with 95% CI, n donors per group, clones and differentiations per donor |
| Does correcting the variant change the phenotype? | Patient line vs its isogenic corrected line, one log difference per donor (several edited clones averaged), paired t-test across donors | Paired ratio with 95% CI, n donors |
| Does a drug change the phenotype in each line? | Change within each line, averaged per donor, then tested across donors | Change with 95% CI, n donors |
| How variable are clones and differentiations? | Variance components from a mixed model | Standard deviation at each level |
| Only one donor per group | No valid test of disease vs control; report as descriptive, and add donors or isogenic pairs from several donors (one pair is still n = 1) | — |
Germain and Testa found that iPSC “transcriptomic variance is dominated by genetic differences, or at any rate differences between donors’ specimens”, that “using more than one iPSC clone per individual results in a major increase in spurious DEGs”, and that mixed models “treating the individual as a random-effect variable, could harness the availability of additional clones while keeping good control of false positives” (Germain & Testa 2017). Volpato and Webber “recommend increasing the number of cases and controls rather than increasing the number of lines derived from each case or control individual” (Volpato & Webber 2020). The ISSCR Standards state that “independent experiments are needed to assess intra-batch, batch-to-batch and line-to-line variability” and that “if replication is not possible, then variability should be reduced by using isogenic controls” (ISSCR Standards). Soldner and Jaenisch describe genetic background as “a particular impediment to the disease-in-a-dish approach” and isogenic pairs as a way to reduce it (Soldner & Jaenisch 2012).
Worked example: 3 patient and 3 control donors with no real difference
Constructed data: a phenotype (log mean neurite length per differentiation) for 3 patient and 3 control donors, 2 clones per donor and 3 differentiations per clone, 36 values in all. By design patients and controls have the same true average. Donors differ most (a standard deviation of 0.30 on the log scale), clones within a donor less (0.15) and differentiations of a clone least (0.10). The random seed was the first one tried and was not chosen for its result. Stored code and data: ipsc.csv, model.py, make_data.py, analysis.py, analysis.R and the analysis output; analysis.py and analysis.R print the same output.
| Analysis | Patient ÷ control (95% CI) | p |
|---|---|---|
| Differentiations as n (18 vs 18) | 0.88 (0.77 to 1.01) | 0.071 |
| Clones as n (6 vs 6) | 0.88 (0.68 to 1.14) | 0.30 |
| Donors as n (3 vs 3) | 0.88 (0.53 to 1.46) | 0.52 |
In this balanced design the estimate is the same in every row; only the honesty of the interval changes. With differentiations as n, the interval is narrow and nearly excludes 1, because 18 cultures from 3 donors look like 18 independent people. With donors as n, it runs from a 47% decrease to a 46% increase: 3 donors per group say little either way. In 10,000 simulated studies of this design (simulation.py, the simulation output):
| Scenario | Donors per group | Differentiations as n | Clones as n | Donors as n | Isogenic pairs (paired by donor) |
|---|---|---|---|---|---|
| No disease effect | 3 | 44.3% | 16.0% | 3.3% | 4.9% |
| No disease effect | 6 | 42.3% | 15.6% | 4.7% | 5.3% |
| Patient lines 30% lower | 3 | 74.0% | 44.6% | 14.1% (power) | 34.1% (power) |
| Patient lines 30% lower | 6 | 86.7% | 66.5% | 39.3% (power) | 86.8% (power) |
Rows with no disease effect show false positives; rows with a 30% reduction show power. Differentiations and clones as n give false positives far above 5%, so their higher “power” is not real. Donors as n is correct but weak at these sizes, because donors differ so much; isogenic pairs remove the donor-to-donor variation and, with 6 donors, detected the effect as often as the invalid analyses while keeping false positives at 5%. The simulation assumes the edited line differs from its partner only at the variant; editing artefacts or clone selection would add variation, which is why several edited clones per donor are recommended.
The code expects one row per differentiation with columns status (exactly control or patient), donor, clone, differentiation and the measured value on the natural-log scale (here log_neurite, already averaged over the cells or wells of that differentiation); rename your columns and labels to match, and run the code in the folder that holds the CSV file. Python needs NumPy, pandas and SciPy (pip install numpy pandas scipy); the R code uses base R only.
# Condensed: analysis.py also shows the differentiation-level and clone-level comparisons
import numpy as np, pandas as pd
from scipy import stats
d = pd.read_csv("ipsc.csv")
c = d.groupby(["status", "donor", "clone"]).log_neurite.mean().reset_index() # clone means first
m = c.groupby(["status", "donor"]).log_neurite.mean().reset_index() # then one value per donor
p = m.status == "patient"
t = stats.ttest_ind(m.log_neurite[p], m.log_neurite[~p], equal_var=False)
print(np.exp(m.log_neurite[p].mean() - m.log_neurite[~p].mean()), np.exp(t.confidence_interval()), t.pvalue) # 0.88, 0.53 to 1.46, p = 0.52
d <- read.csv("ipsc.csv")
cl <- aggregate(log_neurite ~ status + donor + clone, data = d, FUN = mean) # clone means first
m <- aggregate(log_neurite ~ status + donor, data = cl, FUN = mean) # then one value per donor
tt <- t.test(m$log_neurite[m$status == "patient"], m$log_neurite[m$status == "control"])
exp(c(ratio = mean(m$log_neurite[m$status == "patient"]) - mean(m$log_neurite[m$status == "control"]), tt$conf.int)); tt$p.value # 0.88, 0.53 to 1.46, p = 0.52
# with lme4 and lmerTest (not base R): lmer(log_neurite ~ status + (1 | donor/clone), data = d)
Before you analyse
- Plan donors, not clones or differentiations. For transcriptome-wide comparisons, Volpato and Webber, citing Germain and colleagues, report that “four to six individuals per group provided a reasonable balance of sensitivity and specificity”; for a single 30% difference with donors as variable as here, 6 per group gave only 39.3% power in our simulation, so base the number on your own effect size and variation (how many biological replicates). More clones per donor add little for the group comparison, though they help spot clone-specific outliers.
- Use isogenic pairs where you can, and analyse them as pairs (paired vs unpaired); they answer “does this variant matter in this background?”, while case–control donors answer “do patients differ?”. The ISSCR Standards add that “when comparing isogenic cells derived from genome manipulation, multiple independent clones should be assessed”, because editing can introduce unintended changes; the isogenic analysis is in simulation.py.
- Differentiate patient and control lines side by side, in the same batches, so that differentiation batch is balanced across groups.
- Record every level (donor, clone, differentiation, well) and average from the bottom up, starting with wells or cells within each differentiation; with one clone per donor, donor means are the analysis and clone and differentiation variation cannot be separated, or fit the nested mixed model (nested data).
- Check cell-type composition of each differentiation; Volpato and Webber call it “a primary source of inter- and intra-experimental variation”.
Check what an AI assistant ran
- The assistant used each differentiation, well or cell as n. Ask for one value per donor, or, with more than 3 donors per group, a mixed model with donor and clone random effects and t-based tests.
- The assistant treated two clones of one donor as two patients. Ask for clones averaged per donor.
- The assistant compared an isogenic pair with an unpaired test. Ask for a paired comparison by donor.
- The assistant reported a p-value with one donor per group. Ask it to report the result as descriptive.
Report it
Neurite length was measured in [3] patient and [3] control donors, [2] iPSC clones per donor and [3] independent differentiations per clone. Values were log-transformed and averaged per donor; patient and control donors were compared with Welch’s t-test (donor as the unit; R [4.3.3]).
Patient lines did not differ clearly from control lines (patient ÷ control [0.88], 95% CI [0.53] to [1.46]; p = [0.52], n = [3] donors per group).
Replace the bracketed values with your own.
References
- Germain PL, Testa G (2017). Taming human genetic variability: transcriptomic meta-analysis guides the experimental design and interpretation of iPSC-based disease modeling. Stem Cell Reports 8:1784–1796. doi:10.1016/j.stemcr.2017.05.012
- Volpato V, Webber C (2020). Addressing variability in iPSC-derived models of human disease: guidelines to promote reproducibility. Disease Models & Mechanisms 13:dmm042317. doi:10.1242/dmm.042317
- International Society for Stem Cell Research. Standards for human stem cell use in research: stem cell-based model systems (2023; checked 12 November 2026). isscr.org
- Soldner F, Jaenisch R (2012). iPSC disease modeling. Science 338:1155–1156. doi:10.1126/science.1227682
How this page was made
- Written and published by Licklider. Recommendations cite peer-reviewed methods papers and the ISSCR Standards listed under References; cited passages were checked against the source text.
- The worked example uses constructed data. Its numbers were produced by stored code (Python 3.13 with SciPy 1.18.1; R 4.3.3, base R), and the two languages print identical output; the simulation was run in Python.
- Separate review passes checked the statistics, the citations and readability before publication.