Making long trajectories with cryoDRGN graph_traversal
using cryoDRGN's tool for creating nearest-neighbor paths in the latent z-space
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 can specify the indices of arbitrary particles as the anchor points of the trajectory. These indices can be retrieved from the interactive visualization sections of the jupyter notebook, or by using the annotation features of the interactive tool employed by the cryodrgn filter
command.
2) Generate volumes
cryodrgn graph_traversal
will by default 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