gcrma.bkg.correct.matrix: GCRMA background adjustment

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

View source: R/gcrma.bkg.correct.matrix.R

Description

Performs a GCRMA backgorund adjustment on generic input data (i.e. does not require an AffyBatch or CDF environment). Takes a matrix with (optical background) adjusted intensity values and corresponding probe affinities as input and performs a GCRMA NSB-adjustment using functions from the gcrma package.

Usage

1
gcrma.bkg.correct.matrix(x, affinities, NCprobe, k = 0.5, verbose = TRUE, GSB.adjust = TRUE, cl, mc.cores )

Arguments

x

A matrix with (optical background corrected) probe intensity values.

affinities

A matrix with the probe affinities. Probe affinities have to be pre-calculated from the probe sequences e.g. using the gcrma.compute.affinities.local.pmonly function.

NCprobe

Numerical vector with the index of background probes within the input matrix x.

k

A tuning factor.

verbose

Print progress messages.

GSB.adjust

If TRUE, probe effects in specific binding will be adjusted.

cl

Optional paramter. A cluster object created by the makeCluster function from the snow package. If submitted a parallelized version of this function is used.

mc.cores

Optional paramter. Number of cores (CPUs) on which the background adjustment should be performed. Provides, similar to parameter cl, a significant speed-up of the calculation. Requires that the multicore package is installed.

Details

Just a function that can be used to apply GCRMA background adjustment to any (Affymetrix based) microarray.

Value

A matrix with GCRMA background adjusted intensities.

Author(s)

Johannes Rainer

References

Rainer J, Lelong J, Bindreither D, Mantinger C, Ploner C, Geley S, Kofler R. (2012) Research resource: transcriptional response to glucocorticoids in childhood acute lymphoblastic leukemia. Mol Endocrinol. 2012 Jan;26(1):178-93.

http://bioinfo.i-med.ac.at

See Also

gcrma.compute.affinities.local.pmonly, gcrma.adjust.nomm

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## loading some data
data( "test.sequences" )
data( "affinity.spline.coefs.exon" )
data( "test.data" )

## calculating probe affinities (based on their sequences)
affinity.info <- gcrma.compute.affinities.local.pmonly( sequence=test.sequences, affinity.spline.coefs=affinity.spline.coefs.exon )

## performing a simple optical baclkground adjustment per array (adding +1 to avoid values between 0 and 1)
test.data <- apply( test.data, MARGIN=2, function( x ){ ( x-min( x ) )+1 } )

## just picking 100 random probes in the data and defining them as "non-specific background probes".
## in a real analysis probes in the data should be submitted with the NCprobe that do not measure specific
## signal (e.g. probes not targeting any known transcript)
ncprobes <- sample( 1:nrow( test.data ), 100 )

par( mfrow=c( 1, 2 ) )
plotDensity( log2( test.data[ -ncprobes, ] ), main="specific probes", ylab=expression(log[2]~expression) )
plotDensity( log2( test.data[ ncprobes, ] ), main="background probes", ylab=expression(log[2]~expression) )

## performing the gcrma background adjustment.
affinity.info <- matrix( rep( affinity.info, 2 ), ncol=ncol( test.data ) )
data.bgadjusted <- gcrma.bkg.correct.matrix( test.data, affinities=affinity.info, NCprobe=ncprobes, GSB.adjust=FALSE )
## just adding +1 if any adjusted probe intensity is smaller 1
if( min( data.bgadjusted ) < 1 )
    data.bgadjusted <- data.bgadjusted + 1

plotDensity( log2( cbind( data.bgadjusted[ -ncprobes, ], test.data[ -ncprobes, ] ) ), main="specific probes", xlab=expression(log[2]~expression), col=c( 3, 3, 1, 1 ), lty=c( 1, 1, 2, 2 ) )
legend( "topright", legend=c( "before gcrma", "after gcrma" ), col=c( 1, 3 ), lty=c( 2, 1 ) )


data.bgadjusted.GSB <- gcrma.bkg.correct.matrix( test.data, affinities=affinity.info, NCprobe=ncprobes, GSB.adjust=TRUE )
## just adding +1 if any adjusted probe intensity is smaller 1
if( min( data.bgadjusted.GSB ) < 1 )
    data.bgadjusted.GSB <- data.bgadjusted.GSB + 1

plotDensity( log2( cbind( data.bgadjusted.GSB[ -ncprobes, ], test.data[ -ncprobes, ] ) ), main="specific probes", xlab=expression(log[2]~expression), col=c( 3, 3, 1, 1 ), lty=c( 1, 1, 2, 2 ) )
legend( "topright", legend=c( "before gcrma", "after gcrma" ), col=c( 1, 3 ), lty=c( 2, 1 ) )

jotsetung/generalgcrma documentation built on May 19, 2019, 9:41 p.m.