Skip to main content

A napari plugin for drawing PALM RoboSoftware elements using StarDist segmentation

Project description

🦇 Bruce

A napari plugin for creating PALMRobo elements using StarDist segmentation


Description

Bruce is a napari plugin for automated detection of cells of interest in PALM RoboSoftware images, enabling fast laser capture microdissection on the PALM MicroBeam system.

Key features:

  • Load 2-channel images and metadata from .zvi files produced by PALMRobo 4.9
  • Perform StarDist-based cell segmentation (default or user-defined models)
  • Allow manual editing of ROIs / elements in napari
  • Perform ROI overlap analysis between 2 channels
  • Export element list as .txt file compatible with PALMRobo 4.9

System requirements

  • Conda / Mamba (recommended)
  • Java (OpenJDK) – required for Bio-Formats .zvi → OME-TIFF conversion
  • GPU (optional) – for accelerated StarDist inference

Installation

Bruce requires a platform-specific Conda environment due to differences in native dependencies and GPU support. Predefined environment files are provided in the env/ directory:

| Platform                | Environment file                     |
|-------------------------|--------------------------------------|
| Windows (native)        | `env/bruce-env_windows_native.yml`   |
| macOS (Apple Silicon)   | `env/bruce-env_macos_arm.yml`        |

Open a terminal and run:

# Create the conda environment (replace <ENV_FILE> with the appropriate .yml file)
mamba env create -f <ENV_FILE>

# Activate the environment
mamba activate bruce-env

# Install Bruce from PyPI
pip install napari-bruce

# Launch Bruce via the command line
bruce

# Or launch Bruce directly from napari
napari --with napari-bruce

# Show help
bruce -h

Configuration

Bruce stores its configuration in a user-specific JSON file.

Available commands:

# Show config file path
bruce --show-config-path

# Open config in default editor
bruce --edit-config

# Reset config to defaults
bruce --reset-config

GPU support & StarDist models

Bruce runs StarDist predictions on the GPU when visible to TensorFlow, and supports user-defined StarDist models.

Available commands:

# Check whether GPU(s) are visible to TensorFlow
bruce --gpu-status

# List available StarDist models
bruce --list-models

# Add a user-defined StarDist model located at <MODEL_DIR>
bruce --add-model <MODEL_DIR>

Image annotation for model training

Bruce comes with a dedicated GUI to annotate 2-channel images produced by PALMRobo 4.9.

Available commands:

# Construct an image set from 2-channel .zvi files located at <IN_DIR> and save to <OUT_DIR>/imgs.pkl
bruce --zvi-to-dict <IN_DIR> <OUT_DIR>

# Open the annotation GUI to label the image set at <IN_DIR>/imgs.pkl and save image/mask pairs to <OUT_DIR>/imgs_annotated.pkl
bruce --annotate <IN_DIR> <OUT_DIR>

Example images

Example .zvi files are provided in the example_images/ directory for testing and demonstration purposes. They are not installed with the napari-bruce Python package.

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

napari_bruce-0.2.9.tar.gz (83.6 MB view details)

Uploaded Source

Built Distribution

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

napari_bruce-0.2.9-py3-none-any.whl (83.6 MB view details)

Uploaded Python 3

File details

Details for the file napari_bruce-0.2.9.tar.gz.

File metadata

  • Download URL: napari_bruce-0.2.9.tar.gz
  • Upload date:
  • Size: 83.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for napari_bruce-0.2.9.tar.gz
Algorithm Hash digest
SHA256 1a69263a855d7e60d209f440c90b20356a800277fc933b1257185e5440dac6fa
MD5 9c3c3a149e03e1d46185f54008d0e468
BLAKE2b-256 b4cfe2bf9ac26185f72543041423ab876c34569b5edcf38374d17ddeb1cd6f55

See more details on using hashes here.

File details

Details for the file napari_bruce-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: napari_bruce-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 83.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for napari_bruce-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c75a5f033fcc19d2b283cfd7be5656306bf269e253bbdba4e8fe94fa5ea7e562
MD5 0fc73f0ff1974f4461c73c6cd24dfaf2
BLAKE2b-256 8188af1c928a485a2d00e305ad39278220ba1b6e82bbbccdba4e0ed9be97871d

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