filterGenes

Filter genes based on expression

Description

This function removes genes that are very lowly expressed.

Usage

filterGenes(spe, prop = 0.1)

## S4 method for signature 'SpatialExperiment'
filterGenes(spe, prop = 0.1)

## S4 method for signature 'Seurat'
filterGenes(spe, prop = 0.1)

Arguments

spe a SpatialExperiment, Seurat, or SpatialFeatureExperiment object containing count data.
prop a numeric, indicating the proportion of loci/cells where the gene should be expressed (default is 0.1, i.e., genes should be expressed in at least 10% of the loci/cells).

Value

a logical vector encoding which genes should be kept for further analysis.

Examples

library("SpaNorm")

data(HumanDLPFC)
keep <- filterGenes(HumanDLPFC)
table(keep)
keep
TRUE 
5076