msms.glm.pois: Spectral counts differential expression by Poisson GLM

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 a Poisson based GLM regression 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.glm.pois(msnset,form1,form0,facs=NULL,div=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.

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.

Value

A data frame with the following columns:

LogFC

Log fold change estimated from the model parameters.

D

Residual deviance as statistic of the test.

p.value

The p-values obtained from the test.

Author(s)

Josep Gregori i Font

References

Agresti, A. (2002) Categorical Data Analysis, 2nd Edition, John Wiley & Sons, Inc., Hoboken, New Jersey

Thompson L.A. (2009) R (and S-PLUS) Manual to Accompany Agresti s Categorical Data Analysis (2002), 2nd edition https://home.comcast.net/~lthompson221/Splusdiscrete2.pdf

Dobson, A.J. (2002) An Introduction to Generalized Linear Models, 2nd Edition, Chapman & Hall/CRC, New York

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. New York: Springer

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, glm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(msmsTests)
data(msms.dataset)
# Pre-process expression matrix
e <- pp.msms.data(msms.dataset)
# Factors
pData(e)
# Control condition
levels(pData(e)$treat)[1]
# Treatment condition
levels(pData(e)$treat)[2]

# Models and normalizing condition
null.f <- "y~batch"
alt.f <- "y~treat+batch"
div <- apply(exprs(e),2,sum)

#Test
res <- msms.glm.pois(e,alt.f,null.f,div=div)

str(res)
head(res)

Example output

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


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
          treat batch
U2.2502.1  U200  2502
U2.2502.2  U200  2502
U2.2502.3  U200  2502
U2.2502.4  U200  2502
U6.2502.1  U600  2502
U6.2502.2  U600  2502
U6.2502.3  U600  2502
U6.2502.4  U600  2502
U2.0302.1  U200  0302
U2.0302.2  U200  0302
U2.0302.3  U200  0302
U6.0302.1  U600  0302
U6.0302.2  U600  0302
U6.0302.3  U600  0302
[1] "U200"
[1] "U600"
There were 26 warnings (use warnings() to see them)
'data.frame':	675 obs. of  3 variables:
 $ LogFC  : num  0.0269 -0.1265 -0.1879 -0.085 -0.1186 ...
 $ D      : num  0.269 5.584 10.271 2.594 5.759 ...
 $ p.value: num  0.60387 0.01812 0.00135 0.10726 0.01641 ...
              LogFC          D     p.value
YJR104C  0.02690842  0.2692032 0.603866752
YKL060C -0.12652472  5.5841460 0.018123768
YDR155C -0.18794749 10.2706910 0.001351602
YGR192C -0.08500710  2.5941289 0.107260400
YOL086C -0.11859088  5.7587712 0.016406542
YLR150W -0.09311476  1.3766332 0.240675470

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