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-generation3description: Use when after completing doAnalysis on an mzQuality SummarizedExperiment object with outlier detection, batch correction, and compound reliability filtering applied.4license: CC-BY-4.05---67# quality-control-report-generation89## Summary1011Export 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.1213## When to use1415After 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.1617## When NOT to use1819- Input SummarizedExperiment has not been processed through doAnalysis (missing outlier detection, batch correction, and reliability flags)20- You need to perform further interactive data inspection or sample/compound selection (use mzQualityDashboard Shiny application instead)21- Raw data has not yet been imported via readData and buildExperiment2223## Inputs2425- SummarizedExperiment object (post-doAnalysis, with batch correction and outlier detection applied)26- mzQuality experiment with rowData and colData populated by doAnalysis2728## Outputs2930- Project folder directory31- Plots subdirectory (exported visualizations)32- Reports subdirectory (HTML files with interactive results)33- Tab-delimited text files (colData, rowData, assays)34- Excel file (.xlsx) containing all data in single workbook3536## How to apply3738Call 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.3940## Related tools4142- **mzQuality** (Core R package providing doAnalysis and createReports functions for metabolomics QC analysis and report generation) — https://github.com/hankemeierlab/mzQuality43- **SummarizedExperiment** (Bioconductor container object for storing assays, row metadata, and column metadata passed to createReports)44- **mzQualityDashboard** (Shiny application for interactive inspection and manual override of automatic selections before report generation) — https://github.com/hankemeierlab/mzQualityDashboard45- **R** (Runtime environment and scripting language for executing createReports and related mzQuality functions)4647## Examples4849```50exp <- doAnalysis(exp); createReports(exp, makeSummaryReport=TRUE, makeCompoundReport=TRUE, output_directory="./results")51```5253## Evaluation signals5455- Project folder exists at specified output directory with exactly two subdirectories: Plots and Reports56- Plots subdirectory contains visualizations (aliquot plots, compound scatter plots, PCA plots, violin plots) with no missing or truncated images57- Reports subdirectory contains HTML files with confidence-level stratification (High Confidence, Caution, Low SNR sections visible and populated)58- Tab-delimited files export complete rowData (compounds) and colData (samples) matching the SummarizedExperiment dimensions with no truncation59- Excel file successfully opens and contains all assays, rowData, and colData in separate sheets; no data corruption or missing values6061## Limitations6263- Report generation requires prior execution of doAnalysis; createReports does not re-run QC calculations64- HTML reports are static snapshots; interactive exploration requires mzQualityDashboard or manual reimport into R65- Tab-delimited exports may become large for high-dimensional datasets (many compounds × many samples); Excel files have cell limits (~1M rows)66- Confidence classifications (High Confidence, Caution, Low SNR) are based on fixed thresholds set during doAnalysis; manual override requires re-opening in R or the dashboard6768## Evidence6970- [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"71- [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"72- [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"73- [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."74- [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`"