Skip to content

sorenwacker/ms-peakonly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ms-peakonly

GitHub stars License: MIT Python 3.8+

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.

Features

  • 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

Installation

pip install git+https://github.com/sorenwacker/ms-peakonly

Dependencies

  • PyTorch >= 1.2.0
  • pandas
  • numpy
  • pymzML
  • scipy
  • matplotlib

Quick Start

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())

How It Works

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.

Input Format

  • Supported format: mzML files
  • Files should contain centroided MS1 data

Output

The process() method returns a pandas DataFrame containing detected peaks with columns for:

  • Retention time
  • m/z value
  • Intensity
  • Peak boundaries
  • Quality scores

Citation

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.

Acknowledgments

This package wraps the neural network implementation from Arseha/peakonly.

License

MIT License - see LICENSE for details.

About

Peak detection for untargeted metabolomics using Neural Network. High-level API based on peakonly by @Arseha.

Topics

Resources

License

Stars

Watchers

Forks

Contributors