This function takes a Seurat object as an input, and returns an expression matrix based on subsetting parameters. Either none, one, or two metadata features can be selected for a given input.

seurat_extract(
  seu_obj,
  assay = "RNA",
  meta1 = NULL,
  value_meta1 = NULL,
  meta2 = NULL,
  value_meta2 = NULL,
  pseudocount = 0.001
)

Arguments

seu_obj

Seurat object

assay

Seurat assay to extract. Defaults to RNA

meta1

Metadata column to subset

value_meta1

Value to select within meta1 column

meta2

Metadata column to subset

value_meta2

Value to select within meta2 column

pseudocount

Pseudocount to add to data. Defaults to 0.001

Value

Matrix containing count values of selected populations

Examples

if (FALSE) {
cd4 <- seurat_extract(
   Seurat_Object,
   meta1 = "Hour",
   value_meta1 = 12,
   meta2 = "Cell_Type",
   value_meta2 = "CD4"
)
}