Statistiques de rétention de caractéristiques métabolomiques

VérifiéSûr

Générer des statistiques de rétention après application du filtre CV_ratio() à une matrice de caractéristiques métabolomiques normalisée, et caractériser la distribution des ratios CV retenus.

Spar Skills Guide Bot
Data & IAIntermédiaire
22/08/2026
Claude CodeCursorCodex
#metabolomics#r#quality-control#feature-filtering#statistics

Recommandé pour

Synthèse automatique

Ce skill produit des statistiques de rétention après l'application du filtre CV_ratio() de margheRita sur une matrice de features métabolomiques normalisée, afin de quantifier combien de features dépassent le seuil et de décrire la distribution des ratios de CV conservés.

Points forts

  • Décrit précisément les sorties attendues : tableau de rétention (avant/après, nombre et pourcentage conservés), statistiques de distribution (médiane, moyenne, quartiles, min/max) et matrice filtrée.
  • S'appuie sur le workflow margheRita et sur une séparation explicite QC / non-QC pour stratifier le calcul du CV.
  • Rend le filtrage auditable en chiffrant la réduction de features (par exemple 539 → 303) et la stabilité des features retenues.
  • Prévoit une visualisation optionnelle (histogramme ou courbe de densité) de la distribution des ratios de CV.

Limites

  • Suppose que CV_ratio() a déjà été exécuté : le skill ne couvre ni l'exploration pré-filtre ni le calcul du ratio lui-même.
  • Inutilisable sans métadonnées distinguant clairement les échantillons QC des autres, ou sans accès aux données non normalisées d'origine.
  • Fortement lié à l'écosystème R/margheRita et à des données LC-MS issues de MS-DIAL, avec un seuil de référence fixé à CV ratio > 1.0.
Quand l'utiliser

À utiliser juste après avoir appliqué CV_ratio() sur une matrice normalisée (par exemple Urine_RP_NEG_norm.txt) pour documenter le nombre de features conservées et la distribution de leurs ratios de CV.

Quand l'éviter

À éviter si le tableau de features est déjà filtré sans données d'origine, si les annotations QC sont absentes, ou si le filtrage par CV n'a pas encore été réalisé.

Analyse de sécurité

Sûr
Score qualité82/100

The 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.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Retention report after CV filtering
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.
Distribution plot of 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.
Export the filtered feature matrix
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)."

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

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. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

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 doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk'

openskills read 'metabolomic-feature-retention-statistics-mt3wm1rk'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/metabolomic-feature-retention-statistics-mt3wm1rk/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires