Microbiome composition and host–microbiome interpretation

Practical 27: Genomics, systems biology and multi-omics

Learning objectives

Distinguish absolute abundance, read counts and relative composition; calculate a positive-component log ratio; interpret host association without implying mechanism.

Biological question and data

Can a taxon’s relative decrease occur without any absolute decrease, and how should a microbial association with performance be interpreted?

The first table supplies invented absolute quantities. The shared fixture then supplies fictional read counts; these do not identify absolute microbial load or activity. A .5 pseudocount is used only for a sensitivity demonstration, not as a universally valid zero solution.

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. Compare absolute and relative changes

Increase one component while keeping the others fixed.

Show R code
absolute <- rbind(before=c(A=10,B=10,C=10),after=c(A=20,B=10,C=10))
relative <- absolute/rowSums(absolute)
relative
               A         B         C
before 0.3333333 0.3333333 0.3333333
after  0.5000000 0.2500000 0.2500000
Show R code
stopifnot(absolute[1,"B"]==absolute[2,"B"],relative[2,"B"]<relative[1,"B"])

B decreases in proportion because A increased. The fraction alone cannot diagnose absolute depletion.

2. Inspect a hypothetical read panel

Normalize within each sample and verify that fractions sum to one.

Show R code
helper_dir <- if (dir.exists("R")) "R" else "../R"
stopifnot(file.exists(file.path(helper_dir,"teaching_data.R")))
source(file.path(helper_dir,"teaching_data.R"))
d <- teaching_data()
counts <- d$microbial
fraction <- sweep(counts,2,colSums(counts),"/")
stopifnot(max(abs(colSums(fraction)-1))<1e-12,
 identical(colnames(fraction),d$metadata$animal))
barplot(fraction[,1:8],col=rainbow(nrow(fraction)),ylab="Relative read fraction",
 xlab="Fictional animals",legend.text=rownames(fraction))

Relative read representation combines biology and measurement. Extraction and assay properties affect what is observed.

3. Examine a log ratio and zero sensitivity

Use taxon01/taxon02 with explicit pseudocount values. A ratio removes a common multiplicative sample factor for positive components.

Show R code
ratio <- log((counts[1,]+.5)/(counts[2,]+.5))
c(response_correlation=cor(ratio,d$metadata$response))
response_correlation 
         -0.03721842 
Show R code
zero_case <- c(A=0,B=10)
pseudocount <- c(.1,.5,1)
data.frame(pseudocount,log_ratio=log((zero_case["A"]+pseudocount)/(zero_case["B"]+pseudocount)))
  pseudocount log_ratio
1         0.1 -4.615121
2         0.5 -3.044522
3         1.0 -2.397895

The zero-case ratio depends materially on the pseudocount. A host correlation in this panel is a descriptive association, not a microbial intervention result.

4. Contrast richness and evenness

Calculate Shannon entropy for two fictional profiles with the same observed richness.

Show R code
community <- rbind(even=c(.25,.25,.25,.25),
 dominated=c(.85,.05,.05,.05))
H <- function(p) -sum(p[p>0]*log(p[p>0]))
data.frame(profile=rownames(community),richness=rowSums(community>0),
 entropy=apply(community,1,H))
            profile richness   entropy
even           even        4 1.3862944
dominated dominated        4 0.5875009

The statistic summarizes the supplied composition. It does not establish community function or a universally favorable state. Apparent richness also depends on detection and feature definition.

5. Connect a host association to the measurement

Taxon fractions, microbial load, gene content, transcription and metabolites are different measurements. A DNA profile supplies potential rather than direct activity. Collection site and timing determine the community represented.

For a host trait, inspect diet, management and repeated sampling as possible shared drivers. A validated association may motivate a pathway or perturbation study, but changing a relative fraction does not demonstrate changed total activity. Independent farms and explicit prediction timing are needed for a deployment claim.

Interpretation challenge

A community has higher entropy after treatment. Can it be called healthier from that statistic alone?

No. Entropy describes diversity/evenness under the measured categories. Health or production benefit requires relevant outcomes, design and biological evidence.

Interpretation and limits

Distinguish amplicon/shotgun methods, site, time, diet, contaminants, compositionality and load. The fixture does not model a real rumen community. Cross-layer network or methane claims require identified measurements and suitable designs.

Exercises

  1. Why cannot fractions recover total microbial load?
  2. What assumption is hidden in a pseudocount?
  3. What could confound a taxon–production association?
  1. Multiplying all absolute quantities by the same factor preserves fractions.
  2. It supplies an artificial positive value for an unobserved/zero component, whose effect depends on scale and detection process.
  3. Diet, management, host genotype, sampling site/time and technical processing.

Continue learning

B10 Microbiomics, B14 Networks and B15 Integration.

Continue with integrated interpretation. Return to the practical index or the unified map.