View source: R/removeFeatures-functions.R
removeMiss | R Documentation |
Removes Features based on proportions of missing values in the matrix where rows represent features and columns represent samples. Features can be removed based on missing values within a specific group or multiple groups. A feature will be retained, if there is at least one group with a proportion of non-missing values above a cut-off.
removeMiss(x, group, levels = NULL, cut = 0.7)
x |
A matrix-like object. |
group |
A character vector for the information about each sample's group. |
levels |
A string or character vector specifying one or more groups for
filter filtering based on missing values. If |
cut |
A numeric value between 0 and 1 specifying a minimum proportion of non-missing values to retain a feature. |
A matrix containing the filtered features.
See removeFeatures that provides a SummarizedExperiment-friendly wrapper for this function.
data(faahko_se)
m <- assay(faahko_se, "raw")
g <- colData(faahko_se)$sample_group
table(g)
## Filter based on missing values in "KO" and "WT" groups
removeMiss(m, group = g, cut = 0.9)
## Consider only "KO" group (can be useful for QC-based filtering)
removeMiss(m, group = g, levels = "KO", cut = 0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.