subsetCYT {CytoTree} | R Documentation

## subset CYT object

### 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

    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

    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

[Package CytoTree version 1.0.3 Index]