select_variance: Feature selection based on variance

View source: R/select_variance.R

select_varianceR Documentation

Feature selection based on variance

Description

Perform feature selection on a single-cell feature matrix (e.g., gene expression) by first removing constant features, then removing features with lower than expected variance, as quantified by the residuals from a loess regression of feature (gene) coefficient of variation against mean expression.

Usage

select_variance(mat, var_quantile = 0.5, filter_negative_residuals = FALSE)

Arguments

mat

a single-cell matrix to be filtered, with features (genes) in rows and cells in columns

var_quantile

the quantile below which features will be filtered, based on their residuals in a loess model; defaults to 0.5

filter_negative_residuals

if TRUE, filter residuals at a fixed threshold of zero, instead of var_quantile

Value

the filtered matrix (or, if var_quantile == 1 and filter_negative_residuals == FALSE, the input matrix)


neurorestore/Augur documentation built on Feb. 28, 2024, 3:03 a.m.