scvi.external.decipher.utils.Trajectory#
- class scvi.external.decipher.utils.Trajectory(rep_key, cluster_locations, cluster_ids, point_density=50)[source]#
A class that defines a trajectory through a latent space.
This class creates a trajectory through a latent space by connecting a sequence of points (e.g., cluster centroids) with straight lines. The trajectory is parameterized by time, where time 0 corresponds to the first point and increases linearly with distance along the trajectory.
- Parameters:
rep_key (str) – Obsm key for the latent representation being used
cluster_locations (np.ndarray) – Array of coordinates for points to connect, shape (n_points, n_dimensions)
cluster_ids (List[str]) – List of cluster IDs corresponding to the locations
point_density (int, default=50) – Number of interpolated points per unit distance in the latent space
- trajectory_latent#
Coordinates of points along the interpolated trajectory
- Type:
np.ndarray
- trajectory_time#
Time values corresponding to each point in trajectory_latent
- Type:
np.ndarray
- cumulative_length#
Cumulative distance along the trajectory at each cluster location
- Type:
np.ndarray
- cluster_locations#
Original cluster locations used to create the trajectory
- Type:
np.ndarray