Skip to main content

Python package to analyse mass photometry data

Project description

PyPhotoMol

Tests codecov Docs

Welcome to PyPhotoMol, a python-package to analyse mass photometry data.

Features

  • Data Import: Import HDF5 (.h5) and csv mass photometry data files, generated by Refeyn instruments (https://refeyn.com).
  • Histogram Analysis: Create histograms of mass or contrast distributions
  • Peak Detection: Automated peak finding in histograms using peak height, distance and prominence
  • Mass-Contrast Conversion: Convert between mass and contrast with calibration parameters
  • Gaussian Fitting: Fit multiple Gaussians to the histogram data
  • Comprehensive Logging: Track all operations with logbooks

Installation

PyPhotoMol requires Python 3.12 or later.

Install PyPhotoMol from PyPI with pip:

pip install pyphotomol

Verify the installation:

import pyphotomol
print(pyphotomol.__version__)

For development, clone the repository and install with uv:

git clone https://github.com/osvalB/pyphotomol.git
cd pyphotomol
uv sync --extra dev

Run tests and build the documentation:

uv run pytest
uv run build_docs.py

Quick Start

from pyphotomol import PyPhotoMol

# Create a new analysis instance
model = PyPhotoMol()

# Import data from an HDF5 file
model.import_file('data.h5')

# Create a histogram and detect peaks
model.create_histogram(use_masses=True, window=[0, 1000], bin_width=10)
model.guess_peaks(min_height=10, min_distance=4, prominence=4)

# Fit Gaussian models to detected peaks
model.fit_histogram(
    peaks_guess=model.peaks_guess,
    mean_tolerance=200,
    std_tolerance=300
)

# Create and view results
model.create_fit_table()
print(model.fit_table)

Acknowledgements

PyPhotoMol is derived from PhotoMol, an online tool presented in the following publication:

Niebling, Stephan, et al. "Biophysical Screening Pipeline for Cryo-EM Grid Preparation of Membrane Proteins." Frontiers in Molecular Biosciences 9 (2022): 903148.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

pyphotomol-1.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

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

pyphotomol-1.0-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file pyphotomol-1.0.tar.gz.

File metadata

  • Download URL: pyphotomol-1.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyphotomol-1.0.tar.gz
Algorithm Hash digest
SHA256 46875629da7b53db1d471056cbe3cab998b5821297d1653cea56de82d60351d4
MD5 4bc72ee4d93300e13d4a63e7d8b5b8c7
BLAKE2b-256 713e288cbf6403a2eb518ee2267f3f1d03afdf8d3808590f1167722077bfa067

See more details on using hashes here.

File details

Details for the file pyphotomol-1.0-py3-none-any.whl.

File metadata

  • Download URL: pyphotomol-1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyphotomol-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3ab6913f06f0213cc81cadc2bf05f50877e9fed20de88f7f8718aaca733b107
MD5 e9a98a08b92e83f900398f6b6cc5ad40
BLAKE2b-256 a75c7d26f96989d0a3fd570a00c9e742a47b034b219df22f67543d5896d508c0

See more details on using hashes here.

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