Skip to content

Basic Workflow Tutorial

This step-by-step tutorial will guide you through a complete bacterial cell analysis workflow using napari-mAIcrobe, from image loading to final report generation.

🎯 Tutorial Goals

By the end of this tutorial, you will: - Load and display bacterial images - Segment cells using Isodata thresholding or CellPose cyto3 - Perform morphological analysis - Perform cell cycle classification - Generate a report

πŸ“Š Dataset Overview

We'll use the included S. aureus sample data featuring Phase contrast, Membrane fluorescence, and DNA fluorescence.


πŸš€ Step-by-Step Workflow

Step 1: Launch napari and Load Data

GUI method

napari
File β†’ Open Sample β†’ mAIcrobe β†’ select Phase, Membrane, DNA.

Loading Sample Data

Programmatic method

import napari
from napari_mAIcrobe._sample_data import phase_example, membrane_example, dna_example
viewer = napari.Viewer()
ph = viewer.add_image(phase_example()[0][0], **phase_example()[0][1])
me = viewer.add_image(membrane_example()[0][0], **membrane_example()[0][1])
dn = viewer.add_image(dna_example()[0][0], **dna_example()[0][1])


Step 2: Cell Segmentation

Open Plugins β†’ mAIcrobe β†’ Compute label and configure:

Base Image: Phase
Fluor 1: Membrane
Fluor 2: DNA
Model: Isodata (or CellPose cyto3)

Click Run. Two new layers appear: Mask and Labels.

Segmentation Result


Step 3: Comprehensive Cell Analysis

Open Plugins β†’ mAIcrobe β†’ Compute cells and set:

Label Image: Labels
Membrane Image: Membrane
DNA Image: DNA
Classify cell cycle: βœ“
Model: S.aureus DNA+Membrane Epi
Generate Report: βœ“
Report path: [output directory]

Run analysis. Labels properties are populated, a table opens, and an HTML report is saved.


Step 4: Explore Analysis Results

View properties in the Labels layer. Filter with Plugins β†’ mAIcrobe β†’ Filter cells, add filters, and inspect the new "Filtered cells" layer.

Properties Panel


Step 5: Generate and Review Report

If enabled, review the HTML report and CSV saved in the chosen folder.


πŸŽ‰ Next Steps