removeRSD: Feature Filtering based on RSD

View source: R/removeFeatures-functions.R

removeRSDR Documentation

Feature Filtering based on RSD

Description

Removes Features with low reproducibility based on a relative standard deviation (also known as coefficient of variation) of QC samples using the data matrix where rows represent features and columns represent samples. Features with a RSD above a cut-off will be removed from the data.

Usage

removeRSD(x, qc_samples, cut = 0.3)

Arguments

x

A matrix-like object.

qc_samples

A vector of sample names or column indices specifying QC samples for the calculation of RSD. Must be a subset of colnames(x) if it is a character vector.

cut

A numeric value between specifying a RSD cut-off to retain a feature.

Value

A matrix containing the filtered features.

See Also

See removeFeatures that provides a SummarizedExperiment-friendly wrapper for this function.

Examples


set.seed(1e7)

m_bio <- matrix(rlnorm(800, sdlog = 1), ncol = 20)
m_qc <- matrix(rlnorm(400, sdlog = 0.25), ncol = 10)
m <- cbind(m_bio, m_qc)
colnames(m) <- c(paste0("S", seq_len(20)), paste0("Q", seq_len(10)))

removeRSD(m, qc_samples = paste0("Q", seq_len(10)))


HimesGroup/qmtools documentation built on April 16, 2023, 8 p.m.