Automated summary
This skill generates retention statistics after the margheRita CV_ratio() filter is applied to a normalized metabolomic feature matrix, quantifying how many features pass the threshold and describing the distribution of the retained CV ratios.
Strengths
- Specifies concrete expected outputs: a retention table (counts before/after, number and percentage retained), distribution statistics (median, mean, quartiles, min/max) and the filtered matrix.
- Anchored in the margheRita workflow and in an explicit QC vs. non-QC split for computing the CV ratio.
- Makes filtering auditable by reporting feature reduction (e.g., 539 → 303) and the stability profile of retained features.
- Includes an optional histogram or density plot of the CV ratio distribution.
Limitations
- Assumes CV_ratio() has already been run; it does not cover pre-filter exploration or the ratio computation itself.
- Not applicable without metadata that clearly separates QC from non-QC samples, or without access to the original non-normalized data.
- Tightly coupled to the R/margheRita ecosystem and to LC-MS data produced via MS-DIAL, with a reference threshold of CV ratio > 1.0.
Use it right after running CV_ratio() on a normalized matrix (for instance Urine_RP_NEG_norm.txt) to document how many features were kept and how their CV ratios are distributed.
Avoid it when the feature table is already filtered with no original data available, when QC annotations are missing, or when CV-based filtering has not yet been performed.
Security analysis
SafeThe skill describes statistical analysis of metabolomic data using R and the margheRita package. It includes only R code for computing retention percentages and summary statistics; no shell commands, network access, destructive operations, or exfiltration are instructed. No tools are declared, and the content is purely analytical.
No concerns found
How this analysis is madeExamples
I applied CV_ratio() to Urine_RP_NEG_norm.txt in margheRita and filtered with a CV ratio > 1.0 threshold. Report how many features were kept versus the starting count, the percentage retained, and the median/mean/quartiles of the retained CV ratios.Using the CV ratio vector from CV_ratio() on my QC-annotated normalized feature matrix, produce the retention summary table and a density plot of the CV ratio distribution for the features that passed the > 1.0 threshold.After CV_ratio() filtering of my normalized metabolomic matrix with QC vs non-QC metadata, give me the before/after feature counts, the retention statistics, and export the feature matrix subset to the retained features.name: metabolomic-feature-retention-statistics description: Use when after applying the CV_ratio() filtering function to a normalized metabolomic feature matrix (e.g., Urine_RP_NEG_norm.txt) in margheRita, generate retention statistics to report how many features passed the threshold (CV ratio > 1.0) and characterize the distribution of retained CV ratios. license: CC-BY-4.0 metadata: edam_operation: http://edamontology.org/operation_3695 edam_topics:
- http://edamontology.org/topic_3172
- http://edamontology.org/topic_0091 tools:
- R
- margheRita techniques:
- LC-MS derived_from:
- doi: 10.1101/2024.06.20.599545v1 title: MargheRita
- doi: 10.1101/2024.06.20.599545 title: '' evidence_spans:
- The R package margheRita addresses the complete workflow
- The R package margheRita
- The R package margheRita addresses the complete workflow for metabolomic profiling in untargeted studies based on liquid chromatography (LC) coupled with tandem mass spectrometry (MS/MS)
- The R package margheRita addresses the complete workflow for metabolomic profiling
claims: []
provenance:
collection: https://w3id.org/holobiomicslab/asb-skill/collection/metabolomics/v2
assembled_by: scripts/collect_metabolomics_collection.py
sources:
- build: coll_margherita_cq doi: 10.1101/2024.06.20.599545v1 title: MargheRita dedup_kept_from: coll_margherita_cq schema_version: 0.2.0 attribution: generator: AgenticScienceBuilder original_doi: 10.1101/2024.06.20.599545v1 all_source_dois:
- 10.1101/2024.06.20.599545v1
- 10.1101/2024.06.20.599545 zenodo_doi: 10.5281/zenodo.20794027 curators: [] promoter: Louis-Félix Nothias sponsor: CNRS & Université Côte d'Azur
metabolomic-feature-retention-statistics
Summary
Quantify and report the feature count and coefficient-of-variation distribution before and after applying a CV-ratio filter to metabolomic feature matrices. This skill documents the filtering outcome and provides summary statistics needed to assess data reduction and filter efficacy.
When to use
After applying the CV_ratio() filtering function to a normalized metabolomic feature matrix (e.g., Urine_RP_NEG_norm.txt) in margheRita, generate retention statistics to report how many features passed the threshold (CV ratio > 1.0) and characterize the distribution of retained CV ratios. Use this skill whenever you need to quantify the impact of quality-control filtering on feature count and provide evidence of feature stability across sample groups.
When NOT to use
- Input is already a filtered or pre-screened feature table without access to the original unnormalized data or CV ratio calculations.
- Sample metadata does not clearly distinguish QC from non-QC samples, making CV stratification impossible.
- CV_ratio() has not yet been applied, or no threshold filtering has been performed (skill addresses post-filter statistics, not pre-filter exploration).
Inputs
- Normalized metabolomic feature matrix (e.g., from MS-DIAL output via margheRita, dimensions: features × samples)
- Sample metadata annotating QC vs. non-QC sample status
- CV ratio vector output from CV_ratio() function (one ratio per feature)
Outputs
- Feature retention summary table (feature counts before/after, count retained, percentage retained)
- CV ratio distribution statistics (median, mean, min, max, quartiles of retained features)
- Filtered feature matrix (features × samples, subset to retained features only)
- Optional visualization (histogram or density plot of CV ratio distribution)
How to apply
After calling CV_ratio() on your normalized feature matrix (with QC vs. non-QC sample annotations), compute and report: (1) feature count before and after filtering (e.g., 539 → 303); (2) the distribution of CV ratios for retained features (median, mean, percentiles); (3) percentage of features retained; and (4) optionally, the range and quartiles of CV ratios to characterize feature stability. The CV ratio threshold (default 1.0) ensures retained features show greater variation in real samples than in QC samples, indicating biological signal rather than instrumental noise. Document these metrics in a summary table and optionally visualize the CV ratio distribution (e.g., histogram or density plot) to assess filtering stringency.
Related tools
- margheRita (Provides CV_ratio() function to compute and apply coefficient-of-variation ratio filtering; outputs filtered feature matrix and CV ratio statistics.) — https://github.com/emosca-cnr/margheRita
- R (Statistical computing environment for calculating and summarizing CV ratio distributions and generating summary tables and plots.)
Examples
# After applying CV_ratio() filtering in margheRita:
# Compute and report retention statistics
feature_count_before <- 539; feature_count_after <- 303
retention_pct <- (feature_count_after / feature_count_before) * 100
cat(sprintf('Features retained: %d/%d (%.1f%%)\nMedian CV ratio: 1.1032\n', feature_count_after, feature_count_before, retention_pct))
Evaluation signals
- Feature count before and after filtering matches the input and output dimensions of the filtered feature matrix (e.g., 539 → 303 features).
- Retention percentage is between 0 and 100% and represents the proportion of features with CV ratio > threshold.
- Median and mean CV ratios of retained features are ≥ 1.0 (or equal to the applied threshold), confirming all retained features meet the filtering criterion.
- CV ratio distribution (histogram or density plot) shows a unimodal or multimodal distribution centered at or above the threshold, with no retained features below 1.0.
- Summary statistics are accompanied by the original feature count, threshold used (default 1.0), and date/tool version (margheRita), enabling reproducibility and audit trail.
Limitations
- CV ratio filter relies on adequate QC sample replication; insufficient QC samples (e.g., <3) may produce unstable CV estimates and misleading ratios.
- Filter does not account for features with zero or near-zero variance in QC samples, which could produce undefined or infinite CV ratios; these edge cases must be handled separately.
- Retention statistics are threshold-dependent; changing the CV ratio threshold (default 1.0) will alter feature count and distribution; threshold choice should be justified by biological context or prior validation.
- CV ratio filtering assumes normalization has been applied; unnormalized or poorly normalized data may produce biased or uninformative CV ratios.
Evidence
- [other] Feature retention and CV ratio distribution from task_003: "The CV_ratio() function retains only features with a CV ratio (non-QC samples / QC samples) exceeding the default threshold of 1, producing a distribution with median 1.1032 and resulting in 303"
- [other] CV_ratio filtering workflow step: "Compute the CV ratio (CV_non-QC / CV_QC) for each feature. Apply the threshold filter, retaining only features where CV_ratio > 1.0. Output the filtered feature table and generate summary statistics"
- [readme] margheRita capability for CV-based filtering: "filtering by coefficient of variation (samples vs QCs) and probabilistic quotient normalization"
- [readme] MS-DIAL workflow context for margheRita: "The R package margheRita addresses the complete workflow for metabolomic profiling in untargeted studies based on liquid chromatography (LC) coupled with tandem mass spectrometry (MS/MS)."
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/metabolomic-feature-retention-statistics-mt3wm1rk/download' --output '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md.part' && mv '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md.part' '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md' && test -s '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/metabolomic-feature-retention-statistics' && cp -R '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk' '.claude/skills/metabolomic-feature-retention-statistics'Cursor
test -f '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md' && test -s '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/metabolomic-feature-retention-statistics' && cp -R '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk' '.cursor/skills/metabolomic-feature-retention-statistics'Codex
test -f '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md' && test -s '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/metabolomic-feature-retention-statistics' && cp -R '.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk' '.agents/skills/metabolomic-feature-retention-statistics'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk'openskills read 'metabolomic-feature-retention-statistics-mt3wm1rk'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Create Interactive Maps with kepler.gl
Data & AI
Create interactive map visualizations and export standalone HTML using the keplergl Python package. Use to plot geospatial data from DataFrames, GeoJSON, or CSV.
Agent-Driven Parameter Optimization
Data & AI
Guide for optimizing configurable systems with a measurable objective, using bounded trials and evidence-based recommendations.
ICP Visitor Outreach
Data & AI
Identify signed-up users matching the ideal customer profile but stalled, and draft personalized outreach to re-engage them.