Package for analyzing microscopy data of channels. Outputs intensities averaged over the width of the channel.
Project description
Cell Size Regulation Dynamics Toolkit
This repository contains tools for analyzing cell size regulation dynamics by annotating single cells across generations. The workflow emphasizes a GUI-based approach for defining regions, saving plots, and managing analysis results.
Features
-
Channel Alignment and Preprocessing
- Rotate the image so the main channel is at the bottom.
- Cut unwanted frames to focus on the relevant data.
-
GUI-Based Region Definition
- Use an interactive GUI to define bounding boxes (bbox) for each channel.
-
Weight Map Calculation
- Generate equidistant lines throughout the bbox.
- Each pixel is assigned a value based on the length of its line of traversal within the bbox.
(See illustration below)
-
Data Storage
- Results are saved in a structured table for further analysis.
-
Visualization and Analysis
- Predefined plots for visualizing results.
- Out-of-the-box fitting for diffusion coefficient (D).
Installation Guide
1. Installing Python
For Windows
- Download the latest Python installer from the official Python website.
- Run the installer and make sure to check the option "Add Python to PATH" during the installation process.
- Verify the installation by running the following command in the Command Prompt:
python --version
For macOS
- Install Python using Homebrew (recommended). First, install Homebrew if you haven't already:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Python:
brew install python
- Verify the installation:
python3 --version
For Linux
- Use your package manager to install Python (if not already installed). For example:
sudo apt update sudo apt install python3 python3-pip
- Verify the installation:
python3 --version
2. Creating a Virtual Environment
-
Open a terminal (Command Prompt, PowerShell, or your OS-specific terminal).
-
Navigate to your project folder:
cd /path/to/your/project
-
Create a virtual environment:
python -m venv <your_venv_name>
This will create a folder named
your_venv_namein your project directory containing the isolated environment.Replace <your_venv_name> with the deisred name, for example:
python -m venv venv
-
Activate the virtual environment:
- Windows:
<your_venv_name>\Scripts\activate
- macOS/Linux:
source <your_venv_name>/bin/activate
- Windows:
-
Verify that the virtual environment is active:
- Your terminal prompt should now show
(venv)at the beginning. - Check the Python version in the environment:
python --version
- Your terminal prompt should now show
3. Installing the Toolkit
With the virtual environment active, install the cell-size-dynamics toolkit from PyPI:
pip install cell-size-dynamics
4. Installing Additional Dependencies
If you encounter missing dependencies or want to install optional packages for development, use the requirements.txt file if provided:
pip install -r requirements.txt
5. Deactivating the Virtual Environment
When you're done, deactivate the virtual environment to return to your system Python:
deactivate
By following these steps, you ensure that your project dependencies are managed cleanly and do not interfere with other Python projects on your system.
Workflow Instructions
0. Select steps from the main menu
- steps can be skipped, and every step which produces output is saved, so feel free to try out different things
1. Load Data
- Loading data from TIFF files. 4D, 2x3D (one for each channel), 1x3D (all in one folder with one for each time point), 2x2D (two folders with all imgs for one channel in one folder) is supported
2. Rotate the Main Channel
- Rotate the image so that the primary channel is at the bottom using the GUI elements provided.
3. Trim Frames
- Use the GUI to select and remove unwanted frames from the dataset.
4. Define Bounding Boxes
- Open the GUI to manually define bounding boxes (bbox) for each channel. This step allows for precise region targeting.
5. Generate Weight Maps
- The toolkit automatically generates equidistant lines within each defined bbox.
- How It Works:
- Each line is spaced equidistantly within the bbox.
- The value assigned to each pixel corresponds to the traversal length of its associated line. (see pictures below)
6. Save Results
- Results are saved in a tabular format for further analysis and reproducibility.
7. Visualization and Analysis
- Visualize results using predefined plot templates.
- Fit diffusion coefficients (D) directly using the integrated fitting tools.
Tips for Saving Plots
When saving plots, always use the matplotlib GUI elements for consistent file management and output quality.
Contribution
Feel free to contribute to this project by submitting pull requests or reporting issues. For questions, contact the repository maintainer.
Happy analyzing! 🎉
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 channelintensities-0.1.1.tar.gz.
File metadata
- Download URL: channelintensities-0.1.1.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1653a2552da81e2d77733f74e1ec25abd2397b375f4b66d61767fe6e806e8a
|
|
| MD5 |
bb69d832ebac13d09a6fda646032879c
|
|
| BLAKE2b-256 |
e3037c2be4fa4a45a05ac560fc9cac2e56770f0dc45752e5704caf556bdb13b5
|
File details
Details for the file channelintensities-0.1.1-py3-none-any.whl.
File metadata
- Download URL: channelintensities-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d21e19f653a42fac766e1eceadcb51e9b867eb5ef6cdd1ccc3042c750efc4b60
|
|
| MD5 |
c97d358036f94376b16feac5da56a8df
|
|
| BLAKE2b-256 |
fa78d14f2f1a52b5041a86c7a1834482948c4eefbcf8f835f74280182041bf7b
|