View source: R/plot_peptideMods.R
plot_peptideMods | R Documentation |
The input is a data.frame, as obtained from modsToTableByRaw().
plot_peptideMods(tbl, y_max = NA, show_missing_modification_levels = TRUE)
tbl |
A data.frame with 'fc.raw.file', 'modification_names' (can be a factor), and 'Freq' (0-100) |
y_max |
The upper limit of the y-axis's (==Freq); useful for multiple plots with identical limits; if 'NA' the limit is computed from the given 'tbl' |
show_missing_modification_levels |
If 'tbl$modification_names' is a factor and has more (but missing) levels than actually used, should missing values be dropped or assumed as '0' frequency? |
GGplot object
data = data.frame(fc.raw.file = rep(c("file A", "file B"), each=3),
modifications = c("Oxidation (M)",
"Unmodified",
"Oxidation (M), Acetyl (Protein N-term)",
"2 Oxidation (M)",
"Unmodified",
"Unmodified"))
tbl = modsToTableByRaw(data)
plot_peptideMods(tbl,show_missing_modification_levels = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.