View source: R/plot_bar_dendro.R
plot_bar_dendro | R Documentation |
Create a plot summarising MSTExplorer results as a bar chart with multiple facets showing selected branches from the Human Phenotype Ontology (HPO). Also shows a dendrogram of celltype-celltype relationships using the Cell Ontology (CL).
plot_bar_dendro(
results = load_example_results(),
celltype_col = "cl_name",
target_branches = get_target_branches(),
keep_ancestors = names(target_branches),
hpo = HPOExplorer::get_hpo(),
cl = KGExplorer::get_ontology(name = "cl", lvl = 1, remove_rings = TRUE),
facets = "ancestor_name",
add_test_target_celltypes = TRUE,
preferred_palettes = "tol",
legend.position = "none",
heights = c(0.3, 1, 0.15, 0.3),
expand_dendro_x = rep(0.01, 2),
q_threshold = 0.05,
show_plot = TRUE,
save_path = NULL,
height = 16,
width = 13,
...
)
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 |
target_branches |
A named list of HPO branches each matched with CL cell type branches that correspond to on-target cell types across the two ontologies. |
keep_ancestors |
Only HPO terms that have these ancestors will be kept. |
hpo |
Human Phenotype Ontology object, loaded from get_ontology. |
cl |
Cell Ontology (CL) object from
|
facets |
A set of variables or expressions quoted by For compatibility with the classic interface, can also be a
formula or character vector. Use either a one sided formula, |
add_test_target_celltypes |
Using the significant phenotype-cell type
association |
preferred_palettes |
Preferred palettes to use for each column. |
legend.position |
the default position of legends ("none", "left", "right", "bottom", "top", "inside") |
heights |
Passed to wrap_plots. |
expand_dendro_x |
Passed to scale_x_discrete in the cell type dendrogram. |
q_threshold |
The q value threshold to subset the |
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
|
A bar chart with dendrogram of EWCE results in each cell type.
results <- load_example_results()
out <- plot_bar_dendro(results = results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.