Skip to main content

A simple plugin to use Molecular Cartography Viewer within napari

Project description

napari-molecular-cartography-viewer

A napari dock widget to visualize exported molecular coordinate tables (CSV) as transcript points.
It supports multi-gene overlay, value thresholding, and an optional gray background layer showing all transcripts.

This plugin is intended for exported/parsed coordinate tables (CSV).
It does not require or reverse-engineer any proprietary file formats.

Compatibility

  • Python: 3.10–3.13 (tested on 3.11)
  • napari: 0.6.x (tested on 0.6.6)

CSV format requirements

The plugin auto-detects 4 required fields. Column names may vary, but must match one of the accepted names below.

Required columns

Field Meaning Accepted column names
x X coordinate (pixel) x, X
y Y coordinate (pixel) y, Y
gene Gene / target name gene, Gene, target, ID
val Numeric value (intensity/score/confidence) val, value, intensity, score, confidence, qc, V, v

Notes:

  • napari points are rendered in (y, x) order internally.
  • val must be numeric; non-numeric/NaN rows are automatically dropped.
  • The CSV must contain a header row.

Minimal example

x,y,gene,val
120.5,88.2,GLYMA_01G000100,12.3
121.0,88.9,GLYMA_01G000100,8.1
500.2,410.7,NOD26,30.0

Usage

  1. Start napari.
  2. Open the viewer: Plugins → Molecular Cartography Viewer
  3. Click Choose CSV… and select your exported/parsed .csv.
  4. Search genes by substring, multi-select candidates, click Add →
  5. Click Update display to render selected genes.

Options

  • Show gray background layer: toggles All_transcripts
  • Value threshold: keep points with val >= threshold (unless “Ignore threshold” is checked)
  • Ignore threshold: show all points for selected genes
  • Scale size by value: point size mapped to val
  • Opacity / Base size: affects per-gene layers
  • All point layers are forced to render with no borders for clean visualization.

Installation

From PyPI

pip install napari-molecular-cartography-viewer

If you need a full napari install in a fresh environment:

pip install "napari[all]" napari-molecular-cartography-viewer

Notes

Reading LZW-compressed TIFF images (optional)

If your background image is a TIFF with LZW compression, install imagecodecs:

conda install -c conda-forge imagecodecs

License

BSD-3-Clause. See LICENSE.

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_molecular_cartography_viewer-0.1.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file napari_molecular_cartography_viewer-0.1.0.tar.gz.

File metadata

File hashes

Hashes for napari_molecular_cartography_viewer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1480ba7b4d5f636360cdab279b6c91331fdddbfa5dc21037179396d7b5b928a
MD5 89dbacab5ccf2ada4bbc8fe5fc13ceaf
BLAKE2b-256 8f1c77a4f7758be1137a6e73c918b47e133cf1bf84201c0aff6946a7dc30fd7f

See more details on using hashes here.

File details

Details for the file napari_molecular_cartography_viewer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_molecular_cartography_viewer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80a6926b2ba69ef72f28efa8fa15131d7e29f6e5f7b5493412dee2e2e43dd044
MD5 4422bfa14d724d33bd93ab06fbb1ac61
BLAKE2b-256 39e81b785022d280b905ffb2c3689ac3a7814fb1de7de333d2899214bdcafee0

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