merge_results: Merge results

View source: R/merge_results.R

merge_resultsR Documentation

Merge results

Description

Merges individual .rds files from the results output directory into one. dataframe. Can also handle results lists directly. Alternatively, can simply provide save_dir and .rds files will be searched for and imported.

Usage

merge_results(save_dir = NULL, res_files = NULL, list_name_column = "hpo_id")

Arguments

save_dir

Folder to save merged results in.

res_files

The output of ewce_para (can be either a list of file names, or a nested list of results).

list_name_column

The name of the gene_data column that has the gene list names.

Value

dataframe and merged results.

Examples

set.seed(2023)
gene_data <- HPOExplorer::load_phenotype_to_genes()
ctd <- load_example_ctd()
list_names <- unique(gene_data$hpo_id)[seq(3)]
res_files <- ewce_para(ctd = ctd,
                       gene_data = gene_data,
                       list_names = list_names,
                       force_new = TRUE,
                       reps = 10)
all_results <- merge_results(res_files=res_files)

neurogenomics/MultiEWCE documentation built on Sept. 28, 2024, 2:27 a.m.