Provided a Seurat object, returs a data frame of the count values, being the columns each 'gene' and the rows each UMI/cell.

# S3 method for Seurat
as.data.frame(x, genes = Seurat::VariableFeatures(x), fix_names = TRUE, ...)

Arguments

x

A Seurat object

genes

genes to extract to the data.frame

fix_names

logical value indicating wether the gene names should be converted to R-compatible names. defaults to FALSE

...

additional arguments passed to `Seurat::FetchData`

Value

a data frame.

Details

It returns only the genes annotated as variable and the identity column.

Examples

as.data.frame(Seurat::pbmc_small, Seurat::VariableFeatures(Seurat::pbmc_small))[1:3,1:3]
#> PPBP IGLL5 VDAC3 #> ATGCCAGAACGACT 0.000000 0 0 #> CATGGCCTGTGCAT 0.000000 0 0 #> GAACCTGATGAACC 4.753095 0 0
# PPBP IGLL5 VDAC3 # ATGCCAGAACGACT 0.000000 0 0 # CATGGCCTGTGCAT 0.000000 0 0 # GAACCTGATGAACC 4.753095 0 0