Plot the frequency of gene-phenotype and phenotype-disease associations.

frequency_barplot(
  results = load_example_results(),
  phenotype_to_genes = load_phenotype_to_genes(),
  show_plot = FALSE,
  verbose = TRUE
)

Arguments

results

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

phenotype_to_genes

Output of load_phenotype_to_genes mapping phenotypes to gene annotations.

show_plot

Print the plot after it has been created.

verbose

Print messages.

Value

ggplot object

Examples

results <- load_example_results()[seq(5000),]
fp_res <- frequency_barplot(results=results)
#> Annotating phenotype frequencies.
#> Annotating phenos with Disease
#> Reading cached RDS file: phenotype.hpoa
#> + Version: v2023-10-09
#> Adding level-3 ancestor to each HPO ID.
#>  All local files already up-to-date!
#> Reading cached RDS file: phenotype_to_genes.txt
#> + Version: v2023-10-09
#> Annotating gene frequencies.
#> Reading cached RDS file: genes_to_phenotype.txt
#> + Version: v2023-10-09
#> Adding level-3 ancestor to each HPO ID.
#>  All local files already up-to-date!
#> 96.2% of rows are NA.
#> 99.3% of rows are NA.