add_linear_trajectory {dynwrap}R Documentation

Constructs a linear trajectory using pseudotime values

Description

Constructs a linear trajectory using pseudotime values

Usage

add_linear_trajectory(
  dataset,
  pseudotime,
  directed = FALSE,
  do_scale_minmax = TRUE,
  ...
)

Arguments

dataset

A dataset created by wrap_data() or wrap_expression()

pseudotime

A named vector of pseudo times.

directed

Whether the trajectory will be directed.

do_scale_minmax

Whether or not to scale the pseudotime between 0 and 1. Otherwise, will assume the values are already within that range.

...

extra information to be stored in the trajectory

Value

The dataset object with trajectory information, including:

Examples

library(tibble)
dataset <- wrap_data(cell_ids = letters)

pseudotime <- tibble(
  cell_id = dataset$cell_ids,
  pseudotime = runif(length(dataset$cell_ids))
)

trajectory <- add_linear_trajectory(dataset, pseudotime)

[Package dynwrap version 1.2.2 Index]