Neural network-based peak detection for untargeted metabolomics LC-MS data.
This package provides a high-level Python API for the peakonly neural network, making it easy to integrate into data analysis pipelines and Jupyter notebooks.
- Automatic peak detection using pre-trained neural networks
- Batch processing of multiple mzML files
- Simple API for integration into existing workflows
- Automatic model download on first use
- Returns results as pandas DataFrames
pip install git+https://github.com/sorenwacker/ms-peakonly- PyTorch >= 1.2.0
- pandas
- numpy
- pymzML
- scipy
- matplotlib
from ms_peakonly import PeakOnly
from glob import glob
# Get list of mzML files
files = glob("data/*.mzML")
# Initialize (downloads models automatically on first use)
po = PeakOnly(model_dir="models/")
# Process files and get peak table
peaks = po.process(files)
# Results are returned as a pandas DataFrame
print(peaks.head())The neural network approach identifies chromatographic peaks directly from raw LC-MS data without requiring traditional signal processing steps like smoothing or baseline correction. The model was trained on manually annotated peaks from diverse metabolomics datasets.
- Supported format: mzML files
- Files should contain centroided MS1 data
The process() method returns a pandas DataFrame containing detected peaks with columns for:
- Retention time
- m/z value
- Intensity
- Peak boundaries
- Quality scores
If you use this package in your research, please cite the original peakonly paper:
Kumler, W., et al. (2023). Neural network-based peak detection for untargeted metabolomics.
This package wraps the neural network implementation from Arseha/peakonly.
MIT License - see LICENSE for details.