project_waypoints {dynwrap}R Documentation

Project waypoints of a trajectory (e.g. milestones) into a space defined by cells (e.g. expression or a dimensionality reduction)

Description

This will first calculate the geodesic distance of each cell to the waypoint. This distance is used as a weight

Usage

project_waypoints(
  trajectory,
  space,
  waypoints = select_waypoints(trajectory),
  trajectory_projection_sd = sum(trajectory$milestone_network$length) * 0.05
)

Arguments

trajectory

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

space

A matrix with cells in rows and different dimensions in the columns. This is typically an expression matrix or a dimensionality reduction

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 matrix in which the waypoints (rows) were projected into a new space defined by the same number of dimensions (columns) as in the space argument


[Package dynwrap version 1.2.2 Index]