Description Usage Arguments Value Examples
View source: R/plot_bar_list.R
Reads a list of frequencies calculated for different groups (see above_threshold) and makes a barplot for the mean between groups or for the individual measurements. Use to plot number of identified peptides/proteins per group or per sample.
1 | plot_bar_list(x, compare = "groups", ylim = c(0, NA))
|
x |
Input list. Each element of the list has a title that will be used to define the group and to order the bars in the bar-graph. Every element of this list is a vector containing numeric values (e.g. number of proteins per experiment). The names of this vector are the experiments. Use as input the output of the above_threshold function. |
compare |
Character vector that can be "groups" or "experiments", either to summarize values for groups or show the values for individual experiments. If "groups" are selected, the mean value +- SEM is plotted. |
ylim |
Numeric vector, defining min and max value for the y axis. |
Returns a graph.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # first calculate the frequencies using the above_threshold function
place the group names in the correct order before calculating frequencies
Bmp4 <- "Bmp4"
Ctrl <- "Ctrl"
group_ids <- list(Bmp4 = Bmp4,
Ctrl = Ctrl)
number_of_ids <- above_threshold(data, group_ids = group_ids, threshold = 0)
# use the list with frequencies as input to make the barplots
# summarize identifications per 'group'
plot_bar_list(number_of_ids, "groups")
# plot frequencies per 'experiment'
plot_bar_list(number_of_ids, "experiments")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.