tomodrgn pc_traversal#

Purpose#

Generate volumes along specified principal components of latent space.

Sample usage#

The examples below are adapted from tomodrgn/testing/commandtest*.py, and rely on other outputs from commandtest.py to execute successfully.

# Warp v1 style inputs
tomodrgn \
    pc_traversal \
    output/vae_both_sim_zdim2/z.train.pkl \
    -o output/vae_both_sim_zdim2/pc_traversal \
    --use-percentile-spacing

# WarpTools style inputs
tomodrgn \
    pc_traversal \
    output/vae_warptools_70S_zdim2/z.train.pkl \
    -o output/vae_warptools_70S_zdim2/pc_traversal \
    --use-percentile-spacing

Arguments#

usage: pc_traversal [-h] -o O [--dim DIM] [-n N] [--lim LIM LIM]
                    [--use-percentile-spacing]
                    z

Positional Arguments#

z

Input latent embeddings z.pkl file

Core arguments#

-o

Output directory for pc.X.txt files containing latent embeddings sampled along each PC

--dim

Optionally specify which PC to calculate trajectory (1-based indexing) (default: all)

-n

Number of points to sample along each PC

Default: 10

--lim

Start and end point to sample along each PC (default: 5/95th percentile of each PC)

--use-percentile-spacing

Sample equally spaced percentiles along the PC instead of equally spaced points along the PC

Default: False

Common next steps#

  • Validate the inferred latent space PC traversal by isolating indices of particles proximal to each trajectory path, and performing homogeneous reconstructions with tomodrgn backproject_voxel or external STA software