CryoDRGN graph traversal for making long trajectories
Documentation for cryodrgn graph_traversal
CryoDRGN's graph traversal algorithm builds a nearest neighbor graph between all the latent embeddings, and then performs Dijkstra's algorithm to find the shortest path on the graph between the anchors nodes. The idea is to define a trajectory in latent space while remaining on the data manifold since we don't want to generate structures from unoccupied regions of the latent space.
The two commands to run are cryodrgn graph_traversal
to create a latent space trajectory and cryodrgn eval_vol
to generate volumes.
1) Create latent space trajectory
First, run cryodrgn graph_traversal
to create a trajectory of z values. As a default, we recommend using the kmeans20 cluster centers as the anchor points:
Replace z.49.pkl
with z.N.pkl
where N is the epoch number you are analyzing.
Note that you could specify the indices of arbitrary particles as the anchor points as the endpoints of the trajectory. E.g. you could manually find the indices of desired data points from the interactive visualization sections of the jupyter notebook.
2) Generate volumes
cryodrgn graph_traversal
will produce a text file containing a list of z values (z.path.txt
). This may be converted to .mrc
files with cryodrgn eval_vol
:
Replace weights.49.pkl
with the epoch number you are analyzing.
This may generate a few hundred density maps. To save disk space, you can generate downsampled volumes with -d 128
.
3) Create ChimeraX movie
In ChimeraX:
4) Create latent space movie
Scripts to help create a latent space movie of the associated trajectory (e.g. video, right) coming soon.
Last updated