Metadata-Version: 2.4
Name: cellstate-pred
Version: 0.1.0
Summary: Predict cell state (hypusine marker) based on deep learning morphological features
Author-email: avillanueva <avillanueva@cemm.at>
License: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Project-URL: homepage, https://github.com/rendeirolab/cellstate-pred
Project-URL: documentation, https://github.com/rendeirolab/cellstate-pred/blob/main/README.md
Project-URL: repository, https://github.com/rendeirolab/cellstate-pred
Keywords: computational biology,bioinformatics
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Development Status :: 3 - Alpha
Classifier: Typing :: Typed
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: anndata>=0.11.4
Requires-Dist: cloudpickle>=3.1.1
Requires-Dist: datasets>=4.1.1
Requires-Dist: fa2-modified>=0.3.10
Requires-Dist: fastcluster>=1.2.6
Requires-Dist: igraph>=0.11.9
Requires-Dist: imagecodecs>=2025.3.30
Requires-Dist: ipykernel>=6.30.1
Requires-Dist: jupyterlab>=4.4.7
Requires-Dist: leidenalg>=0.10.2
Requires-Dist: matplotlib>=3.10.3
Requires-Dist: networkx>=3.4.2
Requires-Dist: numpy>=1.26.4
Requires-Dist: pandas>=2.3.0
Requires-Dist: parmap>=1.7.0
Requires-Dist: pingouin>=0.5.5
Requires-Dist: pooch>=1.8.2
Requires-Dist: pyarrow>=20.0.0
Requires-Dist: pymde>=0.1.18
Requires-Dist: scanpy>=1.11.3
Requires-Dist: scikit-image>=0.25.2
Requires-Dist: scikit-learn>=1.7.0
Requires-Dist: scipy>=1.15.3
Requires-Dist: seaborn>=0.13.2
Requires-Dist: seaborn-extensions>=0.2.1
Requires-Dist: tifffile>=2025.5.10
Requires-Dist: tqdm>=4.67.1
Requires-Dist: transformers>=4.56.2
Requires-Dist: umap-learn>=0.5.9.post2

# 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

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

## Quick Start

```python
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](https://github.com/rendeirolab/_project_template), version 0.4.1dev.

## License

[Add your license information here]
