[](https://pypi.org/project/mocca2/)

[](https://bayer-group.github.io/MOCCA/)
[](https://github.com/bayer-group/MOCCA/tree/example-data)
# Welcome to MOCCA2
MOCCA2 is a Python package for automatic processing of HPLC chromatograms.
To automate your workflow and get accurate results, MOCCA2 features:
- support for raw data files from Agilent, Shimadzu and Waters
- automatic baseline correction
- adaptive peak picking
- automatic purity checking and peak deconvolution
- compound tracking across chromatograms
- fully automatic processing of any number of chromatograms
## Documentation
Examples and detailed documentation are documented at [https://bayer-group.github.io/MOCCA](https://bayer-group.github.io/MOCCA).
## Getting Started
The latest version of MOCCA2 can be installed simply using pip:
```
pip install mocca2
```
Example data can be then downloaded using the following command:
```
python -m mocca2 --download-data
```
Now you are ready to process your first chromatogram!
```
from mocca2 import example_data
from matplotlib import pyplot as plt
# Load example data
chromatogram = example_data.example_1()
# Correct the baseline
chromatogram.correct_baseline()
# Crop the chromatogram to the region of interest, 1.4 to 1.8 minutes
chromatogram.extract_time(1.4, 1.8, inplace=True)
# Exclude low wavelengths that tend to be noisy - ignore everything below 220 nm
chromatogram.extract_wavelength(220, None, inplace=True)
# Find peaks in the chromatogram
chromatogram.find_peaks(min_height=2)
# Deconvolve the peaks
print("Deconvolving peaks, this migth take a minute...")
chromatogram.deconvolve_peaks(
model="FraserSuzuki", min_r2=0.999, relaxe_concs=False, max_comps=5
)
print("Deconvolved!")
# Plot the chromatogram
chromatogram.plot()
plt.show()
```
## Publications and MOCCA
This package is based on [MOCCA](https://github.com/HaasCP/mocca) package by [HaasCP](https://github.com/HaasCP). This work has been published by [Christian Haas et al. in 2023](https://doi.org/10.1021/acscentsci.2c01042).
Inspired by MOCCA, MOCCA2 features more Pythonic interface as well as adaptive and more accurate algorithms.
Publication featuring MOCCA2 is coming soon!
## Repository Details
This repository automates numerous workflows:
### Automatic testing
On push to `main`, all tests in the `tests` directory are automatically run. Currently, MOCCA2 is tested on Ubuntu with Python 3.10, 3.11 and 3.12.
### Docs
On push to `main`, the Sphinx docs are automatically compiled and published to [GitHub pages](https://bayer-group.github.io/mocca).
### Example data
The repository contains various example datasets:
- Knoevenagel condensation ([Christian Haas et al., 2023](https://doi.org/10.1021/acscentsci.2c01042))
- Cyanation screening ([Christian Haas et al., 2023](https://doi.org/10.1021/acscentsci.2c01042))
- Diterpene esters from coffee extracts ([Erny et al., 2021](https://doi.org/10.5281/zenodo.5412345))
- and various standalone chromatograms
Since these datasets don't fit into the PyPI package size limit, they are automatically compressed and published onto `example-data` branch on push to `main`.
The data can be automatically downloaded using ``python -m mocca2 --download-data``.
### Publishing to PyPI and GitHub
On push to `main`, the MOCCA2 package is automatically published to [PyPI](https://pypi.org/project/mocca2/) and [GitHub Releases](https://github.com/bayer-group/MOCCA/releases).
## Contributing
The process for contributing is outlined in [CONTRIBUTING.md](https://github.com/bayer-group/MOCCA/blob/main/CONTRIBUTING.md).
Raw data
{
"_id": null,
"home_page": null,
"name": "mocca2",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Jan Oboril <jan.oboril@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5b/53/4e49d121fb8c26daedf6b8cde781f33d0a803b9e3fdab0033cf647337f0e/mocca2-0.1.17.tar.gz",
"platform": null,
"description": "[](https://pypi.org/project/mocca2/)\n\n[](https://bayer-group.github.io/MOCCA/)\n[](https://github.com/bayer-group/MOCCA/tree/example-data)\n\n# Welcome to MOCCA2\n\nMOCCA2 is a Python package for automatic processing of HPLC chromatograms.\n\nTo automate your workflow and get accurate results, MOCCA2 features:\n - support for raw data files from Agilent, Shimadzu and Waters\n - automatic baseline correction\n - adaptive peak picking\n - automatic purity checking and peak deconvolution\n - compound tracking across chromatograms\n - fully automatic processing of any number of chromatograms\n\n\n## Documentation\n\nExamples and detailed documentation are documented at [https://bayer-group.github.io/MOCCA](https://bayer-group.github.io/MOCCA).\n\n## Getting Started\n\nThe latest version of MOCCA2 can be installed simply using pip:\n\n```\npip install mocca2\n```\n\nExample data can be then downloaded using the following command:\n\n```\npython -m mocca2 --download-data\n```\n\nNow you are ready to process your first chromatogram!\n\n```\nfrom mocca2 import example_data\nfrom matplotlib import pyplot as plt\n\n# Load example data\nchromatogram = example_data.example_1()\n\n# Correct the baseline\nchromatogram.correct_baseline()\n\n# Crop the chromatogram to the region of interest, 1.4 to 1.8 minutes\nchromatogram.extract_time(1.4, 1.8, inplace=True)\n\n# Exclude low wavelengths that tend to be noisy - ignore everything below 220 nm\nchromatogram.extract_wavelength(220, None, inplace=True)\n\n# Find peaks in the chromatogram\nchromatogram.find_peaks(min_height=2)\n\n# Deconvolve the peaks\nprint(\"Deconvolving peaks, this migth take a minute...\")\n\nchromatogram.deconvolve_peaks(\n model=\"FraserSuzuki\", min_r2=0.999, relaxe_concs=False, max_comps=5\n)\n\nprint(\"Deconvolved!\")\n\n# Plot the chromatogram\nchromatogram.plot()\nplt.show()\n```\n\n## Publications and MOCCA\n\nThis package is based on [MOCCA](https://github.com/HaasCP/mocca) package by [HaasCP](https://github.com/HaasCP). This work has been published by [Christian Haas et al. in 2023](https://doi.org/10.1021/acscentsci.2c01042).\n\nInspired by MOCCA, MOCCA2 features more Pythonic interface as well as adaptive and more accurate algorithms.\n\nPublication featuring MOCCA2 is coming soon!\n\n## Repository Details\n\nThis repository automates numerous workflows:\n\n### Automatic testing\nOn push to `main`, all tests in the `tests` directory are automatically run. Currently, MOCCA2 is tested on Ubuntu with Python 3.10, 3.11 and 3.12.\n\n### Docs\nOn push to `main`, the Sphinx docs are automatically compiled and published to [GitHub pages](https://bayer-group.github.io/mocca).\n\n### Example data\nThe repository contains various example datasets:\n - Knoevenagel condensation ([Christian Haas et al., 2023](https://doi.org/10.1021/acscentsci.2c01042))\n - Cyanation screening ([Christian Haas et al., 2023](https://doi.org/10.1021/acscentsci.2c01042))\n - Diterpene esters from coffee extracts ([Erny et al., 2021](https://doi.org/10.5281/zenodo.5412345))\n - and various standalone chromatograms\n\nSince these datasets don't fit into the PyPI package size limit, they are automatically compressed and published onto `example-data` branch on push to `main`. \n\nThe data can be automatically downloaded using ``python -m mocca2 --download-data``.\n\n### Publishing to PyPI and GitHub\nOn push to `main`, the MOCCA2 package is automatically published to [PyPI](https://pypi.org/project/mocca2/) and [GitHub Releases](https://github.com/bayer-group/MOCCA/releases).\n\n## Contributing\n\nThe process for contributing is outlined in [CONTRIBUTING.md](https://github.com/bayer-group/MOCCA/blob/main/CONTRIBUTING.md).\n",
"bugtrack_url": null,
"license": null,
"summary": "MOCCA2 is an open-source Python project to analyze HPLC-DAD raw data",
"version": "0.1.17",
"project_urls": {
"Homepage": "https://bayer-group.github.io/MOCCA/",
"Issues": "https://github.com/bayer-group/MOCCA/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "271ded1f67b3259f55e2944b4ac6be2e176fadb8908ab2cad2d3d181e050308b",
"md5": "ccbe919fa75cf25f7a7fe226f539a0a5",
"sha256": "7e06e3eb1ee9849fc1717ddfc6b081da6e55bd91c28099d24e5cbdf89b5dd843"
},
"downloads": -1,
"filename": "mocca2-0.1.17-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ccbe919fa75cf25f7a7fe226f539a0a5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 54123,
"upload_time": "2024-06-05T15:46:57",
"upload_time_iso_8601": "2024-06-05T15:46:57.533716Z",
"url": "https://files.pythonhosted.org/packages/27/1d/ed1f67b3259f55e2944b4ac6be2e176fadb8908ab2cad2d3d181e050308b/mocca2-0.1.17-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5b534e49d121fb8c26daedf6b8cde781f33d0a803b9e3fdab0033cf647337f0e",
"md5": "1ab123a5406dd8d34fede2c1b5200aca",
"sha256": "8901b91b07d62e42726cd07b7fcbdb45407bd4abdb48d3778ec758b85fdd80d7"
},
"downloads": -1,
"filename": "mocca2-0.1.17.tar.gz",
"has_sig": false,
"md5_digest": "1ab123a5406dd8d34fede2c1b5200aca",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 41883,
"upload_time": "2024-06-05T15:46:58",
"upload_time_iso_8601": "2024-06-05T15:46:58.939441Z",
"url": "https://files.pythonhosted.org/packages/5b/53/4e49d121fb8c26daedf6b8cde781f33d0a803b9e3fdab0033cf647337f0e/mocca2-0.1.17.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-05 15:46:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bayer-group",
"github_project": "MOCCA",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "scikit-learn",
"specs": []
},
{
"name": "pyyaml",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "matplotlib",
"specs": []
}
],
"lcname": "mocca2"
}