First Steps
CryoLike computes the likelihood of given cryo-EM images (“Images”) having been generated by a specific 3D map or model. It does this by taking projections of that model (“Templates”) for known poses, and comparting them to the images.
Typical CryoLike usage requires four steps:
Set CryoLike parameters
Create known-pose templates from input model files (in
mrc,mrcs,maps, orpdbformat)Create images from cryo-EM particle files (in
CryoSparcorStarfileformat)Run the likelihood computation using the Templates and Images
CryoLike provides functions for each of these four tasks. The full range of options will be discussed in detail in the tutorials section.
This page walks you through a few scripts that demonstrate basic usage. Successfully running the example scripts also confirms that the CryoLike library has been installed correctly.
The scripts can be found
in the example directory of the CryoLike repository. They
operate on a small dataset that is distributed
with this repository in the example/data directory.
Example Usage
To try your first CryoLike processing, run the following scripts
in order. Before running, cd into the example directory.
If you installed CryoLike in a virtual environment, be sure to
activate it before running the examples. In the command lines
below, we assume your
environment’s python interpreter is invoked through the
python3 command; this may vary slightly on your system.
The first script creates an image-parameters file and stores it in
example/output/templates/parameters.npz.The image parameters file stores information about the image dimensions and discretization grid used to represent both template and image files. For a comparison to be well-founded, template and image data need to have compatible dimensions and discretizations.
To create the parameter file, run:
(venv) $ python3 set_image_parameters_example.py
The second script reads the PDB files distributed with the repository in
example/data/pdb, converts them into Templates, and saves them in a user-defined output directory (which we have specified asexample/output/templates/for this example).To create the templates, run:
(venv) $ python3 make_templates_from_inputs_example.py
The third script reads particle stacks from
particles.mrcsandparticle_data.star(distributed inexample/data/particles/), converts them into CryoLike-format Image stacks, and saves them in a user-defined output directory (example/output/particles/).To convert the images, run:
(venv) $ python3 convert_particle_stacks_example.py
The final script compares the image stacks and templates, and computes the likelihoods in the
example/output/likelihooddirectory tree:
(venv) $ python3 run_likelihood_example.py
If the examples run successfully, you can find all output files under
the example/output directory.
Our example also includes a script to plot results. To create the plot, run the following command:
(venv) $ python3 plot_example.py
Output plots will also be located under the output/likelihood directory.
Data Sources
Data used in the examples and test cases are retrieved from the following sources:
EMPIAR-10026
EMD: 2788
PDB ID: 1UAO
PDB ID: 4V1W
Detailed Tutorials
For example usages in different scenarios, see the tutorials section.