Learn R Programming

metabolomics (version 0.1.2)

TwoGroupPlots: Plots of differential metabolites

Description

Produces plots for visualising differential metabolites.

Usage

TwoGroupPlots(datamat, tstats, foldchanges, pvalues, 
    padjmethod = "BH", fcutoff = log(2), pcutoff = 0.05, cexval = 0.7)

Arguments

datamat
A numerical data matrix with samples in rows and metabolites in columns
tstats
A vector of t statistics.
foldchanges
A vector of fold changes.
pvalues
A vector of corresponding p-values.
padjmethod
A character string specifying p-value adjustment method for multiple comparisons. Must be one of "bonferroni", "holm" (Holm 1979), "hochberg" (Hochberg 1988), "hommel" (Hommel 1988), "BH" (B
fcutoff
A numeric indicating the fold change cut off. The default is set to 2.
pcutoff
A numeric indicating the adjusted p-value cut off. The default is set to 0.05.
cexval
The font size of the text labels.

Value

  • A list containing:
  • IncreasedMetsNames of increased metabolites.
  • DecreasedMetsNames of decreased metabolites.
  • DifferentialMetsNames of all differential metabolites.

References

Benjamini, Y., Hochberg, Y. (1995) Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society. Series B (Methodological) 57(1): 289-300. Benjamini, Y., Yekutieli, D. (2001) The Control of the False Discovery Rate in Multiple Testing under Dependency. The Annals of Statistics 29(4): 1165-1188. Hochberg, Y. (1988) A sharper Bonferroni procedure for multiple tests of significance. Biometrika 75(4): 800-802. Holm, S. (1979) A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics 6(2): 65-70. Hommel, G. (1988) A stagewise rejective multiple test procedure based on a modified Bonferroni test. Biometrika 75(2): 383-386.

Examples

Run this code
data(treated)
    treated.log <- LogTransform(treated)$output
    results <- TwoGroup(treated.log, paired = TRUE)$output
    TwoGroupPlots(treated.log[,-1], tstats = results[, 1], 
        foldchanges = results[, 4], pvalues = results[, 2], padjmethod = "BH",
        fcutoff = log(2), pcutoff = 0.05)

Run the code above in your browser using DataLab