Skip to main content

Report the number of particles in each class from RELION

Project description



Report the number of particles in each class from a file produced by RELION.

A single-particle cryo-EM reconstruction comes from a set of particle images corresponding to projections of identical particles in different orientations. All datasets are heterogeneous, to various degrees, and data analysis involves classification of particle images. Knowing how many particles contributed to any given class is important to decide how to follow up after a classification job. This command-line tool reports a count of particles in each class in a run_it??? file from a RELION Class2D or Class3D job. It can also optionally produce a bar plot of these particle counts.

This tool was tested with star files produced by RELION-3.1.0. Earlier versions of RELION are not supported.


I would not have been able to put this tool together without the starfile library.


$ pip install countparticles


$ countparticles --help
Usage: countparticles [OPTIONS] <>

  Report the number of particles in each class from a file
  produced by RELION.

  -p, --plot         Optional. Display a bar plot of the particle counts. This
                     is most helpful with only a few classes, e.g. for typical
                     Class3D results (but not for typical Class2D results with
                     many classes).

  -o, --output TEXT  Optional. File name to save the barplot (recommended file
                     formats: .png, .pdf, .svg or any format supported by
                     matplotlib). This option has no effect without the
                     -p/--plot option.

  -h, --help         Show this message and exit.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for countparticles, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size countparticles-1.2-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size countparticles-1.2.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page