Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytom-cc-threshold-viewer

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.

What it does

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.

Installation

Requires Python 3.10 or newer.

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

On Linux with Qt5 the viewer needs system graphics libraries; see the napari install docs if napari complains on first launch.

Usage

python simple_threshold_view_scale.py path/to/scores.mrc \
    --tomogram path/to/tomogram.mrc \
    --pixel-size 9.92

Arguments

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).

Outputs

  • 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.

Licence

MIT (see LICENSE).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages