Python Package for the Spatial and Temporal Analysis of Spheroid Imaging Data
Project description
SpheroidPy
Overview
SpheroidPy is a Python package designed for the management and analysis of in-vitro spheroid data.
It offers a framework to facilitate the handling, segmentation, and analysis of extensive collections of spheroid microscopy images.
Furthermore, it enables users to extract spatial and temporal features gaining insights into the dynamics of underlying biological processes.
While primarily developed and optimized for cancer spheroid proliferation and cytotoxicity assays, it can be adapted to other cell entities and three-dimensional assay systems.
Applications
Proliferation Assays
Proliferation assays are essential for studying growth kinetics in three-dimensional spheroid cultures. Besides simple growth curves, more complex behaviors - such as the emergence of a necrotic core at a critical radius $R_c$ or saturation at large sizes - can be assessed from such data.
SpheroidPy facilitates data import, spheroid segmentation, and comprehensive analysis of growth dynamics, including automated statistical evaluations.
Prerequisits
To ensure a clean and reproducible setup, we recommend installing the package inside a dedicated Conda environment. Begin by installing Anaconda, then create and activate a new environment using the commands below. This can be done in a Anaconda Prompt (Windows) or Terminal (Mac/Linux) and guarantees that all dependencies—including optional deep-learning frameworks—are isolated from your system installation.
conda create -n spheroidpy python=3.10
conda activate spheroid
Optionally, Jupyter Notebook can be installed if not already available:
conda install jupyter
Installation
Using PyPI
SpheroidPy is available on PyPI and can be installed using the following command
pip install SpheroidPy
From Source
Alternatively, the package can be installed directly from source. Therefore, the repository has to be downloaded. After navigating to the folder containing package, it can be installed using
cd path/to/SpheroidPy # navigate to the parent folder
pip install . # install the package
Usage
After installation, SpheroidPy can be used to analyze spheroid microscopy data following a hierarchical workflow from single images to full experiments.
At the core, individual microscopy images are represented by SpheroidImage objects, which provide functionality for segmentation and feature extraction:
from SpheroidPy.spheroid import SpheroidImage
spheroid = SpheroidImage(
brightfield='path/to/image.tif',
image_size=(1700, 1270)
)
spheroid.segmentation()
radius = spheroid.radius
Time-resolved measurements of the same spheroid can be organized in a SpheroidSeries, enabling the analysis of temporal dynamics:
from SpheroidPy.spheroid import SpheroidSeries
series = SpheroidSeries("Example")
series.add_spheroid_image(spheroid, timestamp)
series.segmentation()
series.metric('radius', plot=True)
Multiple series (e.g., technical replicates) can be combined in a SpheroidCollection for statistical evaluation:
from SpheroidPy.spheroid import SpheroidCollection
collection = SpheroidCollection("Collection", [series])
collection.metric('radius', mean=True)
For structured comparison across experimental conditions, collections can be grouped in a Result:
from SpheroidPy.experiment import Result
result = Result("Experiment", condition="concentration")
result.add_collection(collection, condition=0)
At the highest level, complete workflows can be organized and persisted using the Experiment class:
from SpheroidPy import Experiment
experiment = Experiment(name="MyExperiment", path="path/to/project")
For high-throughput live-cell imaging experiments, dedicated LiveCellReplicate and Platemap classes enable structured handling of microwell plate layouts, automated image assignment, and condition-based grouping of wells:
replicate = result.replicate('Replicate1', layout=96)
replicate.platemap.cell_line('CellLineA', {'B2:G3':0, 'B4:G5':10})
replicate.load_images('path/to/data', ['PhaseContrast'], ['green'], ['red'],
image_size=(1700,1270))
Overall, SpheroidPy enables a consistent transition from single-image analysis to large-scale, reproducible experiments within a unified framework.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spheroidpy-0.1.0.tar.gz.
File metadata
- Download URL: spheroidpy-0.1.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c518b12d4ec272ccceb5800761e5398b3c9a043877949b0eeddb30b07676620
|
|
| MD5 |
af49318f2bac354f2dcb4f4eb502cd58
|
|
| BLAKE2b-256 |
65e045fe1da5c12edabaeff3b7047f60b34ec45ab0c812cc1e82334b034aa2c7
|
File details
Details for the file spheroidpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spheroidpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0beb789ca62687df26cbfa4049d26517c218b5c35d4e3d39cb7c631c9872d61
|
|
| MD5 |
41db23dd01a186c00a47050a7e36dead
|
|
| BLAKE2b-256 |
01771713e2377ff743aaf0dfa16147314acffc255e856295cf5537c7bf040b63
|