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.
valmust 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
- Start napari.
- Open the viewer: Plugins → Molecular Cartography Viewer
- Click Choose CSV… and select your exported/parsed
.csv. - Search genes by substring, multi-select candidates, click Add →
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file napari_molecular_cartography_viewer-0.1.0.tar.gz.
File metadata
- Download URL: napari_molecular_cartography_viewer-0.1.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1480ba7b4d5f636360cdab279b6c91331fdddbfa5dc21037179396d7b5b928a
|
|
| MD5 |
89dbacab5ccf2ada4bbc8fe5fc13ceaf
|
|
| BLAKE2b-256 |
8f1c77a4f7758be1137a6e73c918b47e133cf1bf84201c0aff6946a7dc30fd7f
|
File details
Details for the file napari_molecular_cartography_viewer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: napari_molecular_cartography_viewer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80a6926b2ba69ef72f28efa8fa15131d7e29f6e5f7b5493412dee2e2e43dd044
|
|
| MD5 |
4422bfa14d724d33bd93ab06fbb1ac61
|
|
| BLAKE2b-256 |
39e81b785022d280b905ffb2c3689ac3a7814fb1de7de333d2899214bdcafee0
|