Skip to contents

Filters genes by minimum total counts and minimum expressed-cell fraction using the SCENIC inclusion criteria. Returns a character vector of gene identifiers passing both filters.

Usage

scenic_gene_filter_sc(
  object,
  scenic_params = params_scenic(),
  cells_to_take = NULL,
  .verbose = TRUE
)

Arguments

object

SingleCells, MetaCells (or potentially other) class.

scenic_params

List. SCENIC parameters, see params_scenic(). Only min_counts and min_cells are used by this function.

cells_to_take

Optional string vector. Cell identifiers to restrict to. If NULL, defaults to all filtered cells in the class.

.verbose

Boolean or integer. Controls verbosity and returns run times. FALSE -> quiet, TRUE or 1L -> normal verbosity, 2L -> detailed verbosity.

Value

A character vector of gene identifiers passing the SCENIC inclusion criteria.

Examples

# genes clearing the SCENIC count and prevalence thresholds
sc <- demo_single_cells()
genes <- scenic_gene_filter_sc(
  sc,
  scenic_params = params_scenic(min_counts = 100L, min_cells = 0.05),
  .verbose = FALSE
)
length(genes)
#> [1] 50

unlink(sc@dir_data, recursive = TRUE, force = TRUE)