agentsclimarketplace

Metabolomics data loading and formatting

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/metabolomics-data-loading-and-formatting

Use when you have raw metabolomics count data (e.g., from mass spectrometry or NMR experiments) in tabular format and associated sample metadata (e.g., treatment groups, experimental factors) that need to be imported into R for analysis with packages like Omu.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill metabolomics-data-loading-and-formatting

Assembled 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.9 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

metabolomics-data-loading-and-formatting

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Load and structure raw metabolomics count data and metadata into R using specialized functions that ensure proper class assignment and hierarchical organization. This skill establishes the foundation for downstream statistical analysis and visualization of metabolite abundance patterns.

When to use

You have raw metabolomics count data (e.g., from mass spectrometry or NMR experiments) in tabular format and associated sample metadata (e.g., treatment groups, experimental factors) that need to be imported into R for analysis with packages like Omu. Use this skill when you have two separate files: a count data matrix with metabolites as rows and samples as columns, and a metadata file with samples as rows and experimental factors as columns.

When NOT to use

  • Data is already in an R-native Omu object or ExpressionSet class
  • Metabolite identifiers are already mapped to functional annotations
  • Count data contains zero-variance metabolites or has already been filtered for quality control

Inputs

  • raw metabolomics count data matrix (rows=metabolites, columns=samples)
  • sample metadata file (rows=samples, columns=experimental factors)
  • metabolite identifier type (KEGG, KO_Number, Prokaryote, or Eukaryote)

Outputs

  • R data object with metabolomics count data (proper class for Omu)
  • R metadata data frame with Sample column and experimental factor columns
  • optionally: log-transformed count data
  • optionally: count data with assigned hierarchical class information

How to apply

Load the metabolomics count data using the read.metabo function, which ensures the data is assigned the correct class for compatibility with Omu workflows. Separately load the metadata file using read.csv, ensuring it contains a Sample column with row values matching the sample names in the count data, plus columns for each experimental factor (e.g., Treatment, Genotype). If necessary, optionally log-transform the count data column-wise using transform_samples with the natural log function to address overdispersion typical of metabolomics count data. Assign hierarchical class data using assign_hierarchy and specify the correct metabolite identifier (KEGG, KO_Number, Prokaryote, or Eukaryote) to enable functional downstream analysis.

Related tools

Examples

count_data <- read.metabo('metabolomics_counts.csv'); metadata <- read.csv('sample_metadata.csv'); count_data_log <- transform_samples(count_data, log)

Evaluation signals

  • Count data object has correct R class recognized by Omu functions (verify via class() and str())
  • Metadata data frame has exactly one Sample column with all sample names matching count data column names
  • Metadata contains at least one experimental factor column with consistent, non-missing values
  • If log-transformed: all count values are numeric and positive before transformation, no NaN or Inf values after
  • If hierarchy assigned: metabolites have valid identifiers from the specified namespace (KEGG, KO_Number, Prokaryote, or Eukaryote)

Limitations

  • read.metabo function documentation does not specify expected file format (CSV, TSV, Excel); users should verify compatibility with their file type
  • Metadata file must have exact column naming and row–column correspondence; mismatch between sample names in count data and metadata will cause silent failures in downstream functions
  • assign_hierarchy requires metabolites to be labeled with recognizable KEGG/KO identifiers; identifiers not in the KEGG database will fail silently or be dropped
  • No built-in quality control or duplicate-removal functions documented; overdispersion mitigation via log transformation is optional and user-driven

Evidence

  • [other] read.metabo recommendation: "For end users metabolomics data, it is recommended to use the read.metabo function to load it into R"
  • [other] metadata file structure requirement: "The meta data file should have a Sample column, with row values being sample names, and then a column for each Factor in your dataset"
  • [other] example metabolomics dataset: "Included with Omu is an example metabolomics dataset of data from fecal samples collected from a two factor experiment with wild type c57B6J mice and c57B6J mice with a knocked out nos2 gene"
  • [other] log transformation for overdispersion: "transform_samples will perform column-wise transformations across the data using the supplied function. This is useful for operations such as log transformation, or transforming by the square"
  • [other] hierarchical class assignment: "To assign hierarchical class data, use the assign_hierarchy function and pick the correct identifier, either "KEGG", "KO_Number", "Prokaryote", or "Eukaryote""

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.