Skip to main content

ParaPick

CI License: MIT

Tomogram-free particle localization for cryo-ET. ParaPick finds the 3D coordinates of particles directly from 2D picks made independently on each image of a tilt-series. You can pick with any single-particle picker (Topaz, crYOLO, RELION, ...). ParaPick fuses the picks from all tilts into a consistent set of 3D positions, with a confidence score for each one. No tomogram needs to be reconstructed.

How it works

ParaPick builds a 3D model of the particle positions that has to explain the 2D picks of every tilt: projected through the tilt-series geometry, each particle should land on a pick in every tilt image. The model is fitted by repeating two steps:

  1. Match: each pick is matched to the particles that project close to it. A particle takes at most one pick per tilt, and picks that match no particle are set aside as false positives.
  2. Move: each particle moves to the 3D position that best agrees with its picks.

Particles that too few picks support are dropped, so their number is found automatically. A particle's score is the fraction of tilts whose picks support it.

The method is a Gaussian mixture fitted by expectation-maximisation. docs/algorithm.md gives the details and how they map to the code.

Features

  • Input: the tilt-series geometry in RELION 5 format (tomograms.star), and 2D picks in the formats of RELION, crYOLO, Topaz, cryoSPARC, EMAN2 or Xmipp/Scipion.
  • Output: RELION 5 particles, which feed straight into subtomogram averaging.
  • Stacked tilt-series: unstack splits each stack into one micrograph per tilt, for pickers that need one image per file.
  • Many tilt-series per run, on CPU or GPU (JAX).
  • Command line and Python API, with file formats as plug-ins.

Installation

pip install parapick                # CPU
pip install "parapick[cuda12]"      # NVIDIA GPU (CUDA 12); use [cuda13] for CUDA 13

To install from source, use uv: run uv sync in a clone. Python ≥ 3.11 is required.

Quick start (command line)

# 1. Pick each tilt image with your favourite 2D picker, then gather the picks into one
#    STAR file. Matching them to the tilts of tomograms.star adds tilt-series names.
parapick convert-picks topaz_picks.txt --tomograms tomograms.star -o picks.star

# 2. Localise the particles in 3D (all tilt-series at once).
parapick localize --tomograms tomograms.star --picks picks.star -o localize/

# 3. Keep the confident ones (score = fraction of tilts supporting the particle).
parapick filter localize/particles.star --min-score 0.3 --tomograms tomograms.star \
    -o localize/particles_selected.star

localize/ then contains:

  • particles.star: RELION 5 rlnCenteredCoordinate{X,Y,Z}Angst, with the score in rlnAutopickFigureOfMerit.
  • optimisation_set.star: ready for RELION 5 subtomogram extraction.
  • localize_report.json: per tilt-series diagnostics, such as iterations, number of particles, background fraction and per-tilt pick σ.

Run parapick --help and parapick <command> --help for all options.

Picking on stacked tilt-series

