plotDAbeeswarm: Visualize DA results as a beeswarm plot

plotDAbeeswarmR Documentation

Visualize DA results as a beeswarm plot

Description

This function constructs a beeswarm plot using the ggplot engine to visualise the distribution of log fold changes across neighbourhood annotations.

Usage

plotDAbeeswarm(da.res, group.by = NULL, alpha = 0.1, subset.nhoods = NULL)

Arguments

da.res

a data.frame of DA testing results

group.by

a character scalar determining which column of da.res to use for grouping. This can be a column added to the DA testing results using the 'annotateNhoods' function. If da.res[,group.by] is a character or a numeric, the function will coerce it to a factor (see details) (default: NULL, no grouping)

alpha

significance level for Spatial FDR (default: 0.1)

subset.nhoods

A logical, integer or character vector indicating a subset of nhoods to show in plot (default: NULL, no subsetting)

Details

The group.by variable will be coerced to a factor. If you want the variables in group.by to be in a given order make sure you set the column to a factor with the levels in the right order before running the function.

Value

a ggplot object

Author(s)

Emma Dann

Examples

NULL


MikeDMorgan/miloR documentation built on Feb. 29, 2024, 6:20 p.m.