Learn R Programming

RaceID (version 0.3.9)

pseudoTime: Extract pseudo-time order of cells along a trajectory

Description

Extract pseudo-time order of cells along a trajectory defined by a set of clusters using the slingshot algorithm. If the slingshot package is unavailable, the function falls back to inference by principal curve analysis using the princurve package.

Usage

pseudoTime(
  object,
  set,
  m = NULL,
  useSlingshot = TRUE,
  map = "umap",
  x = NULL,
  n_neighbors = 15,
  metric = "euclidean",
  n_epochs = 200,
  min_dist = 0.1,
  local_connectivity = 1,
  spread = 1,
  initial_cmd = TRUE,
  perplexity = 30,
  rseed = 15555,
  ...
)

Value

List object of six components:

pt

Vector of pseudo-time value obtained by slingshot.

ord

Vector of cells in set ordered by pseudo-time, starting with the first cluster in set.

set

Vector of cluster numbers defining the trajectory used for pseudo-time inference.

part

Vector of cluster numbers of all cells in set.

rd

Two-dimensional matrix with x- and y-coordinates of dimensional reduction representation used for slingshot.

sls

slingshot data object.

Arguments

object

RaceID SCseq object.

set

Set of valid ordered cluster numbers (in object@cpart) defining the trajectory for which the pseudo-temporal order of cells should be computed computed. Only clusters on a single, linear trajectory should be given.

m

Existing dimensional reduction representation of RaceID object. Either "fr", "tsne" or "umap". Default is NULL and dimensional reduction representation is computed for all cells in set.

useSlingshot

logical. If TRUE and the slingshot package is available, trajectory inference will be done using slingshot. If FALSE, inference will be done by principal curve analysis using the princurve package. Default is TRUE.

map

Either "tsne" or "umap". If m is NULL this argument determines the algorithm (UMAP or t-SNE) for computing the dimensional reduction representation of all cells set used for pseudo-temporal ordering by the Bioconductor package slingshot. Default is "umap".

x

Optional feature matrix, which will be directly used for computation of the dimensional reduction representation. Default is NULL and object@dimRed$x is used, unless empty. In this case, getfdata(object) is used.

n_neighbors

Umap parameter (used if map="umap" and m=NULL). See help(umap.defaults) after loading package umap. Default is 15.

metric

Umap parameter (used if map="umap" and m=NULL). See help(umap.defaults) after loading package umap. Default is "euclidean".

n_epochs

Umap parameter (used if map="umap" and m=NULL). See help(umap.defaults) after loading package umap. Default is 200.

min_dist

Umap parameter (used if map="umap" and m=NULL). See help(umap.defaults) after loading package umap. Default is 0.1.

local_connectivity

Umap parameter (used if map="umap" and m=NULL). See help(umap.defaults) after loading package umap. Default is 1.

spread

Umap parameter (used if map="umap" and m=NULL). See help(umap.defaults) after loading package umap. Default is 1.

initial_cmd

logical. t-SNE parameter (used if map="tsne" and m=NULL). If TRUE, then the t-SNE map computation is initialized with a configuration obtained by classical multidimensional scaling. Default is TRUE.

perplexity

Positive number. t-SNE parameter (used if map="tsne" and m=NULL). Perplexity of the t-SNE map. Default is 30.

rseed

Integer number. Random seed to enforce reproducible dimensional reduction computation.

...

Additional arguments to be passed to the getCurves function of the slingshot package.