Generates a beeswarm plot of activity across specified groups

plot_activity(data, activity, group = NULL, labels = NULL,
  vertical = FALSE, stats = NULL, ...)

Arguments

data

data to plot

activity

activity variable

group

grouping variable

labels

legend labels

vertical

should activity be on the y axis. Default is FALSE

stats

dataframe to use to add p values on plot. Stats can be a dataframe output from stat_activity_grouped(). Output must include columsn with names group, group1, q.value and/or p.value. If sepcificied, vertical is TRUE

...

params for add_stats()

See also

Other plot functions: plot_dims, plot_hairpin_coverage

Examples

plot_activity(fsce_tidy, Uracil_45, k_cluster)
plot_activity(fsce_tidy, riboG_44, k_cluster, labels = LETTERS[1:6])
plot_activity(fsce_tidy, Uracil_45, k_cluster, vertical = TRUE)
x <- fsce_tidy[c("k_cluster", "Uracil_45")] stats <- stat_activity_grouped(x, group = k_cluster) stats <- subset(stats, q.value < 0.01) stats[,"y_loc"] = seq(max(x$Uracil_45), max(x$Uracil_45) + 3, length.out = length(stats$group)) plot_activity(fsce_tidy, Uracil_45, k_cluster, stats = stats)
#> Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position