Content developed by Jared Johnson
Module Objectives
- Understand how to automate report generation with Quarto
- Explore the structure and components of an example genomic surveillance report
Slides
Example Report
Below is an example influenza genomic surveillance report generated using Quarto. The report is parameterized, meaning the same .qmd template can be reused across surveillance periods by updating a single config file.
How the Report Was Created
The report is rendered from a Quarto markdown file (genome_report.qmd) using a separate config file (config.yml) that supplies run-specific parameters such as the reporting period, input data paths, and narrative content. This separation allows the report template to remain static while only the config is updated each run.
Report File Descriptions
The full set of files used to create this report can be found on GitHub.
├── config.yml # Run-specific parameters (updated each run)
├── genome_report.qmd # Quarto report template
├── genome_report.html # Rendered HTML output
├── data/
│ ├── mira/
│ │ ├── mira_output-1.csv
│ │ └── mira_output-2.csv
│ ├── h1.nwk
│ └── samplesheet.csv
└── src/
└── report/
├── __init__.py
├── config.py
├── data.py
├── display.py
├── io_ops.py
├── map.py
├── timeline.py
└── tree.py
| File / Directory | Description |
|---|---|
genome_report.html |
Rendered HTML output — the final report that would be distributed. |
genome_report.qmd |
Quarto report template containing markdown narrative, code chunks, and static front matter. Relies on data/, src/, and config.yml. |
config.yml |
Run-specific config file supplying parameters such as reporting period, input data paths, and narrative content. Updated each run and passed to Quarto via -M config.yml. |
data/ |
Sample input data: samplesheet, MIRA output CSVs, and a phylogenetic tree file. These files are updated each reporting period. |
src/ |
Custom Python module imported within genome_report.qmd. Contains helper functions for data loading, visualization, tree rendering, and display logic. |
Render Command
quarto render genome_report.qmd -M config.yml
The -M flag merges the metadata in config.yml into the document’s front matter at render time, overriding any matching keys defined in genome_report.qmd.