Skip to main content

Rust parser for Thermo Fisher RAW mass spectrometry files

Project description

opentfraw -- Python bindings

Python bindings for the OpenTFRaw Rust crate. Reads Thermo Fisher .raw mass spectrometry files via a NumPy-friendly API.

Install (from source)

cd python
pip install maturin
maturin develop --release

Quickstart

import opentfraw

raw = opentfraw.RawFile("experiment.raw")
print(len(raw), raw.instrument_model)

# Per-scan metadata + peaks as numpy arrays
s = raw.scan(1)
print(s["ms_level"], s["retention_time"], s["filter_string"])
mz = s["mz"]              # numpy.float64[:]
intensity = s["intensity"] # numpy.float32[:]

# Convert to mzML
raw.to_mzml("experiment.mzML")

API

  • RawFile(path) — load a .raw file
  • .num_scans, .first_scan, .last_scan, .instrument_model, .path
  • .peaks(scan_number) -> (mz, intensity) — fast centroided arrays
  • .scan_filter(scan_number) -> str | None — Thermo scan filter string
  • .scan(scan_number) -> dict — full per-scan metadata + arrays
  • .iter_scans() -> list[dict] — every scan as dicts
  • .to_mzml(out_path) — write mzML 1.1.0

This is an early preview. Feedback welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentfraw-1.0.0.tar.gz (236.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

opentfraw-1.0.0-cp38-abi3-win_amd64.whl (254.7 kB view details)

Uploaded CPython 3.8+Windows x86-64

opentfraw-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (401.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

opentfraw-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (392.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

opentfraw-1.0.0-cp38-abi3-macosx_11_0_arm64.whl (352.2 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

opentfraw-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl (355.0 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file opentfraw-1.0.0.tar.gz.

File metadata

  • Download URL: opentfraw-1.0.0.tar.gz
  • Upload date:
  • Size: 236.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opentfraw-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2c8ebb6f865aad3b8a13c40b4b351b7c478f48e7ecf7ad06975ae501c2d4c400
MD5 9507bb92d9e9ed0a747ee181bb62f666
BLAKE2b-256 554a1df0c176a261dd0c7d8af7891c98b3329e4ea6215e3825164a43e907db5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentfraw-1.0.0.tar.gz:

Publisher: publish.yml on Sigilweaver/OpenTFRaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentfraw-1.0.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: opentfraw-1.0.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 254.7 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opentfraw-1.0.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b2d7e8725291855f927841eedde95aa7f02f8c65af99350299a7ebf1f2596c4c
MD5 8e47267c23e90791e4df01b0ec9fee81
BLAKE2b-256 20612fea23657df1506407c10565393d0fcd6fcdc5e252274e06137cdfa62160

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentfraw-1.0.0-cp38-abi3-win_amd64.whl:

Publisher: publish.yml on Sigilweaver/OpenTFRaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentfraw-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for opentfraw-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a6c2d9c0bf0925a00ed3ecfbb38de28f63ccf2ec153ca1d79ab3a6d21e36d7d
MD5 30aa7f1ba691e702a0d1ab09b6fed431
BLAKE2b-256 6b259ea24bfbf0d76da0e4a9e3f834809fc601957d2f8071a1262d9ef3d47674

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentfraw-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenTFRaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentfraw-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for opentfraw-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3ef753af38eba4fe22b19401640526c13dbccc8d87a4394217f90b90a816e2f3
MD5 37c762dfc1165f6153da95e0e03bc9e1
BLAKE2b-256 8629003b15eb2d5955709f92cc15477d7a23759dc39cab6cee58e1fa4e3dc186

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentfraw-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish.yml on Sigilweaver/OpenTFRaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentfraw-1.0.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for opentfraw-1.0.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2fe0a2c56b7a56fa1c1684211fcb9df92f46b014ec5fb21ac63c20f9f0a16bb
MD5 b0740d9dc1fb270f896dfb2ea19df61b
BLAKE2b-256 8f9f46f3fb3818f1e1308ed361ab01b7d9ab462ac96c8a6814a72ce1e0bb5598

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentfraw-1.0.0-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on Sigilweaver/OpenTFRaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentfraw-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for opentfraw-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 07cc9dfff771b4352a26434abe1b49cd43ee8d1078d7f6570b45fbdbefa1e4c8
MD5 f06b3696e2e698ed74be4ae85b45db43
BLAKE2b-256 727f7dfc7f0bb24f4d214cb75b1d8b2cb2ef2efdc96fff77f265f56e0baa566c

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentfraw-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenTFRaw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page