Microbiome analysis
Microbiome analysis asks which organisms a sample contains, how their measured composition differs, and what its sequences reveal about functional potential. The answer depends on the assay. A 16S amplicon survey, a shotgun taxonomic profile, and a reconstructed genome measure different parts of the community.
This section follows the route from experimental design through primary processing to interpretation. The primary workflows use nf-core, and the downstream lessons show R and Python on the same public datasets. Each dataset has a stated role, so a pipeline demonstration does not become evidence for a clinical comparison.
Background
Section titled “Background”The assay and the experimental unit determine which analysis is defensible.
| Page | What it covers |
|---|---|
| What is microbiome analysis | Marker genes, shotgun DNA, taxonomic resolution, and functional potential |
| Experimental design | Biological replication, repeated samples, controls, and laboratory batches |
| The workflow and the datasets | Public reads, a paired colorectal cohort, provenance, and sample identity checks |
Processing
Section titled “Processing”Select the pipeline by the input and the scientific question.
| Page | What it covers |
|---|---|
| nf-core pipelines | A choice between ampliseq, taxprofiler, mag, and funcscan |
| nf-core/ampliseq | Primers, read quality, DADA2, ASVs, and taxonomy |
| nf-core/taxprofiler | Shotgun reads, database definitions, classification, and abundance estimates |
| nf-core/mag | Assembly, genome bins, completeness, contamination, and annotation |
| QC and contamination | Read counts, prevalence filters, control evidence, and analysis limits |
Community analysis
Section titled “Community analysis”Keep the feature definition and denominator visible as the analysis changes scale.
| Page | What it covers |
|---|---|
| Taxonomic profiles | Aggregation, unresolved taxonomy, and sample proportions |
| Compositional data and zeros | CLR coordinates and sensitivity to zero replacement |
| Alpha diversity | Observed richness, Shannon diversity, and paired differences |
| Beta diversity and ordination | Bray-Curtis, Aitchison distance, ordination, and permutation designs |
| Differential abundance | Paired effects, intervals, multiple tests, and compositional assumptions |
Human shotgun case study
Section titled “Human shotgun case study”Archived IBDMDB profiles provide a human stool comparison in both languages. These pages verify diagnosis labels, select one eligible sample per participant, and compare Bracken with MetaPhlAn before testing community differences.
| Page | What it covers |
|---|---|
| Cohort and provenance | Archived reports, official metadata, participant selection, and fragment depth |
| Compare shotgun profilers | Matched species identifiers, denominators, and complete group means |
| Cohort statistics | Shannon tests, CLR ordination, PERMANOVA, and dispersion |
Interpretation
Section titled “Interpretation”Connect the output to a measurement that supports the biological claim.
| Page | What it covers |
|---|---|
| Functional profiling | Gene content, pathway abundance, inferred functions, and nf-core/funcscan |
| Visualize the paired comparison | Patient pairs, direct log ratios, and informative captions |
Choose a route through the section
Section titled “Choose a route through the section”For amplicon reads, start with experimental design and ampliseq. Then inspect the count table and controls before calculating diversity. For shotgun reads, start with taxprofiler and its database requirements. Choose mag when the question requires genomes reconstructed from the reads.
For an existing count table, start with the workflow and dataset lesson. Check sample identity and the feature definition before reusing code. A relative abundance table from a profiler does not automatically satisfy a model that expects raw counts.
R and Python examples
Section titled “R and Python examples”The paired statistical lessons use public 16S data from the Kostic colorectal study. The paired comparison uses tumor and normal tissues from the same patients. Normal tissue in this study is not a separate cohort of healthy volunteers.
The human shotgun case study uses archived profiles from IBDMDB, PRJNA398089. Its downstream analyses run in both languages. Its original AWS primary pipeline is not rerun here, and its database archive checksums are unavailable.
The companion repository requires access. It contains the source-data scripts, the container recipe, and one runner per executable page. Public data links remain available without companion access. Printed outputs and figures come from those container runs, and the example checks compare shared R and Python calculations.
The mag and funcscan coverage explains their workflows and output interpretation. Those two pipelines do not have local executions in this release.