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.

New in v0.1.1

  • Added Apply UI Color button for active gene layers.
  • Workflow for manual color changes in napari:
    1. Select a GENE: ... layer in the Layers panel (bottom-left).
    2. Change face color in layer controls (top-left).
    3. Click Apply UI Color in the plugin panel to apply the color to existing points.
  • Added transcript/point count display for the active/selected layer (shown in the lower-right status area).
  • Improved color update behavior for large transcript point layers.
  • Improved background transcript layer handling to reduce unnecessary heavy loading in common use.

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.1.tar.gz (22.7 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.1.tar.gz.

File metadata

File hashes

Hashes for napari_molecular_cartography_viewer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7578a4e31547b4e163cc7129437771c3b278054f89d3b19f2f03362b18a55bbf
MD5 9230ce02d787126adbd7041c735fbaf8
BLAKE2b-256 8ec9445ae39eb2cd63207a33c6d0ac656a572735de43f81b55e725d93659e4a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for napari_molecular_cartography_viewer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39e565ea71939214c19ec93aa757c37f6b54a33a1d90a3ee7e9deaaa6fa0e208
MD5 764cba5a20072fd76abfe3ee5a6d34f5
BLAKE2b-256 7230ffa6113f8e986d7dc44273f37b40be099599957c5af7db657cd77de106c3

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