Skip to contents

Note – this filters GC bins, then bins by counts, and then cells. So the denominator changes at each step.

Usage

filter_sce(
  sce,
  assay_name = "counts",
  which = c("bins", "cells"),
  min_bin_counts = 1,
  min_bin_prop = 0.95,
  min_cell_counts = min_bin_counts,
  min_cell_prop = min_bin_prop,
  flag_only = FALSE,
  gc_range = c(-Inf, Inf)
)

Arguments

sce

SingleCellExperiment object

assay_name

Name of assay to pull counts from. Ideally raw counts

which

Filter cells or bins

min_bin_counts

A bin requires at least min_bin_counts across min_bin_prop proportion of cells to be kept

min_bin_prop

Minimum proportion of cells with at least min_bin_counts per bin in order to keep a bin

min_cell_counts

A cell requires at least min_cell_counts across min_cell_prop proportion of bins to be kept

min_cell_prop

Minimum proportion of bins with at least min_cell_counts per cell in order to keep a cell

flag_only

Only flag cells/bins, do not remove

gc_range

GC range for bins to keep. Removes large GC outliers

Value

SingleCellExperiment object