FetchData: Access cellular data

View source: R/generics.R

FetchDataR Documentation

Access cellular data

Description

Retrieves data (feature expression, PCA scores, metrics, etc.) for a set of cells in a Seurat object

Usage

FetchData(object, ...)

## S3 method for class 'DimReduc'
FetchData(object, vars, cells = NULL, ...)

## S3 method for class 'Seurat'
FetchData(
  object,
  vars,
  cells = NULL,
  layer = NULL,
  clean = TRUE,
  slot = deprecated(),
  ...
)

Arguments

object

An object

...

Arguments passed to other methods

vars

List of all variables to fetch, use keyword “ident” to pull identity classes

cells

Cells to collect data for (default is all cells)

layer

Layer to pull feature data for

clean

Remove cells that are missing data; choose from:

  • all”: consider all columns for cleaning

  • ident”: consider all columns except the identity class for cleaning

  • project”: consider all columns except the identity class for cleaning; fill missing identity values with the object's project

  • none”: do not clean

Passing TRUE is a shortcut for “ident”; passing FALSE is a shortcut for “none

slot

Deprecated in favor of layer

Value

A data frame with cells as rows and cellular data as columns

Examples

pc1 <- FetchData(object = pbmc_small, vars = 'PC_1')
head(x = pc1)
head(x = FetchData(object = pbmc_small, vars = c('groups', 'ident')))


SeuratObject documentation built on May 29, 2024, 12:31 p.m.