runPseudotime {CytoTree} | R Documentation

## Calculation of Pseudotime

### Description

calculation of Pseudotime based on KNN

### Usage

    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

    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")

[Package CytoTree version 1.0.3 Index]