tooluniverse-image-analysis

Analyze microscopy images and image-derived measurement data with segmentation, quantification, and statistical testing.

1.7k|254|Updated Mar 3, 2025
One-click install
npx skills add https://github.com/mims-harvard/ToolUniverse --skill tooluniverse-image-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tooluniverse-image-analysis
Source: https://github.com/mims-harvard/ToolUniverse/tree/main/plugins/tooluniverse/skills/tooluniverse-image-analysis
Command: npx skills add https://github.com/mims-harvard/ToolUniverse --skill tooluniverse-image-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, scikit-image, tifffile, statsmodels, patsy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Analyzing microscopy data requires combining image segmentation, fluorescence quantification, and rigorous statistics, which is error-prone when done manually across ImageJ, CellProfiler outputs, and raw TIFF images.

Core Features & Use Cases

  • Cell and Colony Segmentation: Count nuclei and cells with Otsu thresholding and watershed segmentation, and measure colony morphometry (area, circularity, roundness) from TIFF/PNG images.
  • Fluorescence Quantification: Measure per-object intensity across multiple channels, compute channel ratios, and run Pearson/Manders colocalization analysis.
  • Statistical Analysis of Image-Derived Data: Run t-tests, ANOVA, Dunnett's test, Cohen's d, power analysis, and polynomial/spline regression on CSV/TSV outputs from ImageJ or CellProfiler.
  • Use Case: Given a folder of bacterial swarming plate images, segment colonies, compute mean area and circularity per genotype, and run Dunnett's test to find which mutants differ from wildtype.

Quick Start

Analyze the microscopy CSV files in my data folder to compare colony circularity across genotypes and report which genotype has the largest mean area.

Frequently Asked Questions about tooluniverse-image-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I count cells in fluorescence microscopy images with Python?

Use scikit-image to threshold the image with Otsu's method, remove small objects, then label connected components. For touching cells, apply a distance transform with watershed segmentation to separate merged nuclei before counting.

How to quantify fluorescence intensity across multiple channels?

Segment objects from one channel (e.g., DAPI) to create a labeled mask, then use skimage measure.regionprops_table with each channel as the intensity image. Compute mean, max, and integrated intensity per object per channel, and derive channel ratios.

What is the difference between Otsu and Li thresholding for segmentation?

Otsu works best for high-contrast images with clear bimodal histograms, while Li's method is more sensitive for low-contrast or faint objects. For uneven illumination, use adaptive local thresholding instead of either global method.

Can I run Dunnett's test in Python instead of R?

Yes, scipy.stats.dunnett (scipy >= 1.10) replaces R's multcomp::glht for comparing multiple groups against a control. For natural splines, use patsy.cr with explicit quantile knots instead of R's ns().

Why does watershed segmentation over-split or merge my cells?

Over-segmentation happens when min_distance between peaks is too small or smoothing is insufficient; increase min_distance or Gaussian sigma. Under-segmentation (merged cells) results from min_distance being too large or weak distance-transform peaks.

When should I not use this image analysis approach?

This workflow is not suited for phylogenetics, RNA-seq differential expression, or single-cell scRNA-seq analysis. For very dense or irregularly shaped cells, deep-learning tools like CellPose or StarDist may outperform threshold-based segmentation.