Skip to main content

msbuddy

Maintainer PyPI PyPI Downloads

msbuddy logo

msbuddy annotates molecular formulas for small molecules (below 1500 Da) from mass spectrometry data. It accepts precursor m/z alone, MS1 isotope patterns, MS/MS spectra, or combinations of these inputs in positive or negative ionization mode. A precursor m/z and polarity are the minimum input.

Documentation · PyPI · Version updates and validation

Install

pip install msbuddy

The standard model and formula databases download on first use (about 27 MB in version 1.4). Inference runs on CPU; PyTorch and CUDA are not required.

Python quick start

from msbuddy import Msbuddy, MsbuddyConfig

engine = Msbuddy(MsbuddyConfig(ms_instr="orbitrap"))
engine.load_mgf("input_file.mgf")
engine.annotate_formula()
results = engine.get_summary()

Use ms_instr="tof" for both QTOF and timsTOF, or "fticr" as appropriate. The older "qtof" and "timstof" settings remain accepted aliases for "tof". Acquisition metadata are optional. See the quick start and configuration guide for other inputs and settings.

Halogens are searched by default. Set MsbuddyConfig(halogen=False) only when prior knowledge rules out F, Cl, Br, and I. Reported confidence values are model-based estimates; validation and limitations explain their use.

MS/MS spectra can also be loaded by USI. A demo MGF and API reference are available. The API also supports direct formula mass searches and fragment subformula annotation.

Command line

msbuddy -mgf input_file.mgf -output results -ms orbitrap -details

Run msbuddy --help for options. The command-line guide covers USIs, batch input, parallel processing, and exports.

Upgrading and contributing

See the migration guide when upgrading older scripts. Release details are in the version updates and changelog.

The annotation pipeline is in msbuddy/ and tests are in tests/. Run python -m unittest discover -s tests -v after installing development dependencies. See the development guide.

Citation

S. Xing et al. BUDDY: molecular formula discovery via bottom-up MS/MS interrogation. Nature Methods (2023). DOI: 10.1038/s41592-023-01850-x

License and contact

Apache License 2.0. Contact: sxing@fudan.edu.cn.

Metadata

Release files for msbuddy 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msbuddy 1.4.1
File Size Uploaded Provenance Actions
msbuddy-1.4.1.tar.gz 142.8 kB Without provenance Details for msbuddy-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msbuddy 1.4.1
File Interpreter ABI Platform Actions
msbuddy-1.4.1-py3-none-any.whl Python 3 none any Details for msbuddy-1.4.1-py3-none-any.whl

Total release size: 228.7 kB

Release files / msbuddy-1.4.1.tar.gz

Download URL msbuddy-1.4.1.tar.gz
Size 142.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b4e0671d69e6a0f4fb427a20a38ebf0a0495a5a5411e6c36b5ad8b2ddbd83480
BLAKE2b-256 checksum
How to use checksums
9d9dc0bf7c01ad700d7b73b74698c5e85d2783e69e8317eab6687236ac31a7a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release files / msbuddy-1.4.1-py3-none-any.whl

Download URL msbuddy-1.4.1-py3-none-any.whl
Size 85.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef3f06f08ff97eb812a23976bb89a69360fe02e2cf8d0979205f1c8d8f8b8c73
BLAKE2b-256 checksum
How to use checksums
6f3a0ce889668bfe002cd663952921fec08e7ca6933bdddfb9a0171c5d2e98fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Security for msbuddy 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page