tomodrgn.analysis.get_pc_traj#

get_pc_traj(pca: PCA, dim: int, sampling_points: ndarray) ndarray[source]#

Sample latent embeddings along specified principal component dim at coordininates in PC-space specified by sampling_points. Note that sampled points are precisely on-pc-axis and are therefore off-data.

Parameters:
  • pca – pre-fit sklearn PCA object from analysis.run_pca

  • dim – PC dimension for the trajectory (1-based index)

  • sampling_points – array of points to sample along specified principal component.

Returns:

array of latent embedding values along PC, shape (len(sampling_points), zdim).