shearRawSignal: Affine transformation of axes

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/beadarrayMSV.R

Description

Mimicks the rotation and shearing of raw two-colour intensities performed in Illumina's GenomeStudio. To be performed before any other transformation or normalisation.

Usage

1
2
3
4
5
6
shearRawSignal(BSData, plot = FALSE, newFigure = plot,
    normOpts = setNormOptions(), maxPlots = 72, ...)

normalizeIllumina(rawData, indTrain = rep(TRUE, length(rawData$x)),
    normOpts = setNormOptions(), plot = FALSE, xylim = NULL,
    verbose = FALSE)

Arguments

BSData

"BeadSetIllumina" object

plot

If TRUE, a scatter-plot including the estimated homozygote asymptotes is produced for each array in BSData

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

normOpts

List with at least three elements: “nBins”, “minSize”, and “prob”. See setNormOptions

maxPlots

Numeric indicating the maximum allowed number of arrays to plot. Exceeding this limit will produce an error

...

Additional input parameters to normalizeIllumina

rawData

List containing the numeric vectors “x” and “y” with red and green intensity data for a single array

indTrain

Logical index vector specifying which points to base the normalization upon. It may also be a list containing two logical index vectors “10r” and “20g”, containing indexes to all sub-bead pools with red and green Infinium I beads, respectively. In the latter case, the “10r”-points are used to fit the “AA” homozygote asymptote and the “20g”-points are used to fit the “BB” homozygote asymptote

xylim

If plot, these are the c(xLow,xHigh,yLow,yHigh) coordinates of the axes

verbose

If TRUE, the offset and slope of both asymptotes are printed

Details

shearRawSignal is usually used as a wrapper for normalizeIllumina. Even more commonly, preprocessBeadSet is used as a wrapper for both.

These functions perform an affine transformation which is similar to in Illumina's software (Peiffer et al., 2006), and it differs only in how the homozygote asymptotes are estimated. Both axes are divided into a number of bins as specified by normOpts$nBins. The points specified by the quantile normOpts$prob in each bin exceeding normOpts$minSize points are used for a least squares fit of homozygote asymptotes. If normOpts$shearInf1 is TRUE, only Infinium I beads are used, and the quantiles are based on all points in the bins. Otherwise, all points are used, however the quantile is based on the normOpts$minSize smallest values only.

In the plot, the red and green lines give the estimated “AA” and “BB” homozygote asymptotes, respectively. The blue dots are the points upon which the rotation and shearing is based.

Value

A "BeadSetIllumina" object from shearRawSignal, or a list containing normalized signal from normalizeIllumina. The normalized red and green signal is transformed such that the “AA” and “BB” homozygotes asymptotes are perpendicular to each other

Author(s)

Lars Gidskehaug

References

D. A. Peiffer et al. (2006) High-resolution genomic profiling of chromosomal aberrations using Infinium whole-genome genotyping, Genome Res. 16:1136-1148

See Also

preprocessBeadSet, setNormOptions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#Make artificial, heteroscedastic data
x1 <- 5 + exp(rnorm(1000))*100
y1 <- 100 + x1*.1 + x1*rnorm(1000,sd=.1)*.2
y2 <- 100 + exp(rnorm(1000))*70
x2 <- (y2-5)/10 + (y2-100)*rnorm(1000,sd=.1)*.2
rawData <- list()
rawData$x <- c(x1,x2)
rawData$y <- c(y1,y2)

#Affine transformation
normData <- normalizeIllumina(rawData,plot=FALSE,verbose=TRUE)

## Not run: 
#Affine transformation with plotting
dev.new()
normOpts <- setNormOptions(minSize=10)
normData <- normalizeIllumina(rawData,normOpts=normOpts,plot=TRUE,verbose=TRUE)

#After rotation and shearing
dev.new()
plot(normData$x,normData$y,pch='.',main='Affine transformation',xlab='R',ylab='G')
abline(v=0,h=0,col='blue')

## End(Not run)

beadarrayMSV documentation built on May 1, 2019, 6:33 p.m.