Skip to main content

angdist

DOI

Plot the 2D histogram of Euler angles covered by a set of cryo-EM particles.

A single-particle cryo-EM reconstruction comes from a set of particle images corresponding to projections of identical particles in different orientations. Knowing how many particles contributed to any given projection orientation is important to assess the quality of a dataset. This command-line tool generates a 2D histogram of particle orientations from a run_*_data.star file from a RELION Class3D or Refine3D job.

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

FAQ

Q: Doesn't RELION already do this?

A: RELION-3.1 produces a histogram of Euler angles, but in 3D (*_angdist.bild files). This is very convenient to visually relate specific Euler angles to the corresponding orientation of the 3D reconstruction of the particle. This tool is complementary to RELION in that it produces a 2D histogram. A 2D histogram is easier to look at globally, making it easy to rapidly spot problems (missing orientations, strongly preferred orientations, etc.). This tool doesn't require an installation of RELION, allowing one to inspect files quickly from a different computer. This tool also lets you adjust the number of bins in the histogram, and save the histogram as an SVG file (which is useful for adjusting styling to make a pretty figure).

Q: Doesn't cryoSPARC already do this?

A: Yes, cryoSPARC already prints out this exact same histogram. This tool, however, doesn't require an installation of cryoSPARC, allowing one to inspect files quickly from a different computer. This tool also lets you adjust the number of bins in the histogram, and save the histogram as an SVG file (which is useful for adjusting styling to make a pretty figure). Finally, this tool uses a default color scale that is much more readable to color blind people than the one used by cryoSPARC.

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 angdist

Usage

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

  Plot a 2D histogram of Euler angles distribution from a run_data.star
  file produced by RELION.

Options:
  -t, --title TEXT        Title of the histogram (default: no title).
  -c, --colormap TEXT     A color map supported by matplotlib (default:
                          "viridis").

  -g, --gridsize INTEGER  Number of hexagonal bins along the x axis (default:
                          50).

  -o, --output TEXT       File name to save the histogram (optional: with no
                          file name, simply display the histogram on screen
                          without saving it; recommended file formats: .png,
                          .pdf, .svg or any format supported by matplotlib).

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

Metadata

Release files for angdist 1.4

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

Source distribution (sdist)

Source distribution for angdist 1.4
File Size Uploaded
angdist-1.4.tar.gz 4.9 kB Details

Built distribution (wheel)

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

Total release size: 9.9 kB

Release files / angdist-1.4.tar.gz

Download URL angdist-1.4.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a311de8d5e4abbd65e5b81132a27d0d79c0170c037f2333cee62b3b4d2c2e191
BLAKE2b-256 checksum
How to use checksums
7d4b5ceb234a97bfd135e3d34b1e04da0ae7fc86c3079a36d2633261d996f12b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / angdist-1.4-py3-none-any.whl

Download URL angdist-1.4-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4d61ecc78e9628be8f83ab970d510cf43de9109692b31bc5efbc42c7b880c21
BLAKE2b-256 checksum
How to use checksums
9dea1aff7d0adea36790501b2cd9c0f3e385321dd98aff98e89a43e0d5b52dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.4 This release

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

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