Depending on the scale of the object provided, this function with either construct a barplot of the number of peaks observed for each sample (presence/absence data) or boxplot of values of observed peaks per sample (all others). Samples will be colored by group, if grouping information is present in ftmsObj.

# S3 method for peakData
plot(x, title = NA, xlabel = NA, ylabel = NA, colorBy = "groups", ...)

Arguments

x

peakData object

title

optional title for the plot

xlabel

optional label for X axis, if not provided "Sample" will be used

ylabel

optional label for Y axis, if not provided a label will be constructed based on data scale (e.g. "Abundance" or "Number Observed")

colorBy

"groups" to color by groups, "molform" for whether or not the peak has a molecular formula (presence/absence only), or NA to make all bars the same color

...

included for compliance with generic method

Value

a plotly graph object

Examples

if (FALSE) {
plot(edata_transform(examplePeakData, "log2"))
plot(edata_transform(exampleProcessedPeakData, "pres"))
}