Skip to contents

Subsets a SummarizedExperiment to the n most variable features (genes), ranked by row variance.

Usage

top_variable_features(se, n = 500, assay_name = "counts")

Arguments

se

A SummarizedExperiment object.

n

Number of top variable features to select. Default: 500.

assay_name

Name of the assay to use. Default: "counts".

Value

A SummarizedExperiment subset to the top n variable features, preserving all sample metadata.

Examples

data(airway, package = "airway")
se_top <- top_variable_features(airway, n = 50)
dim(se_top)
#> [1] 50  8