Add symptom results to the results data.table.
add_symptom_results(
results = load_example_results(),
q_threshold = 0.05,
effect_threshold = NULL,
celltype_col = "CellType",
ctd_list = load_example_ctd(file = paste0("ctd_", unique(results$ctd), ".rds"),
multi_dataset = TRUE),
phenotype_to_genes = HPOExplorer::load_phenotype_to_genes(),
annotLevels = map_ctd_levels(results),
keep_quantiles = seq(30, 40),
top_n = NULL,
proportion_driver_genes_symptom_threshold = 0.25,
drop_subthreshold = FALSE
)
The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results
The q value threshold to subset the results
by.
The minimum fold change in specific expression
to subset the results
by.
Cell type column name in results
.
A named list of CellTypeDataset objects each created with generate_celltype_data.
Output of load_phenotype_to_genes mapping phenotypes to gene annotations.
The annotation level to use within each CTD in
ctd_list
.
Quantiles to keep in each CellTypeDataset of the
ctd_list
.
Top N genes to keep when grouping by group_vars
.
The minimum proportion of overlap between symptom genes (genes annotated to a phenotype via a specific disease) and the driver genes (genes driving a signficant phenotype-cell type association).
Drop rows that don't meet the
proportion_driver_genes_symptom_threshold
criterion.
results <- load_example_results()[seq(5000)]
results <- add_symptom_results(results)
#> Adding symptom-level results.
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-12-12
#> Subsetting results by q_threshold and effect.
#> 88 associations remain after filtering.
#> Adding genes and disease IDs.
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2024-12-12
#> Loading ctd_DescartesHuman.rds