GatherFeatures: Gather features

View source: R/GatherFeatures.R

GatherFeaturesR Documentation

Gather features

Description

Gather into a dataframe several metadata columns and features scattered in various assays of a Seurat object. Accepts the format assay_feature to define a feature that is present in several assays non-ambiguously. Otherwise, will pick the features in priority from the default assay, or if not possible return an error.

Usage

GatherFeatures(object, features, assay = DefaultAssay(object), layer = "data")

Arguments

object

Seurat object.

features

character(n). Metadata columns and/or feature names, or assay feature pairs in the form assay_feature.

assay

character(1). From which assay should features be pulled from in priority. Default: DefaultAssay. Other typical options depending on the Seurat object: "RNA", "imputed.RNA", "CiteSeq", "HTO" etc.

layer

character(1). From which layer should features be pulled from. Default: "data". Other typical options: "counts", "scale.data".

Value

Returns a data frame with features or signatures / metadata columns as columns and cells as rows, in the same order as the cells/barcodes in the Seurat object.

Examples

df <- GatherFeatures(MySeuratObject,c("nFeature_RNA","RNA_GAPDH"))

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.