bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when running per-sample peak picking on a feature × intensity table via `scipy.signal.find_peaks`
$ npx -y skills add tiangzlab/omicsclaw --skill metabolomics-peak-detection --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/metabolomics-peak-detectionContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when running per-sample peak picking on a feature × intensity table via `scipy.signal.find_peaks`
name: metabolomics-peak-detection description: Load when running per-sample peak picking on a feature × intensity table via `scipy.signal.find_peaks` — emits per-(sample, feature) detected peaks with prominence and width. Skip when working with mz / RT raw scans (use metabolomics-xcms-preprocessing); only normalising / quantifying (use metabolomics-quantification). trigger: peak detection, feature detection, XCMS, MZmine, MS-DIAL, peak picking tags: - metabolomics - peak-detection - find-peaks - xcms - mzmine
Detect peaks on tabular sample signals ordered by retention time. This is not raw mzML peak extraction; run XCMS externally for that workflow.
import pandas as pd
from skills._sdk.notebook import load_skill, read_input, write_output
library = load_skill("metabolomics-peak-detection")
data = read_input('features.csv', reader=pd.read_csv)
result = library.detect_peaks(data)
write_output(result, 'tables/result.csv')[examples/example_step.py](examples/example_step.py) runs a seeded synthetic example through the step runner and writes a table and Figure. Computations return new DataFrames, leave the input unchanged and expose diagnostics through `run_info(result)`. Plotting functions write no files.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Detect per-sample peaks after sorting rows by retention time.
:param data: DataFrame with mz, rt and numeric sample intensities. :param sample_cols: Explicit columns; None uses the CLI intensity/sample name detection. :param prominence: CLI default 10000; adjust to the intensity scale. :param height: CLI default None; optionally require a minimum peak height. :param distance: CLI default 5; minimum separation in sorted row positions, not seconds. :returns: A new peak DataFrame with diagnostics in attrs['run_info']. :raises ValueError: No sample columns match or peak parameters are invalid.
Read diagnostics attached to a returned table.
:param data: DataFrame returned by this library. :param keep: Default True; use False in the CLI to remove diagnostics. :returns: An independent dictionary describing the run. :raises ValueError: The table carries no run_info.
Plot detected peak intensity against retention time.
:param data: Peak table returned by detect_peaks. :returns: A matplotlib Figure. :raises KeyError: Required peak columns are absent.
<!-- api:end -->
scipy.signal.find_peaks uses prominence, optional height and a row-index distance after sorting by rt. Widths are measured at half prominence in row-index units.
CSV input; `tables/detected_peaks.csv`, `report.md` and `result.json`. Demo mode also writes its synthetic input CSV at the output root. The function library returns objects; the CLI and step own file writes.
python skills/metabolomics/metabolomics-peak-detection/peak_detect.py --demo --output /tmp/metabolomics_peak_detection
`numpy`, `pandas`, `scipy`, `matplotlib`
Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper.
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when discovering bulk gene co-expression modules and hub genes with R WGCNA. Skip direct expression contrasts (use…
Load when comparing gene expression between two conditions in bulk RNA-seq count data. Skip
Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or
Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list. Skip when
Load when converting Ensembl, Entrez or symbol IDs in a bulk RNA count matrix using an explicit mapping or a small human demo…