Skip to contents

Extracts top genes from each NMF program and prepares them for gene set enrichment analysis. Returns both gene lists and a summary table.

Usage

prepareProgramGeneSets(x, nmf_name = "NMF", n_genes = 50, min_loading = 0.01)

Arguments

x

A SingleCellExperiment object with NMF results

nmf_name

Character, name of NMF result to use (default "NMF")

n_genes

Integer, number of top genes per program (default 50)

min_loading

Numeric, minimum loading value to include gene (default 0.01)

Value

List with gene_sets (named list of gene vectors) and summary table

Examples

sce <- runNMFscape(sce, k = 8)
#> Error: object 'sce' not found
gene_sets <- prepareProgramGeneSets(sce, n_genes = 100)
#> Error: object 'sce' not found
# Use with clusterProfiler, fgsea, etc.