add_symptom_results: Add symptom results

View source: R/add_symptom_results.R

add_symptom_resultsR Documentation

Add symptom results

Description

Add symptom results to the results data.table.

Usage

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
)

Arguments

results

The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results

q_threshold

The q value threshold to subset the results by.

effect_threshold

The minimum fold change in specific expression to subset the results by.

celltype_col

Cell type column name in results.

ctd_list

A named list of CellTypeDataset objects each created with generate_celltype_data.

phenotype_to_genes

Output of load_phenotype_to_genes mapping phenotypes to gene annotations.

annotLevels

The annotation level to use within each CTD in ctd_list.

keep_quantiles

Quantiles to keep in each CellTypeDataset of the ctd_list.

top_n

Top N genes to keep when grouping by group_vars.

proportion_driver_genes_symptom_threshold

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_subthreshold

Drop rows that don't meet the proportion_driver_genes_symptom_threshold criterion.

Examples

results = load_example_results()[seq(5000)]
results <- add_symptom_results()

neurogenomics/MultiEWCE documentation built on April 22, 2024, 6:22 a.m.