metabolomics-workbench-api-integration
Summary
Retrieve and parse public lipidomics datasets directly from Metabolomics Workbench into a structured LipidomicsExperiment object using the lipidr R package's API integration. This skill enables rapid access to standardized lipidomics data without manual download and reformatting.
When to use
When you need to analyze a publicly archived lipidomics study (identified by study_id like ST001111) and want to bypass manual data download and format conversion. Use this when your input is a Metabolomics Workbench study identifier and your goal is to load the data into R for downstream quality control, differential analysis, or multivariate modeling.
When NOT to use
- Your data is already in a local file format (CSV, Skyline export) — use read.csv() or read_skyline() instead
- You have already downloaded and locally stored the raw Metabolomics Workbench data — load it directly with file I/O functions
- Your study is not publicly archived in Metabolomics Workbench — this skill requires API access to a registered study
Inputs
- Metabolomics Workbench study_id string (e.g., 'ST001111')
- Internet connection to Metabolomics Workbench API
Outputs
- LipidomicsExperiment object containing parsed lipid abundances and sample metadata
- Parsing warnings listing unparsed molecule names and their counts
How to apply
Call lipidr's fetch_mw_study(study_id) function with the target Metabolomics Workbench study identifier to download and automatically parse the dataset into a LipidomicsExperiment object. Examine parsing warnings to identify molecules with unsupported naming patterns (e.g., full chemical names for Ceramides). For unparsed molecules, apply regex-based renaming to convert full names to the supported 'Cer (' convention using pattern substitution (e.g., '^.* (' to '(Cer ('). Verify successful parsing by checking that all molecule names follow supported lipid class naming conventions before proceeding to quality control and analysis steps.
Related tools
- lipidr (R package providing fetch_mw_study() function for API integration and LipidomicsExperiment object creation) — https://github.com/ahmohamed/lipidr
- Metabolomics Workbench API (Remote API service hosting public lipidomics datasets indexed by study_id) — https://www.metabolomicsworkbench.org
- R (Runtime environment for executing lipidr functions and regex-based molecule name standardization)
Examples
d <- fetch_mw_study('ST001111'); d
Evaluation signals
- LipidomicsExperiment object is successfully created with non-zero dimensions (lipids × samples)
- Sample metadata (e.g., SampleType, Cancer Stage, Race) are present in the colData slot
- All molecule names conform to supported lipid naming patterns; parsing warning count is zero or only includes expected non-recoverable entries
- Lipid abundance matrix contains numeric values (typically Areas or peak intensities) with no missing values in the primary measure column
- Row and column names match the expected study layout (lipid names as rows, sample identifiers as columns)
Limitations
- Skill depends on the study being publicly registered in Metabolomics Workbench; private or embargoed studies cannot be accessed via API
- Molecules with non-standard naming conventions (e.g., full chemical nomenclature) will fail to parse unless manually renamed post-fetch
- Large studies may require substantial memory and network bandwidth; no automatic chunking or streaming is documented
- API availability and response time are external to the lipidr package and may vary
Evidence
- [readme] Through integration with Metabolomics Workbench API, lipidr allows users, to quickly explore public lipidomics experiments.: "Through integration with Metabolomics Workbench API, lipidr allows users, to quickly explore public lipidomics experiments."
- [intro] Datasets can be easily downloaded and parsed into LipidomicsExperiment object using lipidr function fetch_mw_study() by supplying a study_id.: "Datasets can be easily downloaded and parsed into LipidomicsExperiment object using lipidr function fetch_mw_study() by supplying a study_id."
- [other] Ceramide molecules written with full chemical names can be recovered by substituting the initial portion with 'Cer' using the RegEx pattern '^.* (' to '(Cer (', enabling successful parsing of all previously unparsed molecules.: "Ceramide molecules written with full chemical names can be recovered by substituting the initial portion with 'Cer' using the RegEx pattern '^.* (' to '(Cer (', enabling successful parsing of all"
- [intro] Note the warning that some molecules were not parsed because their names did not follow the supported patterns.: "Note the warning that some molecules were not parsed because their names did not follow the supported patterns."
- [intro] We can examine these molecules, remove them from the dataset or change their names, if desired.: "We can examine these molecules, remove them from the dataset or change their names, if desired."
1---2name: metabolomics-workbench-api-integration3description: Use when when you need to analyze a publicly archived lipidomics study (identified by study_id like ST001111) and want to bypass manual data download and format conversion.4license: CC-BY-4.05---67# metabolomics-workbench-api-integration89## Summary1011Retrieve and parse public lipidomics datasets directly from Metabolomics Workbench into a structured LipidomicsExperiment object using the lipidr R package's API integration. This skill enables rapid access to standardized lipidomics data without manual download and reformatting.1213## When to use1415When you need to analyze a publicly archived lipidomics study (identified by study_id like ST001111) and want to bypass manual data download and format conversion. Use this when your input is a Metabolomics Workbench study identifier and your goal is to load the data into R for downstream quality control, differential analysis, or multivariate modeling.1617## When NOT to use1819- Your data is already in a local file format (CSV, Skyline export) — use read.csv() or read_skyline() instead20- You have already downloaded and locally stored the raw Metabolomics Workbench data — load it directly with file I/O functions21- Your study is not publicly archived in Metabolomics Workbench — this skill requires API access to a registered study2223## Inputs2425- Metabolomics Workbench study_id string (e.g., 'ST001111')26- Internet connection to Metabolomics Workbench API2728## Outputs2930- LipidomicsExperiment object containing parsed lipid abundances and sample metadata31- Parsing warnings listing unparsed molecule names and their counts3233## How to apply3435Call lipidr's fetch_mw_study(study_id) function with the target Metabolomics Workbench study identifier to download and automatically parse the dataset into a LipidomicsExperiment object. Examine parsing warnings to identify molecules with unsupported naming patterns (e.g., full chemical names for Ceramides). For unparsed molecules, apply regex-based renaming to convert full names to the supported 'Cer (' convention using pattern substitution (e.g., '^.* \(' to '(Cer ('). Verify successful parsing by checking that all molecule names follow supported lipid class naming conventions before proceeding to quality control and analysis steps.3637## Related tools3839- **lipidr** (R package providing fetch_mw_study() function for API integration and LipidomicsExperiment object creation) — https://github.com/ahmohamed/lipidr40- **Metabolomics Workbench API** (Remote API service hosting public lipidomics datasets indexed by study_id) — https://www.metabolomicsworkbench.org41- **R** (Runtime environment for executing lipidr functions and regex-based molecule name standardization)4243## Examples4445```46d <- fetch_mw_study('ST001111'); d47```4849## Evaluation signals5051- LipidomicsExperiment object is successfully created with non-zero dimensions (lipids × samples)52- Sample metadata (e.g., SampleType, Cancer Stage, Race) are present in the colData slot53- All molecule names conform to supported lipid naming patterns; parsing warning count is zero or only includes expected non-recoverable entries54- Lipid abundance matrix contains numeric values (typically Areas or peak intensities) with no missing values in the primary measure column55- Row and column names match the expected study layout (lipid names as rows, sample identifiers as columns)5657## Limitations5859- Skill depends on the study being publicly registered in Metabolomics Workbench; private or embargoed studies cannot be accessed via API60- Molecules with non-standard naming conventions (e.g., full chemical nomenclature) will fail to parse unless manually renamed post-fetch61- Large studies may require substantial memory and network bandwidth; no automatic chunking or streaming is documented62- API availability and response time are external to the lipidr package and may vary6364## Evidence6566- [readme] Through integration with Metabolomics Workbench API, lipidr allows users, to quickly explore public lipidomics experiments.: "Through integration with Metabolomics Workbench API, lipidr allows users, to quickly explore public lipidomics experiments."67- [intro] Datasets can be easily downloaded and parsed into LipidomicsExperiment object using lipidr function fetch_mw_study() by supplying a study_id.: "Datasets can be easily downloaded and parsed into LipidomicsExperiment object using lipidr function fetch_mw_study() by supplying a study_id."68- [other] Ceramide molecules written with full chemical names can be recovered by substituting the initial portion with 'Cer' using the RegEx pattern '^.* \(' to '(Cer (', enabling successful parsing of all previously unparsed molecules.: "Ceramide molecules written with full chemical names can be recovered by substituting the initial portion with 'Cer' using the RegEx pattern '^.* \(' to '(Cer (', enabling successful parsing of all"69- [intro] Note the warning that some molecules were not parsed because their names did not follow the supported patterns.: "Note the warning that some molecules were not parsed because their names did not follow the supported patterns."70- [intro] We can examine these molecules, remove them from the dataset or change their names, if desired.: "We can examine these molecules, remove them from the dataset or change their names, if desired."