PlotPValueHist {MetabolomicsBasics}R Documentation

PlotPValueHist.

Description

PlotPValueHist will take a named matrix of P-values (i.e. numeric between 0..1) and plot histograms for each column. In the easiest case this matrix is generated by MetaboliteANOVA.

Usage

PlotPValueHist(
  out = NULL,
  method = "BH",
  xl = "ANOVA P-values",
  yl = "Number of metabolites",
  frac.col = NULL,
  ...
)

Arguments

out

matrix/data.frame; P-value table from 'MetaboliteANOVA.R' with factors in named columns and trait P-values in rows.

method

Multiple testing correction method applied, piped to p.adjust().

xl

xlab.

yl

ylab.

frac.col

Render histogram bars in stacked colors according to provided color vector (should be a vector of valid color names of length=nrow(out)).

...

Passed on to par. Useful to adjust cex.

Details

See examples.

Value

NULL. Will generate a P-value histogram plot.

Examples

# load raw data and sample description
raw <- MetabolomicsBasics::raw
sam <- MetabolomicsBasics::sam

# compute P-values according to specified ANOVA model (simple and complex)
head(pvals <- MetaboliteANOVA(dat = raw, sam = sam, model = "GT+Batch+Order"))
PlotPValueHist(out = pvals)

# adjust multiple testing correction method and y lable
PlotPValueHist(out = pvals, method = "none", yl = "Number of Genes")

# color bars (by chance or according to a metabolite group)
PlotPValueHist(out = pvals, frac.col = rep(2:3, length.out = nrow(pvals)))
met <- MetabolomicsBasics::met
met$Name[grep("ine$", met$Name)]
PlotPValueHist(out = pvals, frac.col = 2 + 1:nrow(pvals) %in% grep("ine$", met$Name))

[Package MetabolomicsBasics version 1.4.5 Index]