quality-control-report-generation
Summary
Export analyzed metabolomics quality control results as organized project folders containing publication-ready plots, HTML reports, and tab-delimited data tables. This skill packages post-analysis SummarizedExperiment objects into structured reports that distinguish compounds by confidence level (High Confidence, Caution, Low SNR) and enable downstream programmatic access.
When to use
After completing doAnalysis on an mzQuality SummarizedExperiment object with outlier detection, batch correction, and compound reliability filtering applied. Use this skill when you need to communicate results to non-R users, create publication-quality visualizations, or enable programmatic re-analysis of flagged compounds and samples in external software.
When NOT to use
- Input SummarizedExperiment has not been processed through doAnalysis (missing outlier detection, batch correction, and reliability flags)
- You need to perform further interactive data inspection or sample/compound selection (use mzQualityDashboard Shiny application instead)
- Raw data has not yet been imported via readData and buildExperiment
Inputs
- SummarizedExperiment object (post-doAnalysis, with batch correction and outlier detection applied)
- mzQuality experiment with rowData and colData populated by doAnalysis
Outputs
- Project folder directory
- Plots subdirectory (exported visualizations)
- Reports subdirectory (HTML files with interactive results)
- Tab-delimited text files (colData, rowData, assays)
- Excel file (.xlsx) containing all data in single workbook
How to apply
Call the createReports function on the analyzed experiment object, specifying makeSummaryReport=TRUE and makeCompoundReport=TRUE to enable both report types. The function creates a Project folder with two subdirectories: Plots (containing publication-ready visualizations) and Reports (containing HTML files with interactive results and tab-delimited text exports). The reports automatically stratify results by mzQuality's confidence classifications—High Confidence, Caution, and Low SNR—based on RSDQC, background signal percentage, and QC sample presence thresholds set during doAnalysis. Verify that all expected files are generated and that row and column metadata from the SummarizedExperiment are correctly represented in tab-delimited and Excel outputs for downstream integration.
Related tools
- mzQuality (Core R package providing doAnalysis and createReports functions for metabolomics QC analysis and report generation) — https://github.com/hankemeierlab/mzQuality
- SummarizedExperiment (Bioconductor container object for storing assays, row metadata, and column metadata passed to createReports)
- mzQualityDashboard (Shiny application for interactive inspection and manual override of automatic selections before report generation) — https://github.com/hankemeierlab/mzQualityDashboard
- R (Runtime environment and scripting language for executing createReports and related mzQuality functions)
Examples
exp <- doAnalysis(exp); createReports(exp, makeSummaryReport=TRUE, makeCompoundReport=TRUE, output_directory="./results")
Evaluation signals
- Project folder exists at specified output directory with exactly two subdirectories: Plots and Reports
- Plots subdirectory contains visualizations (aliquot plots, compound scatter plots, PCA plots, violin plots) with no missing or truncated images
- Reports subdirectory contains HTML files with confidence-level stratification (High Confidence, Caution, Low SNR sections visible and populated)
- Tab-delimited files export complete rowData (compounds) and colData (samples) matching the SummarizedExperiment dimensions with no truncation
- Excel file successfully opens and contains all assays, rowData, and colData in separate sheets; no data corruption or missing values
Limitations
- Report generation requires prior execution of doAnalysis; createReports does not re-run QC calculations
- HTML reports are static snapshots; interactive exploration requires mzQualityDashboard or manual reimport into R
- Tab-delimited exports may become large for high-dimensional datasets (many compounds × many samples); Excel files have cell limits (~1M rows)
- Confidence classifications (High Confidence, Caution, Low SNR) are based on fixed thresholds set during doAnalysis; manual override requires re-opening in R or the dashboard
Evidence
- [other] createReports generates a Project folder organized into Plots and Reports subdirectories containing analysis results, including summary reports, compound reports, and tab-delimited text files for programmatic access.: "createReports generates a Project folder organized into Plots and Reports subdirectories containing analysis results, including summary reports, compound reports, and tab-delimited text files"
- [readme] The createReports function creates a folder containing HTML files with plots, tab-delimited files containing the colData, rowData, and the various assays, and an Excel file that contains all the data in a single file.: "The
createReports function will create a folder containing HTML files with plots, tab-delimited files containing the colData, rowData, and the various assays, and an Excel file that contains"
- [intro] mzQuality provides a function to export the results of the analysis. The createReports function creates a folder containing the results.: "mzQuality provides a function to export the results of the analysis. The
createReports function creates a folder containing the results"
- [other] Call createReports with the experiment object, setting makeSummaryReport=TRUE and makeCompoundReport=TRUE to enable both report types.: "Call createReports with the experiment object, setting makeSummaryReport=TRUE and makeCompoundReport=TRUE to enable both report types."
- [readme] Based on the set thresholds, mzQuality distinguishes between High Confidence, Caution, Low SNR reports.: "Based on the set thresholds, mzQuality distinguishes between
High Confidence, Caution, Low SNR"
1---2name: quality-control-report-generation-23description: Use when after completing doAnalysis on an mzQuality SummarizedExperiment4 object with outlier detection, batch correction, and compound reliability filtering5 applied.6license: CC-BY-4.07metadata:8 edam_operation: http://edamontology.org/operation_37639 edam_topics:10 - http://edamontology.org/topic_317211 - http://edamontology.org/topic_009112 tools:13 - R14 - mzQuality15 - SummarizedExperiment16 - mzQualityDashboard17 techniques:18 - LC-MS19 license_tier: open20 provenance_tier: literature21derived_from:22- doi: 10.1021/jasms.5c0007323 title: mzquality24evidence_spans:25- library(mzQuality)26- knitr::rmarkdown, library(mzQuality)27- mzQuality requires a specific format for the input data.28- mzQuality requires a specific format for the input data29- The `buildExperiment` function will then take the data and create an experiment30 object that can be used for analysis.31- Internally, mzQuality uses Bioconductors' *SummarizedExperiment* object to store32 the data33claims: []34provenance:35 collection: https://w3id.org/holobiomicslab/asb-skill/collection/metabolomics/v236 assembled_by: scripts/collect_metabolomics_collection.py37 sources:38 - build: coll_mzquality_cq39 doi: 10.1021/jasms.5c0007340 title: mzquality41 dedup_kept_from: coll_mzquality_cq42schema_version: 0.2.043attribution:44 generator: AgenticScienceBuilder45 original_doi: 10.1021/jasms.5c0007346 all_source_dois:47 - 10.1021/jasms.5c0007348 zenodo_doi: 10.5281/zenodo.2079402749 curators: []50 promoter: Louis-Félix Nothias51 sponsor: CNRS & Université Côte d'Azur52---5354# quality-control-report-generation5556## Summary5758Export analyzed metabolomics quality control results as organized project folders containing publication-ready plots, HTML reports, and tab-delimited data tables. This skill packages post-analysis SummarizedExperiment objects into structured reports that distinguish compounds by confidence level (High Confidence, Caution, Low SNR) and enable downstream programmatic access.5960## When to use6162After completing doAnalysis on an mzQuality SummarizedExperiment object with outlier detection, batch correction, and compound reliability filtering applied. Use this skill when you need to communicate results to non-R users, create publication-quality visualizations, or enable programmatic re-analysis of flagged compounds and samples in external software.6364## When NOT to use6566- Input SummarizedExperiment has not been processed through doAnalysis (missing outlier detection, batch correction, and reliability flags)67- You need to perform further interactive data inspection or sample/compound selection (use mzQualityDashboard Shiny application instead)68- Raw data has not yet been imported via readData and buildExperiment6970## Inputs7172- SummarizedExperiment object (post-doAnalysis, with batch correction and outlier detection applied)73- mzQuality experiment with rowData and colData populated by doAnalysis7475## Outputs7677- Project folder directory78- Plots subdirectory (exported visualizations)79- Reports subdirectory (HTML files with interactive results)80- Tab-delimited text files (colData, rowData, assays)81- Excel file (.xlsx) containing all data in single workbook8283## How to apply8485Call the createReports function on the analyzed experiment object, specifying makeSummaryReport=TRUE and makeCompoundReport=TRUE to enable both report types. The function creates a Project folder with two subdirectories: Plots (containing publication-ready visualizations) and Reports (containing HTML files with interactive results and tab-delimited text exports). The reports automatically stratify results by mzQuality's confidence classifications—High Confidence, Caution, and Low SNR—based on RSDQC, background signal percentage, and QC sample presence thresholds set during doAnalysis. Verify that all expected files are generated and that row and column metadata from the SummarizedExperiment are correctly represented in tab-delimited and Excel outputs for downstream integration.8687## Related tools8889- **mzQuality** (Core R package providing doAnalysis and createReports functions for metabolomics QC analysis and report generation) — https://github.com/hankemeierlab/mzQuality90- **SummarizedExperiment** (Bioconductor container object for storing assays, row metadata, and column metadata passed to createReports)91- **mzQualityDashboard** (Shiny application for interactive inspection and manual override of automatic selections before report generation) — https://github.com/hankemeierlab/mzQualityDashboard92- **R** (Runtime environment and scripting language for executing createReports and related mzQuality functions)9394## Examples9596```97exp <- doAnalysis(exp); createReports(exp, makeSummaryReport=TRUE, makeCompoundReport=TRUE, output_directory="./results")98```99100## Evaluation signals101102- Project folder exists at specified output directory with exactly two subdirectories: Plots and Reports103- Plots subdirectory contains visualizations (aliquot plots, compound scatter plots, PCA plots, violin plots) with no missing or truncated images104- Reports subdirectory contains HTML files with confidence-level stratification (High Confidence, Caution, Low SNR sections visible and populated)105- Tab-delimited files export complete rowData (compounds) and colData (samples) matching the SummarizedExperiment dimensions with no truncation106- Excel file successfully opens and contains all assays, rowData, and colData in separate sheets; no data corruption or missing values107108## Limitations109110- Report generation requires prior execution of doAnalysis; createReports does not re-run QC calculations111- HTML reports are static snapshots; interactive exploration requires mzQualityDashboard or manual reimport into R112- Tab-delimited exports may become large for high-dimensional datasets (many compounds × many samples); Excel files have cell limits (~1M rows)113- Confidence classifications (High Confidence, Caution, Low SNR) are based on fixed thresholds set during doAnalysis; manual override requires re-opening in R or the dashboard114115## Evidence116117- [other] createReports generates a Project folder organized into Plots and Reports subdirectories containing analysis results, including summary reports, compound reports, and tab-delimited text files for programmatic access.: "createReports generates a Project folder organized into Plots and Reports subdirectories containing analysis results, including summary reports, compound reports, and tab-delimited text files"118- [readme] The createReports function creates a folder containing HTML files with plots, tab-delimited files containing the colData, rowData, and the various assays, and an Excel file that contains all the data in a single file.: "The `createReports` function will create a folder containing HTML files with plots, tab-delimited files containing the *colData*, *rowData*, and the various *assays*, and an Excel file that contains"119- [intro] mzQuality provides a function to export the results of the analysis. The createReports function creates a folder containing the results.: "mzQuality provides a function to export the results of the analysis. The `createReports` function creates a folder containing the results"120- [other] Call createReports with the experiment object, setting makeSummaryReport=TRUE and makeCompoundReport=TRUE to enable both report types.: "Call createReports with the experiment object, setting makeSummaryReport=TRUE and makeCompoundReport=TRUE to enable both report types."121- [readme] Based on the set thresholds, mzQuality distinguishes between High Confidence, Caution, Low SNR reports.: "Based on the set thresholds, mzQuality distinguishes between `High Confidence`, `Caution`, `Low SNR`"