View source: R/removeFeatures-functions.R
removeICC | R Documentation |
Removes Features based on a intraclass correlation coefficient (ICC) using the data matrix where rows represent features and columns represent samples. For each feature, ICC will be calculated using both biological and QC samples to identify how much of the total variation is explained by biological variability, as described in Schiffman, C et al (2019). Informative features are expected to have relatively high variability across the biological samples, compared to QC replicates. Features with an ICC below a cut-off will be removed.
removeICC(
x,
qc_samples,
bio_samples = setdiff(colnames(x), qc_samples),
cut = 0.4
)
x |
A matrix-like object. |
qc_samples |
A vector of sample names or column indices specifying QC
samples for the calculation of ICC. Must be a subset of
|
bio_samples |
A vector of sample names or column indices specifying
biological samples for the calculation of ICC. Must be a subset of
|
cut |
A numeric value between 0 and 1 specifying a ICC cut-off to retain a feature. |
A matrix containing the filtered features.
Schiffman, C., Petrick, L., Perttula, K. et al. Filtering procedures for untargeted LC-MS metabolomics data. BMC Bioinformatics 20, 334 (2019). https://doi.org/10.1186/s12859-019-2871-9
See removeFeatures that provides a SummarizedExperiment-friendly wrapper for this function.
set.seed(1e7)
m_bio_1 <- matrix(rlnorm(600, sdlog = 1), ncol = 20)
m_bio_2 <- matrix(rlnorm(200, sdlog = 0.3), ncol = 20)
m_bio <- rbind(m_bio_1, m_bio_2)
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)))
removeICC(m, qc_samples = paste0("Q", seq_len(10)),
bio_samples = paste0("S", seq_len(20)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.