MBoxplot {MetabolomicsBasics} | R Documentation |
MBoxplot.
Description
MBoxplot
will generate an annotated boxplot. A unifying
function for MS-data Boxplots based on \'raw\' and \'sam\'.
Usage
MBoxplot(
pk = pk,
raw = NULL,
sam = NULL,
met = NULL,
g = NULL,
flt = NULL,
an = NULL,
plot_sample_n = FALSE,
txt = NULL,
cex.txt = 0.5,
plot_rel_axis = NULL,
...
)
Arguments
pk |
Colname of raw to plot if |
raw |
Plotting data as samples (rows) x metabolites (cols). |
sam |
Sample table. |
met |
Containing at minimum columns for annotation (see parameter |
g |
Grouping vector if |
flt |
Filter to exclude certain samples (T/F) vector. |
an |
Switch to include annotation (from met) in the boxplot providing a character vector of colnames from |
plot_sample_n |
Amend each box with the number of finite values which were a basis for plotting this group. |
txt |
Character vector with information per sample to be plotted on top of the box as text. |
cex.txt |
Specify size of annotation text. |
plot_rel_axis |
Specify one level of |
... |
Further options parsed to |
Details
Usually metabolomics experiments are conducted on multiple replicates
of a sample group. Boxplots allow to quickly access potential differences
between measurement values of several groups. MBoxplot
can be nicely
used to generate QC plots for all metabolites prior and after normalization,
in absolute or relative scale and sorted according to significance.
Value
Nothing. Will produce a plot (or file if specified).
Examples
x <- data.frame("y" = runif(36), "GT" = gl(3, 12), "TP" = factor(rep(rep(1:3, each = 4), 3)))
x <- cbind(x, AdjustSymbols(cols = x$GT, pchs = x$TP))
MBoxplot(
pk = "y", raw = x, sam = x, met = data.frame("Peak" = "y", "Test" = I("info")),
g = interaction(x$GT, x$TP), an = "Test", plot_n_samples = TRUE, txt = rownames(x)
)