fetchData: fetchData

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Subset the seurat@data matrix by gene and cluster. Similar to Seurat::FetchData except it doesn't thrown an error if a gene is not found in the data, and is more limited.

Usage

1
2
fetchData(seurat, genes, clusters = NULL, return_cell = FALSE,
  return_cluster = FALSE, scaled = FALSE)

Arguments

seurat

Seurat object

genes

Genes to filter

clusters

(Optional) Vector, include only cells with these identities (e.g. cluster assignments). Searches in seurat@ident.

return_cell

Logical, whether or not to include a column with the cell ID. Default: FALSE

return_cluster

Logical, whether or not to include a column with the cluster. Default: FALSE

scaled

Logical, whether to fetch scaled data from seurat@scale.data. Default: FALSE.

Value

Expression matrix for genes specified

Author(s)

Selin Jessa

Examples

1
2
3
fetchData(pbmc, c("IL32", "MS4A1"))
fetchData(pbmc, c("IL32"), c(1, 2))
fetchData(pbmc, c("IL32", "MS4A1"), c(1, 2), return_cluster = TRUE, return_cell = TRUE)

fungenomics/cytobox documentation built on Feb. 13, 2020, 10:51 a.m.