Overview
This module is designed to work within the Nellie-Napari ecosystem to detect organelle label changes between frames. One of the metrics for fission and fusion quantification. It leverages processed data from Nellie, performs event detection, and outputs the results for further analysis.
Tutorial
https://github.com/user-attachments/assets/8844b54e-8d8f-472d-bcda-500cb4e05389
Features
- Prerequisite Checks: Ensures all necessary data and preprocessing steps are completed before running the analysis.
- Event Detection: Calculates the number of fission (splitting) and fusion (merging) events of organelles across time frames.
- Data Output: Saves detailed per-frame event data to a CSV file for further analysis or visualization.
- User Feedback: Provides real-time notifications through Napari’s interface to guide users through the process.
Requirements
- Python 3.9 or higher
- Packages:
- nellie
- pandas
- Operating System:
- Cross-platform (Windows, macOS, Linux)
Installation
pip install count-label-changes
Usage
- Load an Image in Nellie:
- Before running the fission and fusion detection, load your imaging data into Nellie.
- Enable automatic voxel reassignment in the settings tab.
- Run the full analysis pipeline.
- Perform Voxel Reassignment (if not already done):
- If not already automatically completed, perform voxel reassignment in Nellie's preprocessing tab.
- Run Feature Extraction in Nellie:
- Ensure that organelle features have been extracted and saved. This is must be done after voxel reassignment.
- Run the plugin via
Plugins > Nellie Plugin > Count Label Changes.
Understanding the Detection Algorithm
The detection algorithm operates as follows:
Data Loading:
- Loads organelle feature data from a CSV file generated by Nellie.
Prequisite Verification:
- Checks if the image, organelle features, and reassigned labels are available.
- Ensures that voxel reassignment has been performed if required.
Event Calculation:
- Computes the number of unique organelle labels in each time frame.
- Calculates the difference in label counts between consecutive frames.
- Positive differences indicate fission events (organelles splitting).
- Negative differences indicate fusion events (organelles merging).
Result Compilation:
- Saves per-frame event data to a CSV file for detailed analysis.
Output
Notifications:
- Provides status updates and error messages through Napari’s show_info function.
CSV File:
- Saves a file named -label_changes.csv containing:
- t: Time frame index.
- label_differences: Difference in label counts compared to the total number of reassigned labels.
- events_per_frame: Number of events occurring in each frame.
Console Output:
- Displays a summary message with the total number of fission and fusion events and the path to the saved CSV file.
Troubleshooting
“No image loaded. Load one through Nellie.”:
- Ensure that an image is loaded in Nellie before running the detection script.
“No organelle features found. Run feature extraction through Nellie.”:
- Run the organelle feature extraction step in Nellie to generate the necessary data.
“No reassigned image found. Run voxel reassignment through Nellie.”:
- Perform voxel reassignment in Nellie.
“Rerun feature extraction after running voxel reassignment.”:
- After voxel reassignment, you need to rerun feature extraction to update the organelle features.
Metadata
Release files for count-label-changes 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| count_label_changes-0.1.3.tar.gz | 4.7 kB | Without provenance | Details for count_label_changes-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| count_label_changes-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for count_label_changes-0.1.3-py3-none-any.whl |
Total release size: 9.8 kB
Release files / count_label_changes-0.1.3.tar.gz
| Download URL | count_label_changes-0.1.3.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bc446705bf51b32748893fc624eb0d69871cc95046c7260fa445ec2ed22db31
|
|
BLAKE2b-256 checksum How to use checksums |
d579dbdc55d7dd345247c1cbcf77a5d6f023fd96e9f721ac1ac46be05a6db8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / count_label_changes-0.1.3-py3-none-any.whl
| Download URL | count_label_changes-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7f22ac9defb5732d7fe90de13235c211d1253e9de2d4dd06cbeec052c778eb1
|
|
BLAKE2b-256 checksum How to use checksums |
ce967e40725f894460e22bfc21260a94c875111af33b003a993eea3aa2bae675
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for count-label-changes 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.