View source: R/plot_differential_outcomes_heatmap.R
plot_differential_outcomes_heatmap | R Documentation |
Plot differential outcomes: heatmap
plot_differential_outcomes_heatmap(
phenotypes = NULL,
results = load_example_results(),
celltype_col = "cl_name",
outcome_var = "AgeOfDeath_score_mean",
x_var = "celltype_symptom",
title = "Differential outcomes by cell type",
subtitle = paste0("Phenotype(s): ", paste(phenotypes, collapse = "; ")),
fill_limits = NULL,
print_phenotypes = TRUE,
show_plot = TRUE,
save_path = NULL,
height = NULL,
width = NULL,
...
)
phenotypes |
HPO phenotypes to include. Can be provided either as names (e.g. "Hypotonia") or HPO IDs (e.g. "HP:0001252"). |
results |
The cell type-phenotype enrichment results generated by gen_results and merged together with merge_results |
celltype_col |
Name of the cell type column in the |
outcome_var |
Outcome variable to plot. |
x_var |
Variable to plot on the x-axis. |
title |
Title of the plot. |
subtitle |
Subtitle of the plot. |
fill_limits |
Min/max limits for the fill scale. |
print_phenotypes |
Print the phenotypes in the subtitle. |
show_plot |
Print the plot to the console. |
save_path |
Save the plot to a file.
Set to |
height |
Height of the saved plot. |
width |
Width of the saved plot. |
... |
Arguments passed on to
|
results <- load_example_results()
keep_descendants <- "Hypotonia" # HP:0001252
results2 <- HPOExplorer::filter_descendants(results,
keep_descendants = keep_descendants)
results2 <- HPOExplorer::add_death(results2,
allow.cartesian = TRUE,
agg_by = c("disease_id","hpo_id"))
out <- plot_differential_outcomes_heatmap(results=results2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.