Aggregate enrichment results from generated by gen_results. Counts unique entries in count_var while grouping by group_var.

agg_results(
  phenos,
  count_var = "hpo_name",
  group_var = "CellType",
  sep = "; ",
  verbose = TRUE
)

Arguments

phenos

A data.table containing HPO IDs and other metadata.

count_var

Variable to get counts for per group_var.

group_var

Variable to group counts by.

sep

Separator for collapsed character columns.

verbose

Print messages.

Value

Aggregated data.table

Examples

phenos <- subset_results(filters = list(CellType="Microglia"))
#> Subsetting results by q_threshold and effect.
#> Selected CellType : 
#>  - Microglia
#> Filtered 'CellType' : 25,235 / 25,394 rows dropped.
#> 159 associations remain after filtering.
agg_res <- agg_results(phenos = phenos)
#> Aggregating results by group_var='CellType'
#> Adding HPO names.
#> Translating ontology terms to names.
#> Warning: argument is not numeric or logical: returning NA
#> Warning: argument is not numeric or logical: returning NA