Learn R Programming

beadarrayMSV (version 1.0.2)

transformChannels: Signal transformation

Description

Signal and standard error estimates are subjected to log or nth-root transformation

Usage

transformChannels(X, Y = NULL, normOpts = setNormOptions())

transformSEs(X, se.X, normOpts = setNormOptions())

Arguments

X
Matrix of (mean bead type) intensity data for red or green channel
Y
Matrix of intensity data for the alternate channel
normOpts
List specifying pre-processing settings. See setNormOptions
se.X
Matrix holding the standard error of the mean bead intensities

Value

  • The output from transformChannels or transformSEs is a list containg at least two of the following items
  • XTransformed X
  • YTransformed Y
  • SEEstimated standard errors of transformed signal mean
  • lstrCharacter string with description of transformation

Details

The channel(s) are transformed according to the specifications in normOpts.

As signal intensities are estimated as (robust) means within bead-types on an array, the estimated standard errors are in fact standard errors of means. The standard errors of means cannot be log or nth-root transformed in order to get the standard error of the transformed signal mean. To avoid loading the bead-level data into the workspace, the function transformSEs estimates the transformed standard errors using a first order Taylor-expansion around the mean. In our experience, these estimates are accurate except for very low signal intensities (below noise level).

References

L. Gidskehaug, M. Kent, B. Hayes, and S. Lien. Genotype calling and mapping of multisite variants using an Atlantic salmon iSelect SNP-array. Submitted

See Also

preprocessBeadSet

Examples

Run this code
#Simulate intensity data
X <- matrix(exp(rnorm(4000))*100,nrow=1000,ncol=4,
    dimnames=list(1:1000,paste('Array',1:4)))
Y <- matrix(exp(rnorm(4000))*70,nrow=1000,ncol=4,
    dimnames=list(1:1000,paste('Array',1:4)))

#Transform signal
normOpts <- setNormOptions(offset=0)
trChannel <- transformChannels(X,Y,normOpts)

#Plot one array before and after transformation
dev.new()
plot(X[,1],Y[,1],pch='o',main='Raw data')
dev.new()
plot(trChannel$X[,1],trChannel$Y[,1],pch='o',
    main=paste(trChannel$lstr,'transformed data'))

#Simulate a single bead type represented by 12 beads
beadLevelX <- rnorm(12,mean=800,sd=10) 
sd.X <- sd(beadLevelX)
X <- mean(beadLevelX)
se.X <- sd.X/sqrt(length(beadLevelX))

#Transformed signal (4th-root)
transfX <- mean(beadLevelX^(1/4))   #true value
print(transfX)
transfX.1 <- X^(1/4)                #good approximation
print(transfX.1)

#Transformed standard error (4th-root)
transfSE <- sd(beadLevelX^(1/4))/sqrt(length(beadLevelX))  #true value
print(transfSE)
transfSE.1 <- se.X^(1/4)                                   #bad approximation
print(transfSE.1)
transfSE.2 <- transformSEs(X,se.X,normOpts=normOpts)       #good approximation
print(transfSE.2$SE)

Run the code above in your browser using DataLab