metabolomics-statistics
БесплатноБез исполняемых скриптовНе проверенLoad when running univariate two-group testing (t-test / Wilcoxon / ANOVA / Kruskal-Wallis) on a feature × sample metabolomics CSV with `--group1-prefix` /…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
metabolomics-statistics
When to use
The user has a wide feature × sample CSV (rows = features as index, columns = samples) and wants univariate two-group testing. Four backends:
ttest(default) — Welch's two-sample t-test.wilcoxon— Mann-Whitney U (non-parametric).anova— one-way ANOVA (two-group case ≡ equal-variance t-test).kruskal— Kruskal-Wallis (non-parametric ANOVA).
--group1-prefix / --group2-prefix select sample columns by
prefix; without them the script splits at column-midpoint with a
warning. Significance threshold via --alpha (default 0.05);
BH-FDR adjusted.
For metabolomics-DE with default ctrl / treat column prefixes
use metabolomics-de. For raw spectra use
metabolomics-xcms-preprocessing.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| Feature × sample table | .csv with feature index in column 0 + sample columns |
yes (unless --demo) |
| Method | --method {ttest,anova,wilcoxon,kruskal} (default ttest) |
no |
| Significance | --alpha <float> (default 0.05) |
no |
| Group columns | --group1-prefix <str> and --group2-prefix <str> (else midpoint split) |
no |
| Output | Path | Notes |
|---|---|---|
| Full results | tables/statistics.csv |
per-feature columns: feature, group1_mean, group2_mean, fold_change, log2fc, statistic, pvalue, fdr (BH-adjusted) |
| Significant subset | tables/significant.csv |
filtered by --alpha |
| Report | report.md + result.json |
summary["method"], summary["n_significant"] |
Flow
- Load CSV with
pd.read_csv(args.input_path, index_col=0)(metabolomics_statistics.py:325). - If both
--group1-prefixand--group2-prefixare set, filter columns byc.startswith(prefix)(metabolomics_statistics.py:330-331); else fall back to midpoint split with a warning (:333-340). - If either group is empty, raise
ValueError("Could not determine group columns. ...")at:344. - Dispatch on
--method(:209rejects unknown withValueError); per-feature test →pvalue+ BH-adjustedfdr. - Filter
fdr < args.alpha→tables/significant.csv(:363). - Write
tables/statistics.csv(metabolomics_statistics.py:360) + report + result.json.
Gotchas
- Group prefixes are OPTIONAL with midpoint fallback.
metabolomics_statistics.py:329-340only honours--group1-prefix/--group2-prefixwhen BOTH are passed; missing one or both falls back to midpoint split (first half / second half) with a warning. Always pass BOTH for explicit group control. - Empty group ⇒
ValueError.metabolomics_statistics.py:344raises if either group's column list is empty (e.g. typo in prefix). Sanity-check--group1-prefix/--group2-prefixagainst your column names. - Index column 0 is the feature ID.
pd.read_csv(args.input_path, index_col=0)(:325) is unconditional — make sure your feature-ID column is the FIRST column in the CSV. anova= equal-variance t-test in the two-group case (metabolomics_statistics.py:138-140). For more than two groups, this skill silently assumes two — extendgroup_colslists or use a different tool for true multi-group ANOVA.wilcoxonhere is Mann-Whitney U (independent samples), NOT paired Wilcoxon signed-rank. Don't use it for paired designs.--inputREQUIRED unless--demo.metabolomics_statistics.py:324raisesValueError("--input required when not using --demo").- log2FC direction depends on group order.
group2_mean - group1_meanconvention; pass groups in the right order.
Key CLI
# Demo
python omicsclaw.py run metabolomics-statistics --demo --output /tmp/stats_demo
# Real CSV with explicit group prefixes
python omicsclaw.py run metabolomics-statistics \
--input features_quant.csv --output results/ \
--method ttest --alpha 0.05 \
--group1-prefix control_ --group2-prefix treated_
# Wilcoxon (non-parametric)
python omicsclaw.py run metabolomics-statistics \
--input features_quant.csv --output results/ \
--method wilcoxon --group1-prefix WT --group2-prefix KO
See also
references/parameters.md— every CLI flagreferences/methodology.md— per-method assumptions, BH FDRreferences/output_contract.md—tables/statistics.csvschema- Adjacent skills:
metabolomics-de(parallel — pre-setctrl/treatprefixes),metabolomics-quantification(upstream — impute + normalise),metabolomics-normalization(upstream — normalisation only),metabolomics-pathway-enrichment(downstream — pathway analysis on significant features)
Установить metabolomics-statistics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл metabolomics-statistics?
Load when running univariate two-group testing (t-test / Wilcoxon / ANOVA / Kruskal-Wallis) on a feature × sample metabolomics CSV with `--group1-prefix` / `--group2-prefix` column matching, BH-FDR adjusted. Skip when working with raw spectra (run `metabolomics-xcms-preprocessing`) or for two-group DE with default `ctrl` / `treat` prefixes (use `metabolomics-de`).
Как установить скилл metabolomics-statistics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл metabolomics-statistics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic