{
  "name": "napari-colocalization",
  "display_name": "Colocalization",
  "visibility": "public",
  "icon": null,
  "categories": [],
  "schema_version": "0.3.0",
  "on_activate": null,
  "on_deactivate": null,
  "contributions": {
    "commands": [
      {
        "id": "napari-colocalization.make_widget",
        "title": "Open Colocalization Analysis",
        "python_name": "napari_colocalization._widget:ColocalizationWidget",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      },
      {
        "id": "napari-colocalization.make_sample_data",
        "title": "Load 2D colocalization sample",
        "python_name": "napari_colocalization._sample_data:make_sample_data",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      },
      {
        "id": "napari-colocalization.make_sample_data_3d",
        "title": "Load 3D colocalization sample",
        "python_name": "napari_colocalization._sample_data:make_sample_data_3d",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      },
      {
        "id": "napari-colocalization.make_sample_data_cbs006rbm",
        "title": "Load CBS006RBM colocalization sample",
        "python_name": "napari_colocalization._sample_data:make_sample_data_cbs006rbm",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      },
      {
        "id": "napari-colocalization.make_sample_data_coloc",
        "title": "Load red/green confocal colocalization sample",
        "python_name": "napari_colocalization._sample_data:make_sample_data_coloc",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      }
    ],
    "readers": null,
    "writers": null,
    "widgets": [
      {
        "command": "napari-colocalization.make_widget",
        "display_name": "Colocalization Analysis",
        "autogenerate": false,
        "default_dock_area": "right",
        "tabify": false
      }
    ],
    "sample_data": [
      {
        "command": "napari-colocalization.make_sample_data",
        "key": "coloc_sample_v1",
        "display_name": "Colocalization sample (2D)"
      },
      {
        "command": "napari-colocalization.make_sample_data_3d",
        "key": "coloc_sample_v1_3d",
        "display_name": "Colocalization sample (3D)"
      },
      {
        "command": "napari-colocalization.make_sample_data_cbs006rbm",
        "key": "coloc_sample_cbs006rbm",
        "display_name": "CBS006RBM (colocalization benchmark)"
      },
      {
        "command": "napari-colocalization.make_sample_data_coloc",
        "key": "coloc_sample_rg",
        "display_name": "Confocal red/green dyes (tutorial)"
      }
    ],
    "themes": null,
    "menus": {},
    "submenus": null,
    "keybindings": null,
    "configurations": {}
  },
  "package_metadata": {
    "metadata_version": "2.4",
    "name": "napari-colocalization",
    "version": "0.4.0",
    "dynamic": [
      "license-file"
    ],
    "platform": null,
    "supported_platform": null,
    "summary": "Colocalization analysis of multi-channel images",
    "description": "<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/logo.png\" alt=\"napari-colocalization logo\" width=\"160\"/>\n</p>\n\n# napari-colocalization\n\n[![License MIT](https://img.shields.io/pypi/l/napari-colocalization.svg?color=green)](https://github.com/DBI-INFRA/napari-colocalization/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-colocalization.svg?color=green)](https://pypi.org/project/napari-colocalization)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-colocalization.svg?color=green)](https://python.org)\n[![tests](https://github.com/DBI-INFRA/napari-colocalization/workflows/tests/badge.svg)](https://github.com/DBI-INFRA/napari-colocalization/actions)\n[![codecov](https://codecov.io/gh/DBI-INFRA/napari-colocalization/branch/main/graph/badge.svg)](https://codecov.io/gh/DBI-INFRA/napari-colocalization)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-colocalization)](https://napari-hub.org/plugins/napari-colocalization)\n[![npe2](https://img.shields.io/badge/plugin-npe2-blue?link=https://napari.org/stable/plugins/index.html)](https://napari.org/stable/plugins/index.html)\n\n> ⚠️ **Under construction - pre-alpha.** APIs, UI, and outputs may change\n> without notice. Not recommended for production analysis yet; use at your\n> own risk and please report rough edges via the\n> [issue tracker](https://github.com/DBI-INFRA/napari-colocalization/issues).\n\nInteractive intensity-colocalization analysis for [napari](https://napari.org).\nPick two channels (or one multi-channel image), optionally restrict the\nanalysis to a region drawn as shapes or labels, choose your metric, and get a\nresults table plus an intensity-vs-intensity density plot.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/widget_overview.png\" alt=\"napari-colocalization widget\" width=\"780\"/>\n</p>\n\n## Features\n\n- **Five colocalization metrics**, spanning both families: three of\n  *correlation* — Pearson (PCC), Spearman rank (SRCC) and Li's Intensity\n  Correlation Quotient (ICQ) — and two of *co-occurrence* — Manders'\n  overlap coefficient with split coefficients (r, k1, k2) and Manders'\n  thresholded coefficients tM1/tM2. Pearson and Manders are on by default,\n  one from each family.\n- **Pairwise or all-to-all** mode: analyse two grayscale layers, or every\n  channel pair within a single multi-channel layer.\n- **2D and 3D** support natively (no time-series for now).\n- **Region-restricted analysis** via a Shapes or Labels layer - each non-zero\n  region is reported on its own row, computed on that region's bounding-box\n  crop so masks with many regions stay fast.\n- **Manders thresholds**: choose **Costes auto** (orthogonal-regression\n  bisection, matched to Fiji Coloc 2), a per-channel **auto-threshold**\n  (Otsu, Li, Triangle, Yen, Mean, IsoData → thresholded tM1/tM2), or **Manual**.\n- **Per-Z-slice mode**: analyse each plane of a stack separately (one row\n  per slice), à la JACoP B's \"consider Z slices separately\".\n- **Interactive results**: in-widget table with numeric sorting and per-column\n  header tooltips, density plot of the selected row, multi-row selection that\n  highlights all matching shapes/labels in the viewer, and an optional\n  **fixed-axes** cytofluorogram for comparable plots. Plots follow napari's\n  light/dark theme.\n- **Cancellable runs**: analysis runs on a background thread with a progress\n  bar; the Run button turns into **Cancel** while a run is in flight.\n- **Diagnostics tab**: single-pair diagnostic plots - Costes randomization\n  significance test (observed PCC vs a scrambled null, with p-value/z-score),\n  Van Steensel cross-correlation function (CCF), and Li intensity correlation\n  analysis (ICA).\n- **Object-based tab**: compare segmented objects (from Labels layers or by\n  thresholding) - centre-particle coincidence and object overlap per object,\n  with centroid Points and nearest-neighbour Vectors drawn into the viewer.\n- **Outputs to the viewer**: add the colocalized-pixel mask (selected row) as\n  a Labels layer, or a block-scrambled example as an Image layer.\n- **CSV export** of the current table, plus **figure export** of the\n  density plot (PNG / PDF / SVG / TIFF, configurable size and DPI).\n\n## Installation\n\n```bash\npip install napari-colocalization\n```\n\nIf napari isn't already installed, install both at once:\n\n```bash\npip install \"napari-colocalization[all]\"\n```\n\nFor the latest development version:\n\n```bash\npip install git+https://github.com/DBI-INFRA/napari-colocalization.git\n```\n\n## Quick start\n\n1. Launch napari.\n2. Load sample data: **File → Open Sample → napari-colocalization →\n   Colocalization sample (2D)**. A 3D synthetic sample and **CBS006RBM**\n   (a two-channel benchmark image from the\n   [Colocalization Benchmark Source](https://colocalization-benchmark.com))\n   are also provided.\n\n   <p align=\"center\">\n     <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/quickstart_sample.png\" alt=\"Open Sample menu\" width=\"520\"/>\n   </p>\n\n3. Open the widget: **Plugins → Colocalization Analysis**. Two image layers\n   `channel_a` and `channel_b` are auto-selected for pairwise mode, with\n   **Pearson** and **Manders** checked and the Manders threshold group\n   (**Costes (auto)**) below them.\n\n4. Click **Run**. A progress bar tracks the run - the button reads **Cancel**\n   until it finishes. The results table then populates with a single row (the\n   whole image), and the density plot below shows the intensity pairs with the\n   metric values overlaid.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/widget_overview.png\" alt=\"napari-colocalization widget\" width=\"780\"/>\n</p>\n\n5. *(Optional)* Add a Shapes layer, draw a few rectangles or polygons, set\n   **Region** to *Shapes* and pick the layer. Re-run - the table now has one\n   row per shape, and clicking a row highlights the matching shape in the\n   viewer.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/widget_shapes.png\" alt=\"napari-colocalization widget\" width=\"780\"/>\n</p>\n\nSee [docs/usage.md](docs/usage.md) for the full walkthrough.\n\n## Diagnostics\n\nThe **Diagnostics** tab runs single-pair diagnostic plots that go beyond a\nsingle number per region: the **Costes randomization** significance test (the\nobserved PCC against a block-scrambled null, with a p-value and z-score), the\n**Van Steensel** cross-correlation function, and **Li's intensity correlation\nanalysis**. The randomization test is where significance comes from: the\nresults table reports coefficients only, since per-pixel correlation p-values\nare not valid on spatially autocorrelated image data\n([details](docs/metrics.md#why-there-are-no-per-pixel-p-values)).\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/widget_diagnostics.png\" alt=\"Diagnostics tab - Costes randomization\" width=\"780\"/>\n</p>\n\n## Object-based analysis\n\nThe **Object-based** tab compares segmented *objects* between the two channels:\n**centre-particle coincidence** (does an object's centroid fall inside an\nobject of the other channel?) and **object overlap**, with one row per object.\nObjects come from existing Labels layers or by thresholding, and the detected\ncentroids and nearest-neighbour links are drawn back into the viewer as Points\nand Vectors.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/DBI-INFRA/napari-colocalization/main/docs/img/widget_objects.png\" alt=\"Object-based tab - coincidence and overlap\" width=\"780\"/>\n</p>\n\n## Documentation\n\n- **[Usage guide](docs/usage.md)** - every control in the widget, in order.\n- **[Metrics](docs/metrics.md)** - what PCC, SRCC, ICQ, the overlap\n  coefficient and Manders (tM1/tM2) mean, co-occurrence versus correlation,\n  and how the Costes auto-threshold works.\n- **[Python API](docs/api.md)** - calling the pure-compute layer\n  (`pearson`, `spearman`, `li_icq`, `manders`, `overlap`,\n  `costes_threshold`, `costes_regression`, `analyse_pairwise`,\n  `analyse_all_to_all`) from scripts or notebooks.\n- **[Changelog](CHANGELOG.md)** - what changed in each release.\n\n## Related projects\n\n- [Coloc 2](https://imagej.net/plugins/coloc-2) - the reference ImageJ\n  colocalization plugin; this plugin follows it in spirit, and the Costes\n  auto-threshold here is matched to its implementation.\n- [JACoP](https://imagej.net/plugins/jacop) - \"Just Another Colocalization\n  Plugin\" (Bolte & Cordelières, 2006); the inspiration for the diagnostics\n  (Van Steensel CCF, Li ICA, Costes randomization) and the object-based\n  analysis.\n- [ijp-jacop-b](https://github.com/BIOP/ijp-jacop-b) - the BIOP fork of JACoP;\n  inspired the per-channel auto-thresholds, per-Z-slice mode and the\n  layers written back to the viewer.\n- [scikit-image colocalization metrics](https://scikit-image.org/docs/stable/auto_examples/applications/plot_colocalization_metrics.html):\n  the underlying implementations of PCC and Manders.\n\n## Contributing\n\nContributions are welcome. Run the test suite with:\n\n```bash\npip install -e . --group dev\npython -m pytest tests/ -v\n```\n\nPre-commit hooks (ruff lint + format, napari-plugin-checks) ship with the\nrepo and run with [prek](https://prek.j178.dev/), included in the dev group:\n\n```bash\nprek install\nprek run --all-files\n```\n\nPlease keep test coverage at or above the current level when submitting a PR.\n\n## License\n\nDistributed under the terms of the [MIT](http://opensource.org/licenses/MIT)\nlicence; `napari-colocalization` is free and open-source software.\n\n## Issues\n\nFound a bug or have a feature request? Please\n[open an issue](https://github.com/DBI-INFRA/napari-colocalization/issues).\n",
    "description_content_type": "text/markdown",
    "keywords": null,
    "home_page": null,
    "download_url": null,
    "author": null,
    "author_email": "Jesko Wagner <35219306+jeskowagner@users.noreply.github.com>",
    "maintainer": null,
    "maintainer_email": null,
    "license": null,
    "classifier": [
      "Development Status :: 2 - Pre-Alpha",
      "Framework :: napari",
      "Intended Audience :: Science/Research",
      "Operating System :: OS Independent",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: 3.13",
      "Topic :: Scientific/Engineering :: Image Processing"
    ],
    "requires_dist": [
      "napari",
      "numpy",
      "magicgui",
      "qtpy",
      "scikit-image",
      "scipy",
      "matplotlib",
      "napari[all]; extra == \"all\""
    ],
    "requires_python": ">=3.11",
    "requires_external": null,
    "project_url": [
      "Bug Tracker, https://github.com/dbi-infra/napari-colocalization/issues",
      "Documentation, https://dbi-infra.github.io/napari-colocalization/",
      "Source Code, https://github.com/dbi-infra/napari-colocalization",
      "User Support, https://github.com/dbi-infra/napari-colocalization/issues"
    ],
    "provides_extra": [
      "all"
    ],
    "provides_dist": null,
    "obsoletes_dist": null
  },
  "npe1_shim": false
}