subsetCYT: subset CYT object

Description Usage Arguments Value Examples

View source: R/subsetCYT.R

Description

This subsets an CYT object by given a list of cells or cluster id. This function will subset all results without recalculating them, such as knn, PCA, tSNE, umap and pseudotime. For instance, you can choose recalculate PCA and tSNE and destiny scores by paramter recalculate.

Usage

1
subsetCYT(object, cells = NULL, knn = NA, verbose = FALSE)

Arguments

object

A CYT object

cells

vector, Names of the cells to retain.

knn

numeric. If is NA, the KNN will be equal to the knn number in the input CYT object.

verbose

logic. Whether to print calculation progress.

Value

A CYT object

Examples

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

meta.data <- fetchPlotMeta(cyt)
cells <- meta.data$cell[which(meta.data$stage == "D0")]
sub.cyt <- subsetCYT(cyt, cells = cells)
sub.cyt

CytoTree documentation built on Nov. 10, 2020, 2 a.m.