Metadata-Version: 2.4
Name: hplc-peakpicker
Version: 2.0.1
Summary: HPLC chromatogram peak detection, baseline correction, deconvolution and quantification (clean-architecture Python package).
License: MIT
Project-URL: Homepage, https://github.com/jahyunlee00299/hplc-peak-analyzer-PeakPicker
Keywords: HPLC,chromatography,peak detection,baseline correction,quantification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Chemistry
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: matplotlib>=3.4.0
Requires-Dist: openpyxl>=3.0.0
Requires-Dist: pyyaml>=5.4
Requires-Dist: rainbow-api>=1.0.0
Requires-Dist: pybaselines>=1.0.0
Requires-Dist: lmfit>=1.2.0
Dynamic: license-file

# PeakPicker

[![PyPI](https://img.shields.io/pypi/v/hplc-peakpicker)](https://pypi.org/project/hplc-peakpicker/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)

HPLC chromatogram peak detection, baseline correction, deconvolution, and
calibration-curve quantification for Agilent ChemStation data.

```bash
pip install hplc-peakpicker
```

## Features

- **File reading**: Agilent Chemstation `.ch` files (format 130/131), `.D` folder scanning, Rainbow API support
- **Baseline correction**: ArPLS, weighted spline, hybrid valley-based strategies with quality evaluation
- **Peak detection**: Two-pass detection with configurable parameters
- **Peak deconvolution**: Gaussian and EMG (Exponentially Modified Gaussian) fitting via `lmfit`
- **Quantification**: Calibration curves, sample parsing, statistical analysis, batch processing
- **Export**: Excel reports and publication-quality plots

## Installation

```bash
pip install hplc-peakpicker        # from PyPI
pip install -U hplc-peakpicker     # upgrade to the latest release
```

From a clone (development):

```bash
conda activate PeakPicker
pip install -r requirements.txt
```

### Update notice

Building a workflow checks PyPI at most once a day (1.5 s timeout, silent when
offline) and prints a one-line upgrade hint to stderr when a newer release
exists. Ask explicitly with `peakpicker.check_for_update()`; turn the check off
with `PEAKPICKER_NO_UPDATE_CHECK=1` (it is also skipped under CI and pytest).

## Project Structure

```
src/
  peakpicker/          # Main package (clean architecture)
    application/       # Workflows and batch processing
    baseline/          # Baseline correction strategies
    config/            # Configuration dataclasses
    domain/            # Domain models and enums
    infrastructure/    # File I/O, exporters, signal processing
    peak_analysis/     # Peak detection and deconvolution
    quant/             # Quantification methods (public API: QuantMethod, StandardCurve)
```

## Lab-specific code: plugins

The library is generic. Sample-name conventions, quantification presets and
method-selection rules for a particular lab live outside this repository as
plugins and method YAMLs — see [docs/PLUGINS.md](docs/PLUGINS.md).

## Related

- [sci-toolkit](https://github.com/jahyunlee00299/sci-toolkit) — the lab's research
  skill bundle. Its `scripts/hplc_parser.py` is a stdlib-only port of this
  project's peak detection for quick trace reads; its `lab-data-analysis` skill
  routes full quantification here.

## Dependencies

numpy, pandas, scipy, matplotlib, openpyxl, lmfit, pybaselines, rainbow-api
