Skip to main content

A plugin for Nellie that counts label changes. One type of typically used fission and fusion metric.

Project description

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 nellie-plugin-fission-fusion

Usage

  1. Load an Image in Nellie:
    1. Before running the fission and fusion detection, load your imaging data into Nellie.
    2. Enable automatic voxel reassignment in the settings tab.
    3. Run the full analysis pipeline.
  2. Perform Voxel Reassignment (if not already done):
    1. If not already automatically completed, perform voxel reassignment in Nellie's preprocessing tab.
  3. Run Feature Extraction in Nellie:
    1. Ensure that organelle features have been extracted and saved. This is must be done after voxel reassignment.
  4. 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.

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

count_label_changes-0.1.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

count_label_changes-0.1.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file count_label_changes-0.1.2.tar.gz.

File metadata

  • Download URL: count_label_changes-0.1.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for count_label_changes-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f74e87daaaeb10e498ab4fc9ce302170289707b215c7c7d26146d2d2c304b26c
MD5 5ce0f3a18e0d9a0d3f3c62838cbdd011
BLAKE2b-256 9e98c9edd365a5331449af6cb954992cc7f250470bdd6473a85d945e74d2c5c8

See more details on using hashes here.

File details

Details for the file count_label_changes-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for count_label_changes-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a77583dc35c76806602c8b6e5c38a2b9e156e5859271ad20ff782cb18ea7bd37
MD5 25d5bb0394acc5af902eba4873622e7c
BLAKE2b-256 3b75f71f0b713b16a2164da7b31cb3c5295071849dc62147617c0635c4de145d

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