View source: R/GatherFeatures.R
GatherFeatures | R Documentation |
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.
GatherFeatures(object, features, assay = DefaultAssay(object), layer = "data")
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". |
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.
df <- GatherFeatures(MySeuratObject,c("nFeature_RNA","RNA_GAPDH"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.