Interactive napari viewer for cross-correlation (CC) score volumes produced by PyTOM template matching. Used in:
Pražák V, Harley I, Falckenhayn J, Boutell C, Thomason PA, Davis BG, Kaufmann R, Carter SD. In situ molecular architecture of PML bodies reveals columnar trinucleosomes in an open state selected by a porous mesh.
Given a PyTOM CC score map (.scores.mrc) and optionally the matching
tomogram, the plugin opens a napari window with:
- Simultaneous display of the tomogram and the CC score volume with paired colour bars (CC score as turbo, Z-score as coolwarm).
- Live slider to adjust the CC threshold while viewing the underlying tomographic data.
- Scale bar overlay (user-set length, default 100 nm) using the MRC header pixel size (or an override).
- Movie export of the current view (walkthrough across Z with the selected threshold) for figure preparation and supplementary videos.
The viewer is for inspection and threshold selection only. It does not extract particle coordinates or write STAR files; particle extraction at the chosen threshold is performed separately in PyTOM.
Requires Python 3.10 or newer.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOn Linux with Qt5 the viewer needs system graphics libraries; see the
napari install docs
if napari complains on first launch.
python simple_threshold_view_scale.py path/to/scores.mrc \
--tomogram path/to/tomogram.mrc \
--pixel-size 9.92| Flag | Description |
|---|---|
scores_file |
PyTOM CC score map (.scores.mrc), positional. |
--tomogram |
Matching tomogram (.mrc). Optional but recommended. |
--pixel-size |
Pixel size in Angstroms. Overrides the MRC header if set. |
--z-offset |
Z alignment offset in voxels between scores and tomogram (default 0). |
--y-offset |
Y alignment offset in voxels (default 0). |
--x-offset |
X alignment offset in voxels (default 0). |
- Movie: exported via the "Create Movie" button as an MP4 using the current threshold and the view's Z range, with a burnt-in scale bar.
MIT (see LICENSE).