GithubHelp home page GithubHelp logo

morganfuture / angdist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guillawme/angdist

0.0 0.0 0.0 22 KB

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

Home Page: https://pypi.org/project/angdist

License: MIT License

Python 89.11% Makefile 10.89%

angdist's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.