buildTree {CytoTree}R Documentation

buildTree

Description

buildTree

Usage

buildTree(
  object,
  method = "euclidean",
  dim.type = c("raw", "pca", "tsne", "dc", "umap"),
  dim.use = seq_len(2),
  verbose = FALSE
)

Arguments

object

an CYT object

method

character. Mehtod to build MST.

dim.type

character. Type of dimensions that will be used to build the tree. Five dim.type are provided, 'raw', 'pca', 'tsne', 'dc' and 'umap'. By default is 'raw'.

dim.use

numeric. Number of dimensions that will be used to build the tree. For example. If dim.use is 'raw', there is no limit for dim.type. And if the dim.use is 'tsne' or 'umap', the default dim.use is seq_len(2).

verbose

logical. Whether to print calculation progress.

Value

An CYT object with tree

Examples


cyt.file <- system.file("extdata/cyt.rds", package = "CytoTree")
cyt <- readRDS(file = cyt.file)

cyt <- buildTree(cyt, dim.type = "raw")

# build minimum spanning tree (MST) based on tsne
cyt <- buildTree(cyt, dim.type = "tsne", dim.use = seq_len(2))

# Using PCA
cyt <- buildTree(cyt, dim.type = "pca", dim.use =seq_len(4))

# Using UMAP
cyt <- buildTree(cyt, dim.type = "umap", dim.use = seq_len(2))

# Using Diffusion Maps
cyt <- buildTree(cyt, dim.type = "dc", dim.use = seq_len(3))



[Package CytoTree version 1.4.0 Index]