This function collects and smooths data along the trajectory using Seurat object as input. It was modified from the package ArchR getTrajectory to use a Seurat object as input. For more details, check here https://www.archrproject.com/reference/getTrajectory.html.

GetTrajectory(
  object = NULL,
  trajectory.name = "Trajectory",
  assay = NULL,
  slot = "counts",
  groupEvery = 1,
  log2Norm = TRUE,
  scaleTo = 10000,
  smoothWindow = 11
)

Arguments

object

Seurat object

trajectory.name

The name of trajectory inferred by AddTrajectory

assay

Which assay is used for data collection

slot

Name of slot used to collect data. Usually set as "counts" or "data".

groupEvery

The number of sequential percentiles to group together when generating a trajectory. This is similar to smoothing via a non-overlapping sliding window across pseudo-time.

log2Norm

Whether or not the data should be log2 transformed. This can be set to TRUE if gene expression or chromatin accessibility data is used, otherwise FALSE if data from TF activity is used.

scaleTo

Once the sequential trajectory matrix is created, each column in that matrix will be normalized to a column sum indicated by scaleTo.

smoothWindow

An integer value indicating the smoothing window in size (relative to groupEvery) for the sequential trajectory matrix to better reveal temporal dynamics.

Value

A SummarizedExperiment object

Examples

if (FALSE) {
trajRNA <- GetTrajectory(
   object = obj,
   assay = "RNA",
   slot = "data",
   smoothWindow = 7,
   log2Norm = TRUE
)
}