Volcano-plot (Statistical Test Outcome versus Relative Change)
This type of plot is very common in high-throughput biology, see Volcano-plot. Basically, this plot allows comparing the outcome of a statistical test to the differential of the group means (ie log fold-change),
VolcanoPlotW2( Mvalue, pValue = NULL, useComp = 1, filtFin = NULL, ProjNa = NULL, FCthrs = NULL, FdrList = NULL, FdrThrs = NULL, FdrType = NULL, subTxt = NULL, grayIncrem = TRUE, col = NULL, pch = 16, compNa = NULL, batchFig = FALSE, cexMa = 1.8, cexLa = 1.1, limM = NULL, limp = NULL, annotColumn = c("SpecType", "GeneName", "EntryName", "Accession", "Species", "Contam"), annColor = NULL, cexPt = NULL, cexSub = NULL, cexTxLab = 0.7, namesNBest = NULL, NbestCol = 1, sortLeg = "descend", NaSpecTypeAsContam = TRUE, useMar = c(6.2, 4, 4, 2), returnData = FALSE, callFrom = NULL, silent = FALSE, debug = FALSE )
Mvalue |
(numeric or matrix) data to plot; M-values are typically calculated as difference of log2-abundance values and 'pValue' the mean of log2-abundance values;
M-values and p-values may be given as 2 columsn of a matrix, in this case the argument |
pValue |
(numeric, list or data.frame) if |
useComp |
(integer, length=1) choice of which of multiple comparisons to present in |
filtFin |
(matrix or logical) The data may get filtered before plotting: If |
ProjNa |
(character) custom title |
FCthrs |
(numeric) Fold-Change threshold (display as line) give as Fold-change and NOT log2(FC), default at 1.5, set to |
FdrList |
(numeric) FDR data or name of list-element |
FdrThrs |
(numeric) FDR threshold (display as line), default at 0.05, set to |
FdrType |
(character) FDR-type to extract if |
subTxt |
(character) custom sub-title |
grayIncrem |
(logical) if |
col |
(character) custom color(s) for points of plot (see also |
pch |
(integer) type of symbol(s) to plot (default=16) (see also |
compNa |
(character) names of groups compared |
batchFig |
(logical) if |
cexMa |
(numeric) font-size of title, as expansion factor (see also |
cexLa |
(numeric) size of axis-labels, as expansion factor (see also |
limM |
(numeric, length=2) range of axis M-values |
limp |
(numeric, length=2) range of axis FDR / p-values |
annotColumn |
(character) column names of annotation to be extracted (only if |
annColor |
(character or integer) colors for specific groups of annoatation (only if |
cexPt |
(numeric) size of points, as expansion factor (see also |
cexSub |
(numeric) size of subtitle, as expansion factor (see also |
cexTxLab |
(numeric) size of text-labels for points, as expansion factor (see also |
namesNBest |
(integer or character) number of best points to add names in figure; if 'passThr' all points passing FDR and FC-filtes will be selected;
if the initial object |
NbestCol |
(character or integer) colors for text-labels of best points |
sortLeg |
(character) sorting of 'SpecType' annotation either ascending ('ascend') or descending ('descend'), no sorting if |
NaSpecTypeAsContam |
(logical) consider lines/proteins with |
useMar |
(numeric,length=4) custom margings (see also |
returnData |
(logical) optional returning data.frame with (ID, Mvalue, pValue, FDRvalue, passFilt) |
callFrom |
(character) allow easier tracking of message(s) produced |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
In high-throughput biology data are typically already transformed to log2 and thus, the 'M'-value represents a relative change.
Besides, output from statistical testing by moderTest2grp
or moderTestXgrp
can be directly read to produce Volcano plots for diagnostic reasons.
Please note, that plotting a very number of points in transparency (eg >10000) may take several seconds.
MA-plot only
(for PCA) plotPCAw
)
library(wrMisc) set.seed(2005); mat <- matrix(round(runif(900),2), ncol=9) rownames(mat) <- paste0(rep(letters[1:25],each=4), rep(letters[2:26],4)) mat[1:50,4:6] <- mat[1:50,4:6] + rep(c(-1,1)*0.1,25) mat[3:7,4:9] <- mat[3:7,4:9] + 0.7 mat[11:15,1:6] <- mat[11:15,1:6] - 0.7 ## assume 2 groups with 3 samples each gr3 <- gl(3,3,labels=c("C","A","B")) tRes2 <- moderTest2grp(mat[,1:6], gl(2,3), addResults = c("FDR","means")) ## Please NOTE : the function VolcanoPlotW2 has been depreaciated, ## please use VolcanoPlotW() from package wrGraph library(wrGraph) VolcanoPlotW(tRes2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.