extractMonocleTrajectory: Extract trajectory from Monocle and add to Seurat object.

Description Usage Arguments Value Examples

View source: R/extractMonocleTrajectory.R

Description

This function takes a Monocle object, extracts a trajectory that was calculated, and stores it in the specified Seurat object. Trajectory info (state, pseudotime, projection and tree) will be stored in object@misc$trajectories$monocle2 under the specified name.

Usage

1
2
3
4
5
6
7
extractMonocleTrajectory(
  monocle,
  seurat,
  trajectory_name,
  column_state = "State",
  column_pseudotime = "Pseudotime"
)

Arguments

monocle

Monocle object to extract trajectory from.

seurat

Seurat object to transfer trajectory to.

trajectory_name

Name of trajectory.

column_state

Name of meta data column that holds info about the state of a cell; defaults to 'State'.

column_pseudotime

Name of meta data column that holds info about the pseudotime of a cell; defaults to 'Pseudotime'.

Value

Returns Seurat object with added trajectory. Trajectory info (state, pseudotime, projection and tree) will be stored in object@misc$trajectories$monocle2' under the specified name.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  seurat <- extractMonocleTrajectory(
    monocle = monocle,
    seurat = seurat,
    name = 'trajectory_1',
    column_state = 'State',
    column_pseudotime = 'Pseudotime'
  )

## End(Not run)

romanhaa/cerebroApp documentation built on Nov. 25, 2021, 5:29 p.m.