remove_genes: Remove genes based on different criteria

View source: R/remove_genes.R

remove_genesR Documentation

Remove genes based on different criteria

Description

Remove genes with no variability (method = "constant"), missing values (method = "missing") or low expression (method = "detection.pvalue", method = "zero" or method = "edgeR").

Usage

remove_genes(
  se,
  assay = 1,
  method,
  freq = 0.25,
  min.count = 10,
  min.total.count = 15,
  verbose = FALSE
)

Arguments

se

RangedSummarizedExperiment-class object

assay

Character or integer. Name or number of assay to be used for filtering.

method

Method to determine genes to be removed: "constant", "missing", "detection.pvalue", "zero", "edgeR" (using filterByExpr).

freq

Numeric. If more than freq*100 % of the samples fulfill criterion, the gene is removed (not used if method = "constant").

min.count

Numeric. Minimum count required for at least some samples ( used only if method = "edgeR").

min.total.count

Numeric. Minimum total count required ( used only if method = "edgeR").

verbose

Logical. Should number of removed genes be reported?

Value

RangedSummarizedExperiment-class object with genes removed

Examples

data("se.probeset")
print(se.probeset)

## remove probesets with missing values
se.probeset.red = remove_genes(se = se.probeset,
                               assay = "exprs.log",
                               method = "missing",
                               freq = 0)
print(se.probeset.red)

## remove probesets with low expression
se.probeset.red = remove_genes(se = se.probeset,
                               assay = "detection.pvalue",
                               method = "detection.pvalue",
                               freq = 0.75)
print(se.probeset.red)

szymczak-lab/QCnormSE documentation built on March 25, 2023, 1:05 p.m.