Epigenomic coverage and cell-composition effects

Practical 30: Genomics, systems biology and multi-omics

Learning objectives

Calculate methylation proportions with explicit read denominators; distinguish measurement precision from biological replication; inspect a composition-driven group difference.

Biological question and data

Can a bulk-tissue methylation difference arise with no within-cell-type regulatory change?

Two fictional cell types have constant methylation probabilities .2 and .8. Group-specific cell mixture determines the pooled probability. Reads are binomial conditional on that probability; this simplified model does not represent all assay or biological variation.

No biological download is required. Numerical inputs are hypothetical, not observed animal data. The runnable examples use base R. Count and abundance units are specified where used.

1. Construct the mixture model

Change cell proportions without changing either cell type’s methylation.

Show R code
cell_methylation <- c(typeA=.2,typeB=.8)
mixture <- rbind(control=c(.8,.2),supplement=c(.3,.7))
probability <- as.vector(mixture%*%cell_methylation)
names(probability) <- rownames(mixture)
probability
   control supplement 
      0.32       0.62 
Show R code
stopifnot(abs(probability[1]-.32)<1e-12,abs(probability[2]-.62)<1e-12)

The expected bulk difference is .30, caused entirely by composition in this hypothetical model.

2. Sample reads from independent animals

Read depth changes conditional measurement precision but not the number of animals.

Show R code
set.seed(3001)
group <- rep(c("control","supplement"),each=6)
depth <- rep(c(10,20,40,80,10,20),2)
truth <- probability[group]
methylated <- rbinom(12,depth,truth)
unmethylated <- depth-methylated
observed <- methylated/depth
out <- data.frame(animal=paste0("a",1:12),group,depth,methylated,unmethylated,observed,
 conditional_SE=sqrt(truth*(1-truth)/depth))
out
   animal      group depth methylated unmethylated observed conditional_SE
1      a1    control    10          5            5   0.5000     0.14751271
2      a2    control    20          6           14   0.3000     0.10430724
3      a3    control    40         13           27   0.3250     0.07375636
4      a4    control    80         25           55   0.3125     0.05215362
5      a5    control    10          6            4   0.6000     0.14751271
6      a6    control    20          6           14   0.3000     0.10430724
7      a7 supplement    10          5            5   0.5000     0.15349267
8      a8 supplement    20         11            9   0.5500     0.10853571
9      a9 supplement    40         23           17   0.5750     0.07674634
10    a10 supplement    80         51           29   0.6375     0.05426785
11    a11 supplement    10          5            5   0.5000     0.15349267
12    a12 supplement    20         15            5   0.7500     0.10853571
Show R code
stopifnot(all(methylated+unmethylated==depth),all(observed>=0),all(observed<=1))

Twelve animals remain twelve animals even if their read counts are large. The supplied conditional SE assumes the true mixture probability is known.

3. Compare animal and read-weighted summaries

A mean of animal proportions and a pooled read fraction use different weighting.

Show R code
animal_mean <- tapply(observed,group,mean)
read_weighted <- tapply(methylated,group,sum)/tapply(depth,group,sum)
data.frame(group=names(animal_mean),animal_mean=as.vector(animal_mean),
 read_weighted=as.vector(read_weighted))
       group animal_mean read_weighted
1    control   0.3895833     0.3388889
2 supplement   0.5854167     0.6111111
Show R code
boxplot(observed~group,xlab="Group",ylab="Observed methylated-read fraction",col="#86B7A3")

Pooling reads gives deeper samples more weight. It is not automatically the correct estimator of an average-animal contrast.

4. Inspect boundary proportions

With zero methylated reads, the observed proportion is zero but the underlying proportion need not be exactly zero. An exact binomial interval under independent conditional read sampling remains positive above the boundary.

Show R code
intervals <- t(sapply(c(10,100),function(depth) {
 binom.test(0,depth)$conf.int
}))
data.frame(depth=c(10,100),lower=intervals[,1],upper=intervals[,2])
  depth lower      upper
1    10     0 0.30849711
2   100     0 0.03621669

These intervals describe a conditional read model, not uncertainty in a treatment effect across animals. Conversion, mapping and read dependence can require additional modeling.

5. Retain the biological hierarchy

Read-weighted and equal-animal summaries differ when depth is unequal. Pooling all reads can let a deeply sequenced animal dominate. Use animal-level design and an assay-appropriate model for group inference.

A bulk methylation shift can reflect changed cell composition. To distinguish it from within-cell changes, consider cell-type information and matched timing. A regulatory claim also requires sequence context and evidence linking the measured region to the proposed gene or phenotype.

Interpretation challenge

Does observing zero methylated reads establish a universally unmethylated site?

No. It describes the sampled evidence under an assay. Read depth, conditional uncertainty, technical limitations and biological variation across animals still matter.

Interpretation and limits

Coverage, conversion efficiency, mapping, tissue/cell composition and assay specificity must be evaluated in actual studies. A group contrast in bulk methylation does not establish a within-cell regulatory mechanism or phenotypic mediation.

Exercises

  1. Did the cell-type probabilities change?
  2. What does doubling depth improve under this model?
  3. Why is a pooled-read contrast not a new treatment replication?
  1. No; only their proportions changed.
  2. Conditional sampling precision for each animal’s fraction, not biological replication or control of confounding.
  3. Reads are nested measurements of existing animals; independent allocations determine treatment replication.

Continue learning

B07 Epigenomics, B02 Design and B15 Integration.

Continue with advanced measurement units. Return to the practical index or the unified map.