agentsclimarketplace

M z annotation reduction quantification

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/m-z-annotation-reduction-quantification

Use when you have spatial metabolomics data with semi-colon-delimited multi-isomer annotations (e.g., 'all_IsomerNames' column in SpaMTP Seurat objects) and you want to quantify the benefit of RefineLipids simplification with lipid_info='simple' parameter.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill m-z-annotation-reduction-quantification

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

8.0 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

m/z annotation reduction quantification

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

Summary

Quantify the magnitude of annotation simplification achieved by applying RefineLipids lipid nomenclature simplification to spatial metabolomics annotations. This skill measures how many distinct lipid isomers or nomenclature variants collapse into unified Lipid Maps categories and classes per m/z value.

When to use

Apply this skill when you have spatial metabolomics data with semi-colon-delimited multi-isomer annotations (e.g., 'all_IsomerNames' column in SpaMTP Seurat objects) and you want to quantify the benefit of RefineLipids simplification with lipid_info='simple' parameter. Use it to validate the annotation reduction efficiency reported in the literature or to assess annotation complexity before and after nomenclature harmonization in your own spotted or imaging MS dataset.

When NOT to use

  • Input is non-lipid metabolite annotations (e.g., proteins, carbohydrates) — RefineLipids targets lipid nomenclature specifically and will return NA for non-lipid compounds
  • Annotation column is already simplified to single entries per m/z — no reduction to measure
  • You need to preserve all isomer-level detail for structure elucidation — RefineLipids deliberately collapses isomers into categories, losing specificity

Inputs

  • SpaMTP Seurat object with pre-annotated Spatial assay metadata
  • Multi-isomer annotation column (semicolon-delimited strings, e.g., 'all_IsomerNames')
  • Lipidmaps reference database (optional, for validation)

Outputs

  • Refined lipid annotations dataframe with simplified Lipid Maps categories
  • Summary table with columns: m/z, base_count (pre-refinement), refined_count (post-refinement), reduction_magnitude
  • Maximum annotation reduction value per m/z
  • Metadata on NA handling (non-lipid metabolites excluded from counts)

How to apply

Load the annotated spatial metabolomics assay (e.g., spotted mouse liver dataset from Zenodo) and extract the metadata column containing multi-isomer annotations. Count the number of distinct annotation entries per m/z by splitting semicolon-delimited strings and excluding NA values for non-lipid metabolites. Call RefineLipids(assay_metadata, annotation.column='all_IsomerNames', lipid_info='simple') to collapse lipid nomenclature into Lipid Maps categories and classes. Re-count distinct annotations per m/z after refinement using the same method, handling NA values consistently. Calculate the reduction as base_count minus refined_count for each m/z, then identify the maximum reduction value and generate a summary table comparing pre- and post-refinement annotation counts. This quantification validates whether the reported reduction (e.g., 161→1) is reproducible and identifies which m/z values benefit most from simplification.

Related tools

  • RefineLipids (Simplifies lipid nomenclature into Lipid Maps categories and classes via lipid_info parameter) — https://github.com/GenomicsMachineLearning/SpaMTP
  • SpaMTP (Container for Spatial assay metadata and host of RefineLipids function) — https://github.com/GenomicsMachineLearning/SpaMTP
  • dplyr (Summarize and count annotation entries per m/z before/after refinement)
  • tidyr (Reshape and pivot annotation counts for comparison tables)
  • R (Execute counting and validation logic via string splitting and NA handling)

Examples

refined_lipid_annotations <- RefineLipids(spotted@assays$[redacted-email], annotation.column='all_IsomerNames', lipid_info='simple'); base_counts <- spotted@assays$[redacted-email] %>% count_annotations(); refined_counts <- refined_lipid_annotations %>% count_annotations(); summary_table <- tibble(mz = names(base_counts), base_count = base_counts, refined_count = refined_counts, reduction = base_count - refined_count)

Evaluation signals

  • base_count ≥ refined_count for all m/z values (refinement should only consolidate, never expand annotations)
  • Maximum reduction value aligns with reported literature values (e.g., 161→1 for spotted dataset) or is documented in output table
  • NA handling is consistent: non-lipid metabolites excluded from both pre- and post-refinement counts, and reported separately
  • All semicolon-delimited isomer names in the base annotations are correctly parsed and counted (spot-check row with known isomer count)
  • Refined annotations conform to Lipid Maps nomenclature (category:class format, e.g., 'Glycerophospholipids:Phosphatidylcholines')

Limitations

  • The article does not provide explicit quantitative results confirming the 161→1 reduction on the spotted dataset; reproducibility requires independent execution
  • RefineLipids only simplifies lipid nomenclature; non-lipid metabolites return NA and are excluded from reduction counts, limiting scope to lipid-only analysis
  • Reduction magnitude depends on diversity of isomer names in the original annotation; sparse or already-simplified annotations will show minimal reduction
  • The method assumes semicolon-delimited format for multi-isomer annotations; other delimiters or formats require preprocessing

Evidence

  • [methods] Count the number of annotations per m/z before refinement by splitting the semicolon-delimited isomer name strings.: "Count the number of annotations per m/z before refinement by splitting the semicolon-delimited isomer name strings."
  • [methods] Call RefineLipids() on the assay metadata with annotation.column='all_IsomerNames' and lipid_info='simple' to simplify lipid nomenclature into Lipid Maps categories and classes.: "Call RefineLipids() on the assay metadata with annotation.column='all_IsomerNames' and lipid_info='simple' to simplify lipid nomenclature into Lipid Maps categories and classes."
  • [methods] Count the number of annotations per m/z after refinement, handling NA values for non-lipid metabolites.: "Count the number of annotations per m/z after refinement, handling NA values for non-lipid metabolites."
  • [methods] RefineLipids can be used to simplify the lipid nomenclature into common lipid categories and classes: "RefineLipids can be used to simplify the lipid nomenclature into common lipid categories and classes"
  • [methods] Load the spotted mouse liver dataset (SpaMTP Seurat object with pre-annotated m/z values) from Zenodo.: "Load the spotted mouse liver dataset (SpaMTP Seurat object with pre-annotated m/z values) from Zenodo."

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.