Learn R Programming

beadarrayMSV (version 1.0.3)

getNoiseDistributions: Estimate median and robust spread of background noise

Description

The genotypes of [A/T] and [C/G] markers are measured with Infinium I beads using an arbitrary (red or green) channel, and the alternate channel measures noise only. The median and median absolute deviation (mad) of each noise channel is estimated and returned for each array

Usage

getNoiseDistributions(BSData, subBeadPool = NULL, normInd,
    normOpts = setNormOptions(), plot = FALSE, newFigure = plot,
    maxPlots = 72, xlim = NULL, ...)

plotEstimatedNoise(BSData, noiseDist, normInd = rep(TRUE, nrow(BSData)), normOpts = setNormOptions(), newFigure = TRUE, maxPlots = 72, ...)

Arguments

BSData
"BeadSetIllumina" object, previously subjected to rotation and shearing but not to log- or nth-root transformation.
subBeadPool
Vector of one or more 1-digit integers (of class character or numeric) denoting sub-bead pool(s) to base estimations upon. For subBeadPool = "x", the red channel noise is estimated based on markers with featureData c
normInd
Matrix with logical indexes to sub-bead pool for each bead-type. See getNormInd
normOpts
List specifying pre-processing settings. See setNormOptions
plot
If TRUE, a the estimated and parametrized noise for each channel is plotted
newFigure
Logical indicating whether or not to clear the current device before plotting. If FALSE, an error will be produced if more than one array is specified
maxPlots
Numeric indicating the maximum allowed number of arrays to plot. Exceeding this limit will produce an error.
xlim
Range of x-axis
...
Additional arguments to plot
noiseDist
Matrix output from getNoiseDistribution

Value

  • getNoiseDistribution returns a matrix (noiseDist) holding the median and mad for both channels, all arrays

    plotEstimatedNoise is used for its side effects

Warning

Both these functions take non-transformed BSData as input, however transformations are performed inside the functions as specified in normOpts. It follows that noiseDist holds the median and mad of transformed data. Use plotEstimatedNoise with caution, as one input parameter is transformed and another is not. The function plotPreprocessing may be a good alternative

Details

Usually called by preprocessBeadSet.

There are three main groups of markers, as identified by the featureData column Norm.ID of BSData. Those identified by a single digit x are Infinium II beads, and those identified by three digits 10x and 20x are Infinium I beads. The difference between the latter is that 10x beads are measured using the red channel only, whereas 20x beads are measured with the green channel only. The background noise can thus be estimated based on the alternate channel.

See Also

preprocessBeadSet, plotPreprocessing

Examples

Run this code
#Read files into BeadSetIllumina-object
rPath <- system.file("extdata", package="beadarrayMSV")
BSDataRaw <- readBeadSummaryOutput(path=rPath,recursive=TRUE)

#Find indexes to sub-bead pools
beadInfo <- read.table(paste(rPath,'beadData.txt',sep='/'),sep='\t',
    header=TRUE,as.is=TRUE)
rownames(beadInfo) <- make.names(beadInfo$Name)
normInd <- getNormInd(beadInfo,featureNames(BSDataRaw))

#Pre-process
normOpts <- setNormOptions(minSize=50,breaks=200)
BSData <- shearRawSignal(BSDataRaw, normOpts = normOpts,plot=TRUE)
noiseDist <- getNoiseDistributions(BSData[,1:4], normInd = normInd,
    normOpts = normOpts, plot = TRUE)
print(noiseDist)
plotEstimatedNoise(BSData,noiseDist,normOpts=normOpts)

Run the code above in your browser using DataLab