Metadata-Version: 2.4
Name: openproteo-io
Version: 1.2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Dist: numpy>=1.23
Requires-Dist: pyarrow>=14 ; extra == 'arrow'
Requires-Dist: pytest>=7 ; extra == 'test'
Requires-Dist: numpy>=1.23 ; extra == 'test'
Requires-Dist: pyarrow>=14 ; extra == 'test'
Provides-Extra: arrow
Provides-Extra: test
Summary: Vendor-neutral mass-spec I/O: Thermo / Bruker / Waters to mzML, with Arrow streaming. Python bindings to the openproteo-io Rust crate.
Keywords: mass-spectrometry,mzml,proteomics,thermo,bruker,waters
Author-email: Nathan Riley <git@nathanriley.com>
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/Sigilweaver/OpenProteo

# openproteo-io (Python)

Python bindings for the [`openproteo-io`](https://github.com/Sigilweaver/OpenProteo)
Rust crate. Detect a Thermo / Bruker / Waters acquisition on disk, convert
it to mzML, or stream spectra as zero-copy NumPy arrays / pyarrow record
batches.

```python
import openproteo_io as opio

fmt = opio.detect("sample.raw")        # -> "thermo" | "bruker" | "waters" | None
opio.to_mzml("sample.raw", "sample.mzML", indexed=True)

for spec in opio.iter_spectra("sample.raw"):
    print(spec.native_id, spec.ms_level, spec.mz.shape)

# Optional Arrow stream (requires pyarrow):
reader = opio.read_arrow("sample.raw", batch_size=1024)
for batch in reader:
    print(batch.num_rows)
```

Build from source:

```
pip install maturin
maturin develop --release
```

