Last data update: 2014.03.03

R: Volcanoplot
res.volcanoplotR Documentation

Volcanoplot

Description

Given the data frame obtained from test.results() a volcano plot is drawn.The features are colored according to significance and relevance.

Usage

res.volcanoplot(tres, max.pval=0.05, min.LFC=1, maxx=3, maxy=10,
                ylbls=20)

Arguments

tres

The dataframe with test results as obtained from test.results(). Or a data frame with, at least, the following columns: LogFC with log fold changes, adjp with multitest adjusted p-values, and DEP with TRUE or FALSE as post test filter results, being the TRUE features both statistically significant and relevant for reproducibility.

max.pval

The maximum adjusted p-value considered as statistically significant.

min.LFC

The minimum absolute log fold change considered as biologically relevant.

maxx

The maximum value in abcissas (i.e. log2(fold change)).

maxy

The maximum value in ordinates (i.e. -log10(p.val))

ylbls

All features with -log10(p.val) above this value will be ploted with feature labels.

Details

Abscissas and ordinates may be limited giving a value other than NULL to the parameters maxx and maxy. All features deemed significant and relevant are ploted by a blue dot, all features deemed significant but not passing the post test filter are plotted by a red dot. The non-significant features are plotted as smaller black dots. All features deemed significant and relevant and with a -log10 p-value above ylbls are plotted with a label showing their row index in the test results dataframe. The borders limiting the values given by max.pval and min.LFC are ploted as dash-and-dot red lines.

Value

No return value.

Author(s)

Josep Gregori i Font

References

Josep Gregori, Laura Villareal, Alex Sanchez, Jose Baselga, Josep Villanueva (2013). An Effect Size Filter Improves the Reproducibility in Spectral Counting-based Comparative Proteomics. Journal of Proteomics, DOI http://dx.doi.org/10.1016/j.jprot.2013.05.030

See Also

test.results, volcanoplot

Examples

library(msmsTests)
data(msms.dataset)
# Pre-process expression matrix
e <- pp.msms.data(msms.dataset)
# Models and normalizing condition
null.f <- "y~batch"
alt.f <- "y~treat+batch"
div <- apply(exprs(e),2,sum)
#Test
res <- msms.glm.qlll(e,alt.f,null.f,div=div)
lst <- test.results(res,e,pData(e)$treat,"U600","U200",div,
                    alpha=0.05,minSpC=2,minLFC=log2(1.8),
                    method="BH")
# Plot
res.volcanoplot(lst$tres, max.pval=0.05, min.LFC=1, maxx=3, maxy=NULL,
                        ylbls=4)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(msmsTests)
Loading required package: MSnbase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: mzR
Loading required package: Rcpp
Loading required package: BiocParallel
Loading required package: ProtGenerics

This is MSnbase version 1.20.7 
  Read '?MSnbase' and references therein for information
  about the package and how to get started.


Attaching package: 'MSnbase'

The following object is masked from 'package:stats':

    smooth

The following object is masked from 'package:base':

    trimws

Loading required package: msmsEDA
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/msmsTests/res.volcanoplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: res.volcanoplot
> ### Title: Volcanoplot
> ### Aliases: res.volcanoplot
> ### Keywords: hplot univar htest
> 
> ### ** Examples
> 
> library(msmsTests)
> data(msms.dataset)
> # Pre-process expression matrix
> e <- pp.msms.data(msms.dataset)
> # Models and normalizing condition
> null.f <- "y~batch"
> alt.f <- "y~treat+batch"
> div <- apply(exprs(e),2,sum)
> #Test
> res <- msms.glm.qlll(e,alt.f,null.f,div=div)
> lst <- test.results(res,e,pData(e)$treat,"U600","U200",div,
+                     alpha=0.05,minSpC=2,minLFC=log2(1.8),
+                     method="BH")
> # Plot
> res.volcanoplot(lst$tres, max.pval=0.05, min.LFC=1, maxx=3, maxy=NULL,
+                         ylbls=4)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>