
Filter features by genomic annotation
GetFeatures.RdReturns a character vector of gene names matching any combination of
chromosome, biotype, or name pattern filters. Requires AnnotateFeatures()
to have been run first.
Usage
GetFeatures(
seurat_object,
chromosome = NULL,
gene_biotype = NULL,
pattern = NULL,
assay = NULL,
invert = FALSE
)Arguments
- seurat_object
A Seurat object with feature annotations.
- chromosome
Numeric or character vector of chromosomes to keep, e.g.
1:19,c("X","Y"),"MT". Both"1"and"chr1"are accepted.NULLkeeps all chromosomes.- gene_biotype
Character vector of Ensembl biotype(s) to keep, e.g.
"protein_coding",c("protein_coding","lncRNA").NULLkeeps all.- pattern
Character. Regular expression matched against gene names.
NULLskips pattern filtering.- assay
Character. Which assay's feature metadata to use.
- invert
Logical. Return genes that do NOT match the filters. Default
FALSE.