disp.estimates: Residual dispersion estimates

Description Usage Arguments Details Value Author(s) Examples

View source: R/EDA_functions.R

Description

Estimates the residual dispersion of each row of a spectral counts matrix as the ratio residual variance to mean of mean values by level, for each factor in facs. Different plots are drawn to help in the interpretation of the results.

Usage

1
disp.estimates(msnset, facs=NULL, do.plot=TRUE, etit=NULL, to.pdf=FALSE, wait=TRUE)

Arguments

msnset

A MSnSet with spectral counts in the expression matrix.

facs

A factor or a data frame with factors.

do.plot

A logical indicating whether to produce dispersion distribution plots.

etit

Root name of the pdf file where to send the plots.

to.pdf

A logical indicating whether a pdf file should be produced.

wait

This function draws different plots, two by given factor in facs. When in interactive mode and to.pdf FALSE, the default is to wait for confirmation before proceeding to the next plot. When wait is FALSE and R in interactive mode and to.pdf FALSE, instructs not to wait for confirmation.

Details

Estimates the residual dispersion of each protein in the spectral counts matrix, for each factor in facs, and returns the quantiles at c(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 1) of the distribution of dispersion values for each factor. If facs is NULL the factors are taken from pData(msnset). If do.plot is TRUE this function produces a density plot of dispersion values, and the scatterplot of residual variance vs mean values, in log10 scale. If do.pdf is TRUE etit provides the root name for the pdf file name, ending with "-DispPlots.pdf". If etit is NULL a default value of "MSMS" is provided. A different set of plots is produced for each factor in facs.

Value

Invisibly returns a matrix with the quantiles at c(0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 1) of the residual dispersion estimates. Each row has the residual dispersion values attribuable to each factor in facs.

Author(s)

Josep Gregori

Examples

1
2
3
4
data(msms.dataset)
msnset <- pp.msms.data(msms.dataset)
disp.q <- disp.estimates(msnset)
disp.q

msmsEDA documentation built on Nov. 8, 2020, 6:55 p.m.