met.workflow
runs a metabolomics analysis workflow, including
univariate analysis (ANOVA) and multivariate analyses (PCA and PLS-DA) and creates a
report with various graphical results.
Usage
met.workflow(
mSetObj,
rowNorm = "NULL",
transNorm = "NULL",
scaleNorm = "NULL",
ref = NULL,
norm.vec = NULL,
contrast.type = "all",
control = NULL,
contrast = NULL,
class_order = FALSE,
alpha = 0.05,
lfc = 2,
posthoc_method = "tukey",
nonpar = FALSE,
permut.num = 500,
vip.thresh = 1,
volcano.test = "anova",
volcano.add_names = TRUE,
volcano.label_size = 3,
volcano.adjusted = FALSE,
pls.data = "all",
pls.cv.method = "LOOCV",
pls.cv.k = 5,
plot = FALSE,
export = FALSE,
export.format = "pdf",
dpi = 300,
report = FALSE,
report.dir = NULL,
export.dir = "met.ProcessedData"
)
Arguments
- mSetObj
Enter the name of the created mSet object (see
met.read_data
).- rowNorm
(Character) Select the option for row-wise normalization (see
met.normalize
for options).- transNorm
(Character) Select option to transform the data (see
met.normalize
for options).- scaleNorm
(Character) Select option for scaling the data (see
met.normalize
for options).- ref
(Character) Enter the name of the reference sample or the reference feature (if
rowNorm = "GroupPQN"
,"SamplePQN"
, or"CompNorm"
.- norm.vec
(Numeric vector) Vector with sample-specific scaling factors. Only applicable for
rowNorm = "SpecNorm"
.- contrast.type
(Character) Enter the type of contrast to be used for ANOVA analysis. Options are
"all"
(default),"control"
, or"manual"
.- control
(If
contrast.type = "control"
) Enter the name of the control group (e.g. "Control") to be used for ANOVA analysis.- contrast
(If
contrast.type = "manual"
) Enter a contrast or vector of contrasts to be used for ANOVA analysis. E.g.: "ConditionA_vs_ConditionB" or c("ConditionA_vs_ConditionB", "ConditionC_vs_ConditionD").- class_order
(Logical,
TRUE
orFALSE
) Class order matters (i.e. implying time points, disease severity, etc.).- alpha
(Numeric) Enter significance threshold for adjusted p values (false discovery rate - FDR; for ANOVA with post-hoc analyses).
- lfc
(Numeric) Enter relevance threshold for log2 fold changes in pair-wise comparisons (for ANOVA with post-hoc analyses).
- posthoc_method
(Character) Enter the name of the ANOVA post-hoc test,
"fisher"
or"tukey"
.- nonpar
(Logical) Use a non-parametric ANOVA test (
TRUE
) or not (FALSE
).- permut.num
(Numeric) Number of permutations in PLS-DA permutation tests.
- vip.thresh
(Numeric) Enter a chosen relevance threshold for PLS-DA VIP scores.
- volcano.test
(Character) Enter the name of the statistical, univariate analysis to perform, either
"anova"
or"ttest"
.- volcano.add_names
(Logical) Display compound labels next to dots within the volcano plot (
TRUE
) or not (FALSE
).- volcano.label_size
(Numerical) Enter the font size of compound labels within the volcano plot (if
volcano.add_names = TRUE
)- volcano.adjusted
(Logical) Display adjusted p-values on y axis of the volcano plot (
TRUE
) or not (FALSE
)? (only applicable tovolcano.test = "ttest"
)- pls.data
(Character) Enter
"all"
to train the PLS(-DA) model on your whole (filtered and normalized) dataset or"anova"
to use a subset of features defined as significant based on ANOVA analysis.- pls.cv.method
(Character) Enter one of two methods for PLS-DA model (cross) validation:
"LOOCV"
performs leave-one-out cross validation"CV"
performs k-fold cross validation.
- pls.cv.k
(Numeric) The number of (randomized) groups that the dataset is to be split into during cross validation if
methodName = "CV"
. This value must be equal to or smaller than the number of samples.- plot
(Logical) Display the generated plots in the Plots pane in RStudio (
TRUE
) or not (FALSE
).- export
(Logical) Export generated plots as PDF or PNG files (
TRUE
) or not (FALSE
).- export.format
(Character,
"png"
or"pdf"
) image file format (ifexport = TRUE
).- dpi
(Numeric) Resolution of PNG images (default is 300 dpi).
- report
(Logical) Generate a report with results of this workflow (
TRUE
) or not (FALSE
).- report.dir
(Character) Enter the name or location of the folder in which the report files are generated if
report = TRUE
. IfNULL
(the default), a new folder "Report_date-time" is created in your working directory.- export.dir
(Character) Enter the name of location of a folder in which all generated files are saved.
Author
Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)