Apply cv.glmnet() for a list of module IDs
find_all_module_neighbors.RdApply cv.glmnet() for a list of module IDs
Arguments
- df
Dataframe. A normalized dataframe
- test_module
List of string. The module IDs
- seed
Numeric. The seed number, ensuring reproducibility
- ...
Additional arguments passed on to
find_module_neighbors()
Examples
data(data)
data(metadata)
# Simple example
x <- norm_data(data$CRC_JPN, 0.30, annotation_level = "species")[[1]]
neighbors_JPN <- find_all_module_neighbors(
df = x,
test_module = c("msp_0030", "msp_0345"),
seed = 20242025
)
# Example with covariate
# x <- norm_data(data$CRC_CHN, 0.30, annotation_level = "species")[[1]]
# neighbors_CHN <- find_all_module_neighbors(
# df = x,
# test_module = c("msp_0030", "msp_0345"),
# seed = 20242025,
# covar = ~study_accession,
# meta_df = metadata$CRC_CHN,
# sample_col = "secondary_sample_accession"
# )