Skip to main content

Predict cell state (hypusine marker) based on deep learning morphological features

Project description

cellstate-pred

A Python package for cell segmentation from drug assays and inference with pretrained deep learning models.

Overview

cellstate-pred is designed to analyze microscopy images from drug screening assays by automatically segmenting individual cells and extracting morphological features using pretrained deep learning models. The package provides tools for:

  • Cell Segmentation: Automated segmentation of cells from microscopy images using advanced image processing techniques
  • Feature Extraction: Extraction of morphological features from segmented cells using pretrained deep learning models
  • Drug Assay Analysis: Specialized workflows for analyzing cellular responses in drug screening experiments

Key Features

  • Support for Opera microscope image formats
  • Otsu thresholding and watershed segmentation for robust cell detection
  • Integration with Hugging Face transformers for feature extraction
  • Batch processing capabilities for high-throughput analysis
  • Flexible data loading with PyTorch DataLoader integration

Installation

Requirements

  • Python 3.10+
  • Dependencies as specified in pyproject.toml

Install from source

git clone https://github.com/rendeirolab/cellstate-pred.git
cd cellstate-pred
pip install -e .

Quick Start

from cellstate_pred.image_utils import OperaImage
from cellstate_pred._inference import inference
from pathlib import Path

# Load and segment cells from a microscopy image
image = OperaImage()
image.load_image("path/to/your/image.tiff")
image.segment_cells(min_distance=7)

# Extract features using a pretrained model
inference(
    batch_size=32,
    image=image,
    model_name="microsoft/resnet-50",
    output_dir=Path("./features"),
    num_workers=4
)

Documentation

For detailed usage examples and API documentation, see the notebooks in the scripts/ directory.

Contributing

This repository was created with a cookiecutter template, version 0.4.1dev.

License

[Add your license information here]

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

cellstate_pred-0.1.0.tar.gz (587.9 kB view details)

Uploaded Source

Built Distribution

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

cellstate_pred-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file cellstate_pred-0.1.0.tar.gz.

File metadata

  • Download URL: cellstate_pred-0.1.0.tar.gz
  • Upload date:
  • Size: 587.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for cellstate_pred-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eded165ae823e7c28fd2a6c784aebf1aace92d78f08d88da45c55ea38a66662e
MD5 275063820be43983d970716de0289ea2
BLAKE2b-256 66e64b547a30bd9fdb417a6cc52e6a8be7959a9e20e57d110a95b130f4358bee

See more details on using hashes here.

File details

Details for the file cellstate_pred-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cellstate_pred-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a6143f025cd253643ec0434218595c25682c749cc5feea33466980959092cc0
MD5 638b01c285a702aa0ace80bc606d6f54
BLAKE2b-256 3f564e23575916131d3d4de62cb1499ca5686ebf4ffa959d824ba7d3d010308a

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