Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/msmsTest-functions.R
Operates on the statistic tests results obtained from msms.glm.pois()
,
msms.glm.qlll()
or msms.edgeR()
. The following variables are
computed: Raw expression mean values for each condition (control and treatment),
log fold change based on these expression levels and taking into account the
normalizing divisors (div
), multitest adjusted p-values with FDR control,
and a post test filter based on minimum spectral counts and minimum absolute log
fold change as estimated by the statistic test. According to the results of this
post-test filter, features are flagged as T or F depending on whether they
result relevant or not, beyond their statistic signicance.
1 2 | test.results(test, msnset, gpf, gp1, gp2, div, alpha = 0.05,
minSpC = 2, minLFC = 1, method = "BH")
|
test |
The dataframe obtained from either |
msnset |
A MSnSet object with spectral counts in the expression matrix. |
gpf |
The factor used in the tests. |
gp1 |
The treatment level name. |
gp2 |
The control level name. Should be the factor's reference level.
See R function |
div |
The weights used as divisors (offsets) in the GLM model. Usually the sum of spectral counts of each sample. |
alpha |
The multi test adjusted p-value significance threshold. |
minSpC |
The minimum spectral counts considered as relevant in the most abundant condition. This filter aims at reaching good reproducibility. |
minLFC |
The minimum absolute log fold change considered both, relevant and biologically significant. This filter aims at assuring enough biological effect size and at reaching good reproducibility. |
method |
One among |
No feature is removed in the filter, but instead they are flagged as TRUE or FALSE
depending on whether they are considered as differentially expressed or not, in the DEP
column, taking into account statistic significance and
reproducibility metrics.
A data frame with the following columns:
first column |
Column named as the treatment level with the mean raw spectral counts observed for this condition |
second column |
Column named as the control level with the mean raw spectral counts observed for this condition |
lFC.Av |
Log fold change computed from the mean expression levesl taking into account the given normalization factors. |
logFC |
Log fold change estimated by fitting the given GLM model. The reference level of the main factor is taken as control. |
D or LR |
The statistic obtained from the tests. The residual deviance
|
p.val |
The unadjusted p-values obtained from the tests. |
adjp |
The multitest adjusted p-values with FDR control. |
DEP |
A logical flagging the features considered both as statistically significant and relevant for reproducibility. |
Josep Gregori i Font
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
Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 57, 289-300.
Alan Dabney, John D. Storey and with assistance from Gregory R. Warnes. qvalue: Q-value estimation for false discovery rate control. R package version 1.30.0.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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.qlll(e,alt.f,null.f,div=div)
# Post-test filter
lst <- test.results(res,e,pData(e)$treat,"U600","U200",div,
alpha=0.05,minSpC=2,minLFC=1,
method="BH")
str(lst)
lst$cond
head(lst$tres)
rownames(lst$tres)[which(lst$tres$DEP)]
|
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, sd, var, xtabs
The following objects are masked from ‘package: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: ‘S4Vectors’
The following object is masked from ‘package:base’:
expand.grid
Loading required package: ProtGenerics
Attaching package: ‘ProtGenerics’
The following object is masked from ‘package:stats’:
smooth
This is MSnbase version 2.16.0
Visit https://lgatto.github.io/MSnbase/ to get started.
Attaching package: ‘MSnbase’
The following object is masked from ‘package: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"
List of 2
$ tres :'data.frame': 675 obs. of 8 variables:
..$ U600 : num [1:675] 22.6 44.1 17.1 46.4 19 31.4 15.4 11.3 0 25.6 ...
..$ U200 : num [1:675] 6.7 18.9 7.1 18.3 4.6 13.9 6.4 3.4 0.6 12.7 ...
..$ lFC.Av : num [1:675] 1.7 1.17 1.21 1.29 2 ...
..$ LogFC : num [1:675] 1.7 1.17 1.21 1.3 2 ...
..$ D : num [1:675] 59.9 66.7 27.3 82.2 62.9 ...
..$ p.value: num [1:675] 5.17e-10 2.88e-09 1.67e-08 3.98e-08 1.12e-07 ...
..$ adjp : num [1:675] 3.49e-07 9.72e-07 3.75e-06 6.72e-06 1.30e-05 ...
..$ DEP : logi [1:675] TRUE TRUE TRUE TRUE TRUE TRUE ...
$ conds: Named num [1:3] 0.05 2 1
..- attr(*, "names")= chr [1:3] "alpha.cut" "SpC.cut" "LogFC.cut"
alpha.cut SpC.cut LogFC.cut
0.05 2.00 1.00
U600 U200 lFC.Av LogFC D p.value adjp DEP
sp|P15559|NQO1_HUMAN 22.6 6.7 1.700 1.702 59.88 5.166e-10 3.487e-07 TRUE
sp|P02788|TRFL_HUMAN 44.1 18.9 1.169 1.174 66.72 2.880e-09 9.718e-07 TRUE
sp|O76070|SYUG_HUMAN 17.1 7.1 1.209 1.212 27.28 1.666e-08 3.748e-06 TRUE
sp|P04040|CATA_HUMAN 46.4 18.3 1.290 1.297 82.20 3.980e-08 6.716e-06 TRUE
sp|P00167|CYB5_HUMAN 19.0 4.6 1.995 2.004 62.90 1.124e-07 1.304e-05 TRUE
sp|P01008|ANT3_HUMAN 31.4 13.9 1.124 1.130 44.71 1.159e-07 1.304e-05 TRUE
[1] "sp|P15559|NQO1_HUMAN" "sp|P02788|TRFL_HUMAN" "sp|O76070|SYUG_HUMAN"
[4] "sp|P04040|CATA_HUMAN" "sp|P00167|CYB5_HUMAN" "sp|P01008|ANT3_HUMAN"
[7] "sp|P68871|HBB_HUMAN" "sp|P99999|CYC_HUMAN" "sp|P02787|TRFE_HUMAN"
[10] "sp|P08758|ANXA5_HUMAN" "sp|P02768|ALBU_HUMAN" "sp|P55957|BID_HUMAN"
[13] "sp|P00915|CAH1_HUMAN" "sp|P41159|LEP_HUMAN" "sp|Q06830|PRDX1_HUMAN"
[16] "sp|P01112|RASH_HUMAN" "sp|P08263|GSTA1_HUMAN" "sp|P05413|FABPH_HUMAN"
[19] "sp|P16083|NQO2_HUMAN" "sp|P62937|PPIA_HUMAN" "sp|P06396|GELS_HUMAN"
[22] "sp|O00762|UBE2C_HUMAN" "sp|P06732|KCRM_HUMAN" "sp|P02144|MYG_HUMAN"
[25] "sp|P01579|IFNG_HUMAN" "sp|P63279|UBC9_HUMAN" "sp|P01031|CO5_HUMAN"
[28] "sp|P01375|TNFA_HUMAN" "sp|P69905|HBA_HUMAN" "sp|P02753|RETBP_HUMAN"
[31] "sp|P10599|THIO_HUMAN" "sp|P02741|CRP_HUMAN" "sp|P51965|UB2E1_HUMAN"
[34] "sp|P10145|IL8_HUMAN" "sp|P00918|CAH2_HUMAN"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.