Subset RD EWCE results data by cell type, fold change and q value.

subset_results(
  cell_type,
  results = load_example_results(),
  q_threshold = 5e-04,
  fold_threshold = 1,
  hpo = HPOExplorer::get_hpo(),
  phenotype_to_genes = HPOExplorer::load_phenotype_to_genes(),
  verbose = TRUE
)

Arguments

cell_type

The cell type of interest to be plotted. Can be a single string (e.g. "Astrocytes") or a character vector of multiple cell types (e..g. c("Astrocytes","Microglia")). Set to NULL if you wish to include all cell-types that are available (after q_threshold and fold_threshold filtering). If >1 cell-type remains, results will be aggregated automatically such that there is only 1 node per phenotype.

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.

fold_threshold

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

hpo

Human Phenotype Ontology object, loaded from ontologyIndex.

phenotype_to_genes

Output of load_phenotype_to_genes mapping phenotypes to gene annotations.

verbose

Print messages.

Value

A data frame of the selected subset of RD EWCE results with HPO ID column added.

Examples

signif_cell_data <- subset_results(cell_type="Amacrine cells")
#> Subsetting results by q_threshold and fold_change.
#> WARNING!: CellType 'Amacrine cells' ... not found in results.
#>   Defaulting to first CellType available: 'ENS_glia'
#> 22,444 associations remain after filtering.