Visualize MiloR DA results
Usage
leo_milo_vis(
milo_obj,
da_results,
plot = c(1, 2),
layout = "UMAP.HARMONY",
alpha = 0.05,
log2fc_colours = c(low = "#070091", mid = "white", high = "#910000"),
log2fc_limits = c(-5, 5),
cell_type = "cell_anno",
mix_threshold = 0.7,
bee_order = NULL,
bee_labs = c(x = "Cell Type", y = "Log Fold Change"),
bee_add_box = TRUE
)Arguments
- milo_obj
A
Miloobject.- da_results
Output from
miloR::testNhoods().- plot
Integer vector. Which plots to return:
1for neighbourhood graph,2for beeswarm plot.- layout
Embedding stored in the Milo object (default
"UMAP.HARMONY").- alpha
FDR cutoff (default
0.05).- log2fc_colours
Named vector with three colours for the log2FC gradient (
c(low, mid, high)).- log2fc_limits
Two-element numeric vector giving colour-scale limits.
- cell_type
Character. Column in the metadata used to annotate neighbourhoods (default
"cell_anno").- mix_threshold
Minimum fraction of a single annotation to avoid calling the neighbourhood “Mixed”.
- bee_order
Optional character vector specifying the display order of groups in the beeswarm plot.
- bee_labs
Named character vector giving axis titles for the bee plot: (
c(x = "Cell Type", y = "Log Fold Change")). IfNULL, no axis labels are added.- bee_add_box
Logical. If
TRUE, adds a boxplot to the beeswarm plot (defaultTRUE).