Most single-particle pickers need one micrograph per file. crYOLO rejects MRC files with more than one section, and Topaz (2D) treats each file as one micrograph. Tilt-series, however, often come as one stack per tilt-series (IMOD, AreTomo, Warp, RELION's IMOD import). unstack writes each tilt as its own 2D .mrc file, together with a copy of the geometry that points at them:

parapick unstack --tomograms tomograms.star -o unstacked/
# pick on unstacked/micrographs/*.mrc (files named <TS>_<NNN>.mrc), e.g. with Topaz or crYOLO
parapick convert-picks topaz_picks.txt --tomograms unstacked/tomograms.star -o picks.star
parapick localize --tomograms unstacked/tomograms.star --picks picks.star -o localize/

The images keep their native sampling, so pick coordinates need no conversion. The new tomograms.star has the same geometry and RELION metadata, so it can replace the original downstream. --link symlinks tilts that are already single .mrc files instead of copying them.

Command Purpose
localize Main task: 3D coordinates from 2D picks on the tilt images.
unstack Write each tilt image as its own 2D .mrc file (for SPA pickers), plus matching geometry.
convert-picks Convert picks between formats, resolving them against the tilt-series.
project Project 3D particles onto every tilt image, e.g. ground truth to train a 2D picker, or QC.
filter Select particles by score, support or rank.
evaluate Precision, recall, F1 and RMSE against a reference set.
simulate Generate a synthetic dataset (geometry, ground truth, noisy picks).
formats List the available file formats, including installed plug-ins.

Common options: --device {auto,cpu,gpu}, --x64, -v/-q.

Quick start (Python)

import parapick as pp

tomograms = pp.read_tomograms("tomograms.star")  # RELION 5 tilt-series geometry
picks = pp.read_picks("picks.star")  # 2D picks (any registered format)

result = pp.localize(tomograms, picks, config=pp.LocalizeConfig(alpha=0.5))
particles = result.particles(pp.Selection(min_score=0.3))
pp.write_particles(particles, "particles.star", tomograms_path="tomograms.star")

for ts in result.results:
    print(ts.name, ts.fit.n_components, ts.fit.converged, ts.fit.sigmas.mean())

The packages are layered and can be used on their own:

Package Contents
parapick.tomography Format-neutral data model: TiltSeries (one affine projection per tilt), PickTable, Particles, pick-to-tilt matching.
parapick.gmm The JAX numerics: EMFitter, LocalizeConfig, initialisers, capped Sinkhorn, EM step. NumPy in, NumPy out.
parapick.formats Format plug-ins and their registry (RELION 5, RELION coordinates, Topaz).
parapick.workflows Use cases: localize, project_particles, evaluate, simulate, ...
parapick.cli The thin argparse layer.

Inputs and conventions

  • Geometry: RELION 5 tomograms.star and the per tilt-series STAR files (rlnTomoXTilt, rlnTomoYTilt, rlnTomoZRot, rlnTomo{X,Y}ShiftAngst). ParaPick uses exactly RELION's projection model, including its centring conventions. The tilt-image size is read from the header of the first tilt image, from the ppkTiltImageSize{X,Y} labels, or from --tilt-image-size.
  • Picks: pixel coordinates on the tilt images, as written by single-particle pickers. Read directly from RELION (STAR, autopick), crYOLO (STAR, CBOX, EMAN box), Topaz, cryoSPARC (.cs), EMAN2 (.box) and Xmipp/Scipion (.pos). --flip-y handles pickers whose y axis points the other way. The canonical ParaPick picks file is a single STAR table with rlnTomoName, rlnMicrographName, rlnCoordinateX/Y and, optionally, rlnAutopickFigureOfMerit and rlnMicrographPixelSize (for binned picks). Picks are matched to tilts by micrograph path, file name or stem.
  • Particles: RELION 5 centred Ångström coordinates. Legacy pixel coordinates can be read with the geometry.

See docs/conventions.md for the frames, every STAR label (including the ParaPick-specific ppk* labels), and how to write a format plug-in. See docs/algorithm.md for how the paper's equations map to the code.

Development

uv sync                        # create the environment (dev tools included)
uv run pre-commit install      # ruff + mypy on every commit
uv run pytest --cov            # tests (CPU, double precision)
uv run ruff check . && uv run ruff format --check . && uv run mypy

CI runs lint, type-checks, tests on Linux and macOS for Python 3.11–3.13, and builds the package. Tagging vX.Y.Z publishes to PyPI through trusted publishing.

License

MIT. See LICENSE.

Metadata

Release files for parapick 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parapick 0.2.1
File Size Uploaded Provenance Actions
parapick-0.2.1.tar.gz 203.4 kB With provenance Details for parapick-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parapick 0.2.1
File Interpreter ABI Platform Actions
parapick-0.2.1-py3-none-any.whl Python 3 none any Details for parapick-0.2.1-py3-none-any.whl

Total release size: 304.4 kB

Release files / parapick-0.2.1.tar.gz

Download URL parapick-0.2.1.tar.gz
Size 203.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3a6d844ad601023a264f60f8833878707034f732738981278cd3c66efd96d3ca
BLAKE2b-256 checksum
How to use checksums
16df54d283582a713bb226a14ef344e800ec7ea62666e3c232112560005058a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / parapick-0.2.1-py3-none-any.whl

Download URL parapick-0.2.1-py3-none-any.whl
Size 100.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1277337f0b990177870c6a62978e01f4f6b4df29f658945f5848cdff66da2af6
BLAKE2b-256 checksum
How to use checksums
c140b2293809e099e0d1aa56473ad3a18016d51efe9b9558787d70a4ea49fbbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for parapick 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for parapick-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page