as.data.frame.Seurat: Gets a data frame from a Seurat object

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

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

Usage

1
2
## S3 method for class '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'

Details

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

Value

a data frame.

Examples

1
2
3
4
5
6
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

jspaezp/sctree documentation built on April 30, 2020, 10:36 p.m.