filterGeneExpr: Filter genes based on their expression

Description Usage Arguments Value See Also Examples

View source: R/data_geNormalisationFiltering.R

Description

Uses filterByExpr to determine genes with sufficiently large counts to retain for statistical analysis.

Usage

1
2
3
4
5
6
7
8
9
filterGeneExpr(
  geneExpr,
  minMean = 0,
  maxMean = Inf,
  minVar = 0,
  maxVar = Inf,
  minCounts = 10,
  minTotalCounts = 15
)

Arguments

geneExpr

Data frame or matrix: gene expression

minMean

Numeric: minimum of read count mean per gene

maxMean

Numeric: maximum of read count mean per gene

minVar

Numeric: minimum of read count variance per gene

maxVar

Numeric: maximum of read count variance per gene

minCounts

Numeric: minimum number of read counts per gene for a worthwhile number of samples (check filterByExpr for more information)

minTotalCounts

Numeric: minimum total number of read counts per gene

Value

Boolean vector indicating which genes have sufficiently large counts

See Also

Other functions for gene expression pre-processing: convertGeneIdentifiers(), normaliseGeneExpression(), plotGeneExprPerSample(), plotLibrarySize(), plotRowStats()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
geneExpr <- readFile("ex_gene_expression.RDS")

# Add some genes with low expression
geneExpr <- rbind(geneExpr,
                  lowReadGene1=c(rep(4:5, 10)),
                  lowReadGene2=c(rep(5:1, 10)),
                  lowReadGene3=c(rep(10:1, 10)),
                  lowReadGene4=c(rep(7:8, 10)))

# Filter out genes with low reads across samples
geneExpr[filterGeneExpr(geneExpr), ]

psichomics documentation built on Nov. 8, 2020, 5:44 p.m.