gene_filter: Removes low expression and low variability genes from a gene...

View source: R/gene_filter.R

gene_filterR Documentation

Removes low expression and low variability genes from a gene expression matrix. Filters by the proportion of expressed genes, and/or min expression difference.

Description

A wrapper of two genefilter functions to filter low expressed and low variability genes (rows). The default settings will keep genes for which 1) at least 33 or above; and 2) ratio of maximal/minimal intensity is at least 2

Usage

gene_filter(
  mtx,
  proportion = 0.33,
  average_expression = 10,
  min_difference = 2
)

Arguments

mtx

a matrix of genes (rows) vs. samples (columns), or an ExpressionSet. Required.

proportion

a proportion of samples having gene expressed above 'average_expression'. Default - 0.33

average_expression

expression level to be exceeded when calculating 'proportion'. Default - 10

min_difference

expression difference between maximal and minimal intensity to be exceeded for a gene to be used. Default - 2

Value

a filtered matrix

TODO

Implement three separate filtering functions: 1) Signal filtering, removing genes with expression at or below defined level, at or more defined proportion; 2) Absolute value of change, max-min difference should be larger than a defied threshold; 3) Variance filtering, variance should be larger than a defined threshold

Note

Example from "Statistics and Data Analysis for Microarrays Using R and Bioconductor" book by Sorin Drăghici, p/ 778

Filtering should be done with caution, 10.1186/1471-2105-11-450.

Examples


## Not run: 
set.seed(2)
mtx <- rbind(matrix(rnorm(200, mean = 9,  sd = 2), ncol = 20),
             matrix(rnorm(200, mean = 10, sd = 5), ncol = 20))
dim(mtx)
dim(gene_filter(mtx))

## End(Not run)


mdozmorov/MDmisc documentation built on Aug. 24, 2022, 9:18 a.m.