Skip to content

osvalB/pyphotomol

Repository files navigation

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

Install PyPhotoMol with pip:

pip install pyphotomol

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.

About

Python-package to analyze mass photometry count data

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published