Skip to main content

Plot a histogram of local resolution values from a local resolution map of a cryo-EM reconstruction from RELION.

Project description

localres

DOI

Plot a local resolution histogram from a local resolution map and a mask.

From a cryo-EM reconstruction, one can calculate local resolution and generate a color-coded 3D map showing local resolution across the 3D reconstruction (or within slices of it). This command-line tool complements this by allowing one to quantitatively answer the question "how many map voxels inside the mask have a given local resolution?". This tool generates a histogram of local resolution values from a local resolution map and a mask (relion_locres.mrc and mask.mrc files from RELION, respectively).

FAQ

Q: Doesn't RELION already do this?

A: Yes, RELION-3.1 already prints out this histogram. This tool, however, 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: Will it work with MRC files produced by my favorite software (not RELION)?

A: If these MRC files have the same structure, then yes. But I don't know for sure, because this tool has only been tested with files produced by RELION.

Acknowledgments

I reused code suggested by @biochem_fan. My contribution was simply to package it into a command-line tool that's documented and easy to install.

Installation

$ pip install localres

Usage

$ localres --help
Usage: localres [OPTIONS] <relion_locres.mrc> <mask.mrc>

  Plots a histogram of local resolution values from a local resolution map
  and a mask both produced by RELION.

  For meaningful results, the mask.mrc file must be the one used for the 3D
  refinement and post-processing jobs that produced the relion_locres.mrc
  file.

Options:
  -t, --title TEXT    Title of the histogram (default: no title).
  -b, --bins INTEGER  Number of bins in the histogram (default: 100).
  -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.

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 localres, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size localres-1.1-py3-none-any.whl (4.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size localres-1.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page