msms.edgeR: Spectral counts differential expression by edgeR

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/msmsTest-functions.R

Description

Given a null and an alternative model, with a two level treatment factor as the two conditions to compare, executes the negative binomial test by edgeR functions to discover differentially expressed proteins between the two conditions. The null and alternative models may include blocking factors.The reference level of the main factor is considered to be the control condition

Usage

1
msms.edgeR(msnset,form1,form0,facs=NULL,div=NULL,fnm=NULL)

Arguments

msnset

A MSnSet object with spectral counts in the expression matrix.

form1

The alternative hypothesis model as an standard R formula, with the treatment factor of interest, and eventual blocking factors.

form0

The null hypothesis model as an standard R formula.It may be the standard null model (y~.) or contain one or multiple blocking factors.

facs

NULL or a data frame with the factors in its columns.

div

NULL or a vector with the divisors used to compute the offsets.

fnm

NULL or a character string with the treatment factor name, as used in the column names of the factors data frame, and in the formula.

Details

The right hand site of the formulas is expected to be "y~", with the combination of factors after the tilde. If facs is NULL the factors are taken as default from pData(msnset). If div is NULL all divisors are taken equal to one. If fnm is NULL it is taken to be the first factor in facs.

Value

A data frame with column names 'LogFC', 'LR', 'p.value', with the estimated log fold changes, likelihood ratio statistic and corresponding p-value as obtaimed from a call to glmLRT() from the edgeR package.

Author(s)

Josep Gregori i Font

References

Robinson MD, McCarthy DJ and Smyth GK (2010). edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics 26, 139-140

Robinson MD and Smyth GK (2007). Moderated statistical tests for assessing differences in tag abundance. Bioinformatics 23, 2881-2887

Robinson MD and Smyth GK (2008). Small-sample estimation of negative binomial dispersion, with applications to SAGE data. Biostatistics, 9, 321-332

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

MSnSet, edgeR, glmLRT, msmsEDA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Example
library(msmsTests)
data(msms.dataset)
e <- pp.msms.data(msms.dataset)
e

null.f <- "y~batch"
alt.f <- "y~treat+batch"
div <- apply(exprs(e),2,sum)
res <- msms.edgeR(e,alt.f,null.f,div=div,fnm="treat")

str(res)
head(res)

Example output

sh: 1: cannot create /dev/null: Permission denied
Loading required package: MSnbase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

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

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

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

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: S4Vectors
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: ProtGenerics

Attaching package:ProtGenericsThe following object is masked frompackage:stats:

    smooth

sh: 1: cannot create /dev/null: Permission denied

This is MSnbase version 2.16.0 
  Visit https://lgatto.github.io/MSnbase/ to get started.


Attaching package:MSnbaseThe following object is masked frompackage:base:

    trimws

Loading required package: msmsEDA
MSnSet (storageMode: lockedEnvironment)
assayData: 675 features, 14 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: U2.2502.1 U2.2502.2 ... U6.0302.3 (14 total)
  varLabels: treat batch
  varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
  pubMedIds: http://www.ncbi.nlm.nih.gov/pubmed/22588121 
Annotation:  
- - - Processing information - - -
Subset [697,14][675,14] Tue Dec 15 17:34:04 2020 
Applied pp.msms.data preprocessing [Tue Dec 15 17:34:04 2020] 
 MSnbase version: 1.8.0 
'data.frame':	675 obs. of  3 variables:
 $ LogFC  : num  0.0269 -0.1265 -0.1878 -0.085 -0.1185 ...
 $ LR     : num  0.269 5.584 10.271 2.594 5.758 ...
 $ p.value: num  0.60387 0.01813 0.00135 0.10726 0.01642 ...
              LogFC         LR     p.value
YJR104C  0.02689580  0.2691984 0.603869997
YKL060C -0.12645517  5.5836198 0.018129214
YDR155C -0.18781161 10.2706906 0.001351602
YGR192C -0.08495735  2.5941287 0.107260408
YOL086C -0.11853347  5.7575031 0.016418387
YLR150W -0.09299164  1.3766332 0.240675475

msmsTests documentation built on Nov. 8, 2020, 5:25 p.m.