addSeuratTrajectory: Add a Supervised Trajectory to an Seurat Object

Description Usage Arguments

View source: R/Trajectory.R

Description

This function will fit a supervised trajectory in a lower dimensional space that can then be used for downstream analyses.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
addSeuratTrajectory(
  object = NULL,
  name = "Trajectory",
  trajectory = NULL,
  groupBy = "Clusters",
  embedding = NULL,
  preFilterQuantile = 0.9,
  postFilterQuantile = 0.9,
  useAll = FALSE,
  dof = 250,
  spar = 1,
  force = FALSE,
  seed = 1
)

Arguments

name

A string indicating the name of the fitted trajectory to be added in 'meta.data'.

trajectory

The order of cell groups to be used for constraining the initial supervised fitting procedure. For example, to get a trajectory from Cluster1 to Cluster2 to Cluster3, input should be c("Cluster1", "Cluster2", "Cluster3"). Cells will then be used from these 3 groups to constrain an initial fit in the group order.

groupBy

A string indicating the column name from 'meta.data' that contains the cell group definitions used in 'trajectory' to constrain the initial supervised fitting procedure.

embedding

A string indicating the name of the 'embedding' object from the 'seurat' that should be used for distance computation.

preFilterQuantile

Prior to the initial supervised trajectory fitting, cells whose euclidean distance from the cell-grouping center is above the provided quantile will be excluded.

postFilterQuantile

After initial supervised trajectory fitting, cells whose euclidean distance from the cell-grouping center is above the provided quantile will be excluded.

useAll

A boolean describing whether to use cells outside of trajectory groups for post-fitting procedure.

dof

The number of degrees of freedom to be used in the spline fit. See 'stats::smooth.spline()' for more information.

spar

The sparsity to be used in the spline fit. See 'stats::smooth.spline()' for more information.

force

A boolean value indicating whether to force the trajactory indicated by 'name' to be overwritten if it already exists in the given 'ArchRProject'.

seed

A number to be used as the seed for random number generation for trajectory creation.

seurat

An 'Seurat' object.


RyanYip-Kat/yipCat documentation built on Dec. 18, 2021, 11:55 a.m.