Summarise results from MSTExplorer.
summarise_results(
results,
group_var = "ctd",
add_merged = TRUE,
phenotype_to_genes = HPOExplorer::load_phenotype_to_genes(),
digits = 3,
save_path = tempfile("summarise_results.csv")
)
The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results
Variable to segregate results by.
Add a merged summary across all groups.
Output of load_phenotype_to_genes mapping phenotypes to gene annotations.
a positive integer indicating how many significant digits
are to be used for
numeric and complex x
. The default, NULL
, uses
getOption("digits")
. This is a suggestion: enough decimal
places will be used so that the smallest (in magnitude) number has
this many significant digits, and also to satisfy nsmall
.
(For more, notably the interpretation for complex numbers see
signif
.)
Path to save the summary to as a CSV.
results <- load_example_results()
summary_split <- summarise_results(results, group_var="ctd")
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-12-12
#> Saving results --> /tmp/RtmpMmVOaL/summarise_results.csv2ffc1ea36966
summary_merged <- summarise_results(results, group_var=NULL)
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-12-12
#> Saving results --> /tmp/RtmpMmVOaL/summarise_results.csv2ffc65c317fc