View source: R/removeFeatures-functions.R
removeBlankRatio | R Documentation |
Removes Features with based on QC/blank ratios using the data matrix where rows represent features and columns represent samples. A feature will be retained if there are not enough blank samples to calculate an intensity ratio for a feature (or completely absent in blank samples). Use removeMiss to remove features based on a proportion of missing values. Features with a QC/blank ratio below a cut-off will be discarded.
removeBlankRatio(
x,
blank_samples,
qc_samples,
cut = 2,
type = c("median", "mean"),
blank_min_n = 3
)
x |
A matrix-like object. |
blank_samples |
A vector of sample names or column indices specifying
blank samples for the calculation of ratio. Must be a subset of
|
qc_samples |
A vector of sample names or column indices specifying QC
samples for the calculation of ratio. Must be a subset of
|
cut |
A numeric value greater than 1 specifying a QC/blank ratio cut-off to retain a feature. |
type |
A method to compute a QC/blank ratio. Either "median" or "mean". |
blank_min_n |
An integer value specifying the minimum number of blank samples to calculate a ratio. |
A matrix containing the filtered features.
See removeFeatures that provides a SummarizedExperiment-friendly wrapper for this function.
set.seed(1e7)
m_blank <- matrix(rlnorm(200), ncol = 5)
m_qc <- matrix(rlnorm(400, 1), ncol = 10)
m <- cbind(m_blank, m_qc)
colnames(m) <- c(paste0("B", seq_len(5)), paste0("Q", seq_len(10)))
removeBlankRatio(m, blank_samples = paste0("B", seq_len(5)),
qc_samples = paste0("Q", seq_len(10)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.