Metabolite annotation result export
Use when after running the annotateRC function on LC-MS All-ion fragmentation (AIF) features and obtaining a populated annotations object with ranked candidate matches, use this skill when you need to persist results to disk for archival, sharing, or downstream interpretation (e.From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill metabolite-annotation-result-exportAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.1 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it
metabolite-annotation-result-export
Summary
Export completed metabolite annotations from a MetaboAnnotatoR annotations object to a user-specified directory as a suite of structured output files (global results table, ranked results per feature, ranked spectra PDFs, and pseudo-MS/MS MGF). This skill ensures all annotation results are serialized in standardized, reusable formats for downstream analysis and reporting.
When to use
After running the annotateRC function on LC-MS All-ion fragmentation (AIF) features and obtaining a populated annotations object with ranked candidate matches, use this skill when you need to persist results to disk for archival, sharing, or downstream interpretation (e.g., manual curation of top-ranked candidates, integration with other metabolomics pipelines, or generation of publication-quality spectra visualizations).
When NOT to use
- If the annotations object is empty or contains no annotated features
- If the output directory path is read-only or does not exist and cannot be created
- If you only need to inspect top-ranked candidates interactively and do not require persistent file export
Inputs
- MetaboAnnotatoR annotations object (from annotateRC output)
- Output directory path (must be writable)
Outputs
- Global results table (consolidated annotation summary)
- Ranked results file (per-feature candidate rankings)
- Ranked spectra PDFs (one per feature, showing matched ions)
- Pseudo-MS/MS MGF file (combined fragmentation spectra)
How to apply
Invoke the saveAnnotations function with the annotations object (output from annotateRC) and a valid output directory path. Enable all save flags (save global results, ranked results, ranked spectra PDFs, and pseudo-MS/MS MGF) to write the complete annotation output set. The function will automatically enumerate all annotated features and generate one ranked results file per feature, one PDF per ranked spectrum visualization, and a single combined MGF file containing all pseudo-MS/MS spectra. Verify that all expected file types are present in the output directory and that each file is non-empty (file size > 0 bytes) before downstream use.
Related tools
- MetaboAnnotatoR (Provides saveAnnotations function and manages annotation object serialization) — https://github.com/gggraca/MetaboAnnotatoR
- R (Execution environment (version 4.5.0 or higher required))
Examples
saveAnnotations(annotations_obj, output_dir = "/path/to/results", saveGlobal = TRUE, saveRanked = TRUE, savePDF = TRUE, saveMGF = TRUE)
Evaluation signals
- All expected output files are present in the specified directory (global results, ranked results, ranked spectra PDFs for each feature, MGF file)
- Each output file has size > 0 bytes (non-empty validation)
- Ranked results files contain valid tabular data with candidate metabolite names, match scores, and feature identifiers
- Ranked spectra PDFs render without errors and display ion-matched spectra with peak annotations
- MGF file parses without errors and contains valid MS1/MS2 spectrum entries in standard MGF format
Limitations
- Requires a fully annotated annotations object from annotateRC; will fail or produce empty outputs if no features were successfully matched to fragment libraries
- PDF generation depends on system graphics libraries; some headless/containerized environments may require additional X11 or graphics device configuration
- MGF file combines all spectra into a single file; very large annotation runs may produce large MGF files that require memory-efficient parsing downstream
- No built-in versioning or overwrite protection; re-running saveAnnotations to the same directory will overwrite existing files without warning
Evidence
- [other] The saveAnnotations function is invoked with parameters to save global annotations, ranked results, ranked spectra as PDFs, and pseudo-MS/MS spectra as MGF files to a temporary directory, with all save flags enabled to write the full set of annotation outputs.: "Call saveAnnotations with the annotations object and a temporary directory path as output destination... Verify presence of global results file, ranked results file, ranked spectra PDF files (one per"
- [intro] It is possible to save the annotation results to a user-specified directory: "It is possible to save the annotation results to a user-specified directory"
- [intro] MetaboAnnotatoR is designed to perform metabolite annotation of features from LC-MS All-ion fragmentation (AIF) datasets, using ion fragment databases: "MetaboAnnotatoR is designed to perform metabolite annotation of features from LC-MS All-ion fragmentation (AIF) datasets, using ion fragment databases"
- [other] Check that each file is non-empty (file size > 0 bytes).: "Check that each file is non-empty (file size > 0 bytes)."
- [intro] It requires raw LC-MS AIF chromatograms acquired/transformed in centroid mode.: "It requires raw LC-MS AIF chromatograms acquired/transformed in centroid mode."
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.