Get filtered MultiDataSet object based on variability measure
Source:R/prefiltering.R
get_filtered_dataset_variability.Rd
Selects most highly variable features from omics datasets based on features' variability (e.g. MAD or COV).
Arguments
- mo_data
A
MultiDataSet-class
object.- var_list
A list with the result from the MAD or COV calculation for each dataset to be filtered, as returned by the
select_features_mad
orselect_features_cov
function.
Value
A MultiDataSet-class
object.
Examples
if (FALSE) { # \dontrun{
# Goal: keep 20% of features in dataset1, and 50% of features in dataset2
to_keep_prop <- c("dataset1" = 0.2, "dataset_2" = 0.5)
# 1) compute MAD values and select features for dataset1 and dataset2
mad_list <- lapply(names(to_keep_prop), function(i) {
select_features_mad(mo_data, i, to_keep_prop[i])
})
# 2) Get the filtered dataset
mo_data_filtered <- get_filtered_dataset_variability(mo_data, mad_list)
} # }