project_trajectory: Project a trajectory onto a dimensionality reduction

View source: R/project_waypoints.R

project_trajectoryR Documentation

Project a trajectory onto a dimensionality reduction

Description

Project a trajectory onto a dimensionality reduction

Usage

project_trajectory(
  trajectory,
  dimred,
  waypoints = select_waypoints(trajectory),
  trajectory_projection_sd = sum(trajectory$milestone_network$length) * 0.05
)

project_milestones(
  trajectory,
  dimred,
  trajectory_projection_sd = sum(trajectory$milestone_network$length) * 0.05
)

Arguments

trajectory

The trajectory as created by infer_trajectory() or add_trajectory()

dimred

The dimensionality reduction of the cells. A matrix with the positions of cells (rows) in the dimensions (columns)

waypoints

A set of waypoints, which can be created by select_waypoints(). It is a list containing:

  • waypoints: a dataframe containing in the very least the waypoint_id

  • milestone_percentages: the positions of waypoints withing the trajectory

  • geodesic_distances: matrix with precalculated geodesic distances between waypoints (rows) and cells (columns), optional

trajectory_projection_sd

The standard deviation of the gaussian kernel

Value

A list containing

  • dimred_segment_points: The dimensionality reduction of a set of points along the trajectory. A matrix with the position of points (rows) in the dimensions (columns)

  • dimred_segment_progressions The progressions of the points. A dataframe containing the from and to milestones, and their progression. Has the same number of rows as dimred_segment_points

  • dimred_milestones: The dimensionality reduction of the milestones. A matrix with the position of milestones (rows) in the dimensions (columns)

These objects can be given to add_dimred()

See Also

add_dimred()


dynwrap documentation built on July 26, 2023, 5:15 p.m.