Skip to main content

Report the number of particles in each class from RELION

Project description

countparticles

DOI

Report the number of particles in each class from a run_data.star 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???_data.star 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.

Acknowledgments

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

Installation

I recommend to install this tool in a dedicated conda environment. You can create one like so (replace ENV_NAME with the name you want to give to this environment):

$ conda deactivate
$ conda create --name ENV_NAME python=3.9
$ conda activate ENV_NAME

Once the conda environment is active, you can install the tool with the following command:

$ pip install countparticles

Usage

$ countparticles --help
Usage: countparticles [OPTIONS] <run_data.star>

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

Options:
  -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.

Source Distribution

countparticles-1.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

countparticles-1.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file countparticles-1.4.tar.gz.

File metadata

  • Download URL: countparticles-1.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for countparticles-1.4.tar.gz
Algorithm Hash digest
SHA256 c1d91ca86c631e429b0759b54722403f7b0903477b853c7db8655fe4abd5af1f
MD5 2cd11045a1e200baa78e8e3051fe9be2
BLAKE2b-256 b65981bd87496298d747c35577f099ee9d8b4aa59bbe15af414176418a2be8e0

See more details on using hashes here.

File details

Details for the file countparticles-1.4-py3-none-any.whl.

File metadata

  • Download URL: countparticles-1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for countparticles-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c120c7c76f9942558d1a40e6fc2a224fc575b67c48e4602dc7df2b292dd15471
MD5 6bbb5bc13297ac4cd50bb4db42847c5b
BLAKE2b-256 ae275809cac1fcfd2dfa9b248b222e16b8bef63e620d92003c7d0614258f167b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page