defLeafCells: definition of leaf cells

Description Usage Arguments Value Examples

View source: R/pseudotime.R

Description

definition of root cells

Usage

1
defLeafCells(object, leaf.cells = NULL, pseudotime.cutoff = 0, verbose = FALSE)

Arguments

object

a CYT object

leaf.cells

character or numeric. Cell name of the root cells or cluster.id of root.cells

pseudotime.cutoff

numeric. Cutoff of pseudotime. Cells with pseudotime over pseudotime.cutoff will be set to be leaf cells

verbose

logical. Whether to print calculation progress.

Value

A CYT object

Examples

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

# Define leaf cells by cluster
cyt <- defLeafCells(cyt, leaf.cells = 1, verbose = TRUE)
cyt <- defLeafCells(cyt, leaf.cells = c(1,3), verbose = TRUE)

# Define root cells by cell names
meta.data <- fetchPlotMeta(cyt)
cells <- meta.data$cell[which(meta.data$stage == "D10")]
cells <- as.character(cells)
cyt <- defLeafCells(cyt, leaf.cells = cells, verbose = TRUE)

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