plot_activity: Plot activities per cluster

Description Usage Arguments See Also Examples

View source: R/plots.R

Description

Generates a beeswarm plot of activity across specified groups

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

hesselberthlab/scrunchy documentation built on Nov. 11, 2019, 2:29 p.m.