spectraCounteBayes | R Documentation |
This function is to calculate peptide/PSM count adjusted t-statistics, p-values.
spectraCounteBayes(fit, fit.method="loess", coef_col)
fit |
an list object produced by Limma |
fit.method |
the method used to fit variance against the number of
peptides/PSM count quantified. Two available methods: "loess","nls" and
"spline". default "loess"."loess" uses |
coef_col |
an integer vector indicating the column(s) of fit$coefficients for which the function is to be performed. if not specified, all coefficients are used. |
This function adjusts the T-statistics and p-values for quantitative MS proteomics experiment according to the number of peptides/PSMs used for quantification. The method is similar in nature to intensity-based Bayes method (Maureen A. Sartor et al BMC Bioinformatics 2006).
a list object with the following components
count |
Peptide or PSM count used for quantification |
sca.t |
Spectra Count Adjusted posterior t-value |
sca.p |
Spectra Count Adjusted posterior p-value |
sca.dfprior |
Spectra Count Adjusted prior degrees of freedom |
sca.priorvar |
Spectra Count Adjusted prior variance |
sca.postvar |
Spectra Count Adjusted posterior variance |
model |
fitted model |
fit.method |
The method used to fit the model |
Yafeng Zhu
library(ExperimentHub)
eh = ExperimentHub(localHub=TRUE)
query(eh, "DEqMS")
dat.psm = eh[["EH1663"]]
dat.psm.log = dat.psm
dat.psm.log[,3:12] = log2(dat.psm[,3:12])
dat.gene.nm = medianSweeping(dat.psm.log,group_col = 2)
psm.count.table = as.data.frame(table(dat.psm$gene)) # generate PSM count table
rownames(psm.count.table)=psm.count.table$Var1
cond = c("ctrl","miR191","miR372","miR519","ctrl",
"miR372","miR519","ctrl","miR191","miR372")
sampleTable <- data.frame(
row.names = colnames(dat.psm)[3:12],
cond = as.factor(cond)
)
gene.matrix = as.matrix(dat.gene.nm)
design = model.matrix(~cond,sampleTable)
fit1 <- eBayes(lmFit(gene.matrix,design))
# add PSM count for each gene
fit1$count <- psm.count.table[rownames(fit1$coefficients),2]
fit2 = spectraCounteBayes(fit1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.