Statistical Power Analysis for Transcriptomics Experiments
Bulk, Single-Cell, and Spatial RNA-seq
UF Health Cancer Center BCB-SR Bioinformatics Unit
2025-10-10
Overview
Paper: Statistical Power Analysis for Designing Bulk, Single-Cell, and Spatial Transcriptomics Experiments
Authors: Jeon et al., 2023, Biomolecules
Today’s Agenda:
- Power analysis fundamentals
- Bulk RNA-seq: Considerations & demo
- Single-cell RNA-seq: Considerations & demos
- Spatial transcriptomics: Considerations & challenges
- Discussion questions
Poll: Have You Done Power Analysis for Transcriptomics?
Un-mute for 1, 2, or 3!
- I always do power analysis for my transcriptomics experiments
- I have done it or heard about it at some point
- I have not done or come across power analysis for transcriptomics
The Expensive Problem
Too Few Samples:
- Waste time and money
- Miss real biology
- Underpowered studies
Too Many Samples:
- Waste money
- Waste precious samples
How do we know the right number?
What is Statistical Power?
Statistical Power = Probability of detecting a true effect when it exists
\[\text{Power} = P(\text{reject } H_0 | H_0 \text{ is false})\]
Or simply: Your chance of finding real biology
What is Power Analysis?
Power Analysis = Systematic examination of the relationship between power and experimental design parameters
Key parameters that affect power:
- Sample size (biological replicates)
- Effect size (how big is the change?)
- Sequencing depth
- Significance threshold (α, FDR)
- Biological variability
Power Analysis Goals
Prospective (before experiment):
- Determine optimal experimental design
- Balance cost vs. statistical power
- Avoid under- or over-sampling
Retrospective (after experiment):
- Evaluate achieved power
- Interpret negative results
- Plan follow-up studies
Power in Transcriptomics: A Key Difference
Classical power analysis:
- One outcome → One hypothesis test
- Power = Probability of rejecting H₀ when H₀ is false
- Example: “80% probability of detecting the treatment effect”
Transcriptomics power analysis:
- Thousands of genes → Thousands of tests simultaneously
- Each gene has its own power (based on expression, variability, effect size)
- Reported power = Average power across all genes
Why This Matters Practically
When a tool reports “80% power”:
Genes you’ll likely detect (>90% power):
- Highly expressed genes with large fold-changes
Genes you’ll likely miss (<50% power):
- Lowly expressed genes with small fold-changes
Genes in the middle (50-80% power):
- This is where your sample size decision matters most
Many tools report stratified power by expression level
Key Concepts: The Glossary
| Statistical Power |
Your chance of finding real DEGs |
| Effect Size |
How big is the fold-change? |
| FDR |
Of your hits, how many are false? |
| Sequencing Depth |
Reads per sample |
| Biological Replicates |
Different individuals (CRITICAL) |
Key takeaway: More biological replicates > deeper sequencing
The Three Technologies
Each technology has different:
- Data characteristics
- Research questions
- Cost structures
- Power considerations
Let’s examine each in detail…
Bulk RNA-seq: Technology Overview
Technology: Next-generation sequencing of RNA from cell populations
Data characteristics:
- Gene expression measured as read counts
- Highly reproducible (technical replicates unnecessary)
- Follows negative binomial distribution
Primary research objective:
- Detect differentially expressed genes (DEGs) between conditions
Bulk RNA-seq: Power Considerations
Key experimental factors affecting power:
- Number of biological replicates (most influential)
- Sequencing depth (affects technical precision)
- Gene-specific parameters: mean expression and dispersion
- Effect size distribution (expected fold-changes)
- Target FDR level (typically 0.05 or 0.10)
Critical findings:
- Biological replicates > sequencing depth for power
- Gene-specific parameters from pilot data improve accuracy
- Rule of thumb: 6-8 biological replicates
| ssizeRNA |
Analytical |
Fast, FDR control, accurate |
| RnaSeqSampleSize |
Analytical |
Conservative, may overestimate |
| PROPER |
Simulation |
Flexible but slower |
| RNASeqPower |
Analytical |
Single gene focus |
Recommended: ssizeRNA
Demo: ssizeRNA for Bulk RNA-seq
Scenario: 10,000 genes, expecting 20% differentially expressed
Parameters:
- Total genes = 10,000
- Proportion non-DE = 0.8
- Average read count = 10
- Dispersion = 0.1
- Fold change = 2
- Target FDR = 0.05
- Desired power = 0.8
size1 <- ssizeRNA_single(
nGenes = 10000,
pi0 = 0.8,
m = 200,
mu = 10,
disp = 0.1,
fc = 2,
fdr = 0.05,
power = 0.8,
maxN = 20
)
Demo: ssizeRNA Results
![]()
Result: “Power = 0.80” means:
- Expected proportion (assumption): 80% of the 2,000 true DEGs
- Expected number detected: ~1,600 genes (400 false negatives)
- Average detection rate: Weighted average across all DE genes
Result: Need n=14 samples per group
- Of 2,000 true DEGs, expect to detect approximately 1,600
- 400 false negatives expected
- Weighted average across all gene characteristics
ssizeRNA: Three Scenarios
| Input |
One mean, dispersion, FC |
Gene-specific mean/dispersion + single FC |
Gene-specific mean/dispersion + FC distribution |
| Best for |
Minimal pilot data |
Pilot data, similar effects |
Good pilot data, variable effects |
| Trade-off |
Very conservative |
More realistic, still conservative |
Most realistic and accurate |
Bulk RNA-seq: Key Takeaways
- Biological replicates matter most
- Use pilot data for gene-specific parameters
- ssizeRNA is recommended tool
- Expect heterogeneity in power across genes
- Plan conservatively
Single-Cell RNA-seq: Technology Overview
Technology: Individual cell-level RNA sequencing
Data characteristics:
- Cell-level gene expression resolution
- High proportion of zeros (sparsity)
- Hierarchical structure (cells within individuals)
- Greater variability than bulk RNA-seq
Three main research objectives:
- Cell subpopulation detection
- Differential cell abundance
- Differential gene expression
Single-Cell RNA-seq: Power Considerations (1/3)
Three Main Research Objectives:
- Cell subpopulation detection
- Differential cell abundance
- Differential expression
Added complexity relative to bulk RNA-seq
Single-Cell RNA-seq: Power Considerations (2/3)
Added Complexity:
- Dual sample size problem (cells AND individuals)
- Greater proportion of zeros and variability
- Hierarchical structure (cells nested in individuals)
- Zero-inflation requires specialized models
Single-Cell RNA-seq: Power Considerations (3/3)
Key Experimental Factors:
- Cell subpopulation proportions
- Number of cells per sample
- Number of biological replicates
- Sequencing depth
- Batch effects
- Experimental design
Key finding: More replicates > more cells per sample
The Pseudoreplication Problem
Wrong: Treat all cells as independent samples
Right: Account for individual-level variation
Takeaway: Need biological replicates (individuals), not just technical replicates (cells)
Cell subpopulation detection: SCOPIT, howmanycells
Differential cell abundance: scPOST, Sensei
Differential expression (multi-sample): scPower, hierarchicell
Differential expression (single-sample): POWSC, powsimR
Demo: scPOST for Differential Cell Abundance (1/2)
Research Question: Can I detect expansion of HLA-DRA+ fibroblasts in disease vs. healthy?
Required Inputs:
- Cell state annotations (from clustering)
- Sample annotations (individual IDs)
- Batch annotations
- Principal components from PCA
Demo: scPOST for Differential Cell Abundance (1/2)
Core Functions:
# Step 1: Estimate cell state frequency variation
freqEstimates <- estimateFreqVar(
meta = data$meta,
clusCol = 'celltype',
sampleCol = 'sample'
)
# Step 2: Estimate gene expression variation
pcEstimates <- estimatePCVar(
pca = data$pca,
npcs = 20,
meta = data$meta,
clusCol = 'celltype',
sampleCol = 'sample',
batchCol = 'batch'
)
Demo: scPOST for Differential Cell Abundance (2/2)
Simulate and Test:
# Step 3: Simulate datasets and perform association testing
simDataset.withMASC(
ncases = 17, nctrls = 3, # Study design
ncells = 250, # Cells per sample
centroids = pcEstimates$centroids,
batch_vars = pcEstimates$batch_vars,
sample_vars = pcEstimates$sample_vars,
meanFreqs = freqEstimates$meanFreq,
fc = 5 # Fold-change to induce
)
# Step 4: Calculate power
getPowerFromRes(resFiles, resTables, threshold = 0.05)
Demo: scPOST Example Results (5-fold expansion, 500 simulations):
| Unbalanced |
17 |
3 |
12% |
| Balanced |
10 |
10 |
60% |
Key finding: Balanced designs dramatically increase power
Demo 2: Differential Expression in scRNA-seq
Question: Can I detect DEGs between conditions within a cell type?
Scenario:
- Cell type: T cells
- Expected fold-change: 2
- Cells per sample: 500
- How many biological replicates?
Tool: scPower
Demo 2: Differential Expression in scRNA-seq with scPower
demo
scRNA-seq: Key Takeaways
- Shallow sequencing of many cells > deep sequencing of few cells
- Optimal read depth is surprisingly low (~10k reads/cell)
- Sample size depends on effect size (large n for small effects)
- Biological replicates essential for valid inference
- Different applications need different designs (DE vs annotation vs co-expression)
- Use well-matched priors when planning studies
Spatial Transcriptomics: Technology Overview
Two main types:
Imaging-based: Single-cell resolution, limited genes
Sequencing-based: Spot-level resolution, genome-wide
Key addition: Spatial coordinates preserved
Spatial Transcriptomics: Research Questions
Three main goals:
- Spatially variable genes
- Tissue architecture
- Cell-cell communication
Spatial Transcriptomics: Power Considerations
Key experimental factors:
- Number of fields of view
- Size of fields of view
- Choice of tissue area
- Number of cells or spots
- Spatial structure
Spatial Transcriptomics: Current State
Limited tools available:
- Baker et al. simulation approach
- Bost et al. empirical FoV optimization
- poweREST for DE between two conditions
Key findings:
- Tissue complexity affects FoV requirements
- Tumor samples need more FoVs
- Size and number both matter
Major limitation: Power analysis tools are under-developed
Demo: PoweREST for Spatial Transcriptomics
Question: Power to detect DE genes between two conditions/groups
demo
Spatial Transcriptomics: Key Takeaways
- Effect size and gene detection rate critically determine power
- Single samples per group only provide adequate power with large fc
- More spots per sample helps, but biological replicates needed for inference
- Full R package needed, web app is very limited
- Tissue-specific power surfaces available (pancreatic, colorectal cancer)
The Pilot Data Problem
Where to get parameters?
Option 1: Your own pilot data (most accurate, expensive)
Option 2: Public data (free, may not match perfectly)
Tip: Conservative estimates are okay
Common Mistakes to Avoid
- Using n=3 for everything
- Treating cells as replicates
- Sequencing deeper instead of more samples
- Using wrong tool for technology
- Ignoring batch effects
- Unrealistic effect sizes
When Can You Skip Power Analysis?
Sometimes formal calculation is not feasible:
- Exploratory studies
- Constrained samples (rare diseases)
- Following established protocols
- Hypothesis-generating studies
But always consider minimum detectable effect size
Practical Workflow
Before starting:
- Find similar published data
- Run quick power calculation
- Get ballpark sample size
During planning:
- Budget for replicates FIRST
- Balance number vs depth vs cells
- Consider batch structure
- Plan for failures
Discussion Questions
- What is your main barrier to using power analysis?
- How does pseudoreplication change scRNA-seq design?
- How would you plan spatial experiments?
- How do you choose realistic effect sizes?
- Should power analysis be required for publication?
- How do you balance power with sample availability?
Key Takeaways
- Power analysis is important
- Biological replicates > sequencing depth
- Different technologies need different approaches
- Tools exist and are usable
- Balanced designs matter
- Spatial is still developing
Resources
Paper: Jeon et al. 2023, Biomolecules
Software:
- Bulk: ssizeRNA
- scRNA-seq: POWSC, scPower, scPOST, SCOPIT
- Spatial: Limited tools
Key References:
- Schurch et al. 2016
- Liu et al. 2014
- Squair et al. 2021
Thank You!
Questions?
Contact: UFHCC-BCB-SR@ad.ufl.edu