runPseudotime: Calculation of Pseudotime

Description Usage Arguments Value Examples

View source: R/pseudotime.R

Description

calculation of Pseudotime based on KNN

Usage

1
2
3
4
5
6
7
8
runPseudotime(
  object,
  mode = "undirected",
  dim.type = c("raw", "pca", "tsne", "dc", "umap"),
  dim.use = seq_len(2),
  verbose = FALSE,
  ...
)

Arguments

object

A CYT object

mode

character. Specifies how igraph should interpret the supplied matrix. Possible values are: directed, undirected, upper, lower, max, min, plus.

dim.type

character. Type of dimensionality reduction method used to calculate pseudotime: raw, umap, tsne, dc and pca. By default is raw.

dim.use

numeric. Dimensions used to calculate pseudotime

verbose

logical. Whether to print calculation progress.

...

Parameters passing to calculation function.

Value

A CYT object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
cyt.file <- system.file("extdata/cyt.rds", package = "CytoTree")
cyt <- readRDS(file = cyt.file)

cyt <- runPseudotime(cyt, verbose = TRUE, dim.type = "raw")
cyt <- runPseudotime(cyt, verbose = TRUE, dim.type = "umap", dim.use = seq_len(2))
cyt <- runPseudotime(cyt, verbose = TRUE, dim.type = "tsne", dim.use = seq_len(2))
cyt <- runPseudotime(cyt, verbose = TRUE, dim.type = "dc", dim.use = seq_len(3))
cyt <- runPseudotime(cyt, verbose = TRUE, dim.type = "pca", dim.use = seq_len(3))

# tSNE plot colored by pseudotime
plot2D(cyt, item.use = c("tSNE_1", "tSNE_2"), category = "numeric",
       size = 1, color.by = "pseudotime") 
# UMAP plot colored by pseudotime
plot2D(cyt, item.use = c("UMAP_1", "UMAP_2"), category = "numeric",
       size = 1, color.by = "pseudotime") 

JhuangLab/CytoTree documentation built on Nov. 16, 2020, 7:23 a.m.