bioconductor v3.9.0 Gcrma

Background adjustment using sequence information

Link to this section Summary

Functions

Spline coefficients for estimation of affinity from probe sequence

Background adjustment with sequence information (internal function)

GCRMA background adjust (internal function)

Estimation of non-specific Binding Background Parameters

Probe Affinity computation

Internal functions for justGCRMA

Robust Multi-Array expression measure using sequence information

GCRMA background adjust engine(internal function)

GCRMA background adjust engine(internal function)

Functions for Automatic Download of Packages

Compute GCRMA Directly from CEL Files

Link to this section Functions

Link to this function

affinitysplinecoefs()

Spline coefficients for estimation of affinity from probe sequence

Description

Spline coefficients for estimation of affinity from probe sequence

Usage

data(affinity.spline.coefs)

Seealso

compute.affinities

Link to this function

bgadjustaffinities()

Background adjustment with sequence information (internal function)

Description

An internal function to be used by gcrma .

Usage

bg.adjust.fullmodel(pms,mms,ncs=NULL,apm,amm,anc=NULL,index.affinities,k=6
* fast + 0.25 * (1 - fast),rho=.7,fast=FALSE)
bg.adjust.affinities(pms,ncs,apm,anc,index.affinities,k=6
* fast + 0.25 * (1 - fast),fast=FALSE,nomm=FALSE)

Arguments

ArgumentDescription
pmsPM intensities after optical background correction, before non-specific-binding correction.
mmsMM intensities after optical background correction, before non-specific-binding correction.
ncsNegative control probe intensities after optical background correction, before non-specific-binding correction. If ncs=NULL , the MM probes are considered the negative control probes.
index.affinitiesThe index of pms with known sequences. (For some types of arrays the sequences of a small subset of probes are not provided by Affymetrix.)
apmProbe affinities for PM probes with known sequences.
ammProbe affinities for MM probes with known sequences.
ancProbe affinities for Negative control probes with known sequences. This is ignored when ncs=NULL .
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
kA tuning parameter. See details.
fastLogical value. If TRUE a faster add-hoc algorithm is used.
nommLogical value indicating if MM intensities are available and will to be used to estimate background.

Details

Assumes PM=background1+signal,mm=background2, (log(background1),log(background2))' follow bivariate normal distribution, signal distribution follows power law. bg.parameters.gcrma and sg.parameters.gcrma provide adhoc estimates of the parameters.

the original gcrma uses an empirical Bayes estimate. this requires a complicated numerical integration. An add-hoc method tries to imitate the empirical Bayes estimate with a PM-B but values of PM-B< k going to k . This can be thought as a shrunken MVUE. For more details see Wu et al. (2003).

Value

a vector of same length as x.

Seealso

gcrma

Author

Rafeal Irizarry, Zhijin(Jean) Wu

Link to this function

bgadjustgcrma()

GCRMA background adjust (internal function)

Description

This function performs background adjustment (optical noise and non-specific binding on an AffyBatch project and returns an AffyBatch object in which the PM intensities are adjusted.

Usage

bg.adjust.gcrma(object,affinity.info=NULL,
      affinity.source=c("reference","local"),
      NCprobe=NULL,
      type=c("fullmodel","affinities","mm","constant"),
      k=6*fast+0.5*(1-fast),stretch=1.15*fast+1*(1-fast),correction=1,
      GSB.adjust=TRUE,
      rho=.7,optical.correct=TRUE,verbose=TRUE,fast=TRUE)

Arguments

ArgumentDescription
objectan AffyBatch
affinity.infoNULL or an AffyBatch containing the affinities in the exprs slot. This object can be created using the function compute.affinities .
affinity.sourcereference : use the package internal Non-specific binding data or local : use the experimental data in object . If local is chosen, either MM probes or a user-defined list of probes (see NCprobes ) are used to estimate affinities.
NCprobeIndex of negative control probes. When set as NULL ,the MM probes will be used. These probes are used to estimate parameters of non-specific binding on each array. These will be also used to estimate probe affinity profiles when affinity.info is not provided.
type"fullmodel" for sequence and MM model. "affinities" for sequence information only. "mm" for using MM without sequence information.
kA tuning factor.
stretch.
correction.
GSB.adjustLogical value. If TRUE , probe effects in specific binding will be adjusted.
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
optical.correctLogical value. If TRUE , optical background correction is performed.
verboseLogical value. If TRUE messages about the progress of the function is printed.
fastLogical value. If TRUE a faster ad hoc algorithm is used.

Details

The returned value is an AffyBatch object, in which the PM probe intensities have been background adjusted. The rest is left the same as the starting AffyBatch object.

The tunning factor k will have different meainngs if one uses the fast (ad hoc) algorithm or the empirical bayes approach. See Wu et al. (2003)

Value

An AffyBatch .

Author

Rafeal Irizarry

Examples

if(require(affydata) & require(hgu95av2probe) & require(hgu95av2cdf)){
data(Dilution)
ai <- compute.affinities(cdfName(Dilution))
Dil.adj<-bg.adjust.gcrma(Dilution,affinity.info=ai,type="affinities")
}
Link to this function

bgparametersns()

Estimation of non-specific Binding Background Parameters

Description

An internal function to be used by gcrma

Usage

bg.parameters.ns(x,affinities,affinities2=NULL,affinities3=NULL,span=.2)

Arguments

ArgumentDescription
xPM or MM intensities after optical background correction, before non-specific-binding correction.
affinitiesProbe affinities for probes with known sequences.Used to estimate the function between non-specific binding and affinities.
affinities2Probe affinities for the probes whoes expected non-specific binding intensity is to be predicted.
affinities3Probe affinities for another extra group of probes whoes expected non-specific binding intensity is to be predicted.
spanThe span parameter passed to loess function

Value

a vector of same length as x.

Seealso

gcrma

Author

Rafeal Irizarry, Zhijin (Jean) Wu

Link to this function

computeaffinities()

Probe Affinity computation

Description

An internal function to calculate probe affinities from their sequences.

Usage

compute.affinities(cdfname,verbose=TRUE)
compute.affinities2(cdfname,verbose=TRUE)
check.probes(probepackage,cdfname)

Arguments

ArgumentDescription
cdfnameObject of class character representing the name of CDF file associated with the arrays in the AffyBatch .
probepackagecharacter representing the name of the package with the probe sequence information.
verboseLogical value. If TRUE messages about the progress of the function is printed.

Details

The affinity of a probe is described as the sum of position-dependent base affinities. Each base at each position contributes to the total affinity of a probe in an additive fashion. For a given type of base, the positional effect is modeled as a spline function with 5 degrees of freedom.

Use compute.affinities2 if there are no MM probes.

check.probes makes sure things are matching as they should.

Value

compute.affinities returns an AffyBatch with the affinities for PM probes in the pm locations and the affinities for MM probes in the mm locations. NA will be added for probes with no sequence information.

Seealso

gcrma

Author

Rafeal Irizarry

References

Hekstra, D., Taussig, A. R., Magnasco, M., and Naef, F. (2003) Absolute mRNA concentrations from sequence-specific calibration of oligonucleotide array. Nucleic Acids Research, 31. 1962-1968.

Internal functions for justGCRMA

Description

These are internal functions for justGCRMA that are called based on memory or speed constraints.

Usage

fast.bkg(filenames, pm.affinities, mm.affinities, index.affinities,
type, minimum, optical.correct, verbose, k, rho, correction, stretch,
fast, cdfname, read.verbose)
mem.bkg(filenames, pm.affinities, mm.affinities, index.affinities, type,
minimum, optical.correct, verbose, k, rho, correction, stretch, fast,
cdfname, read.verbose)

Arguments

ArgumentDescription
filenamesA list of cel files.
pm.affinitiesValues passed from compute.affinities .
mm.affinitiesValues passed from compute.affinities .
index.affinitiesValues passed from compute.affinities .
type"fullmodel" for sequence and MM model. "affinities" for sequence information only. "mm" for using MM without sequence information.
minimumA minimum value to be used for optical.correct .
optical.correctLogical value. If TRUE , optical background correction is performed.
verboseLogical value. If TRUE , messages about the progress of the function are printed.
kA tuning factor.
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
correction
stretch
fastLogical value. If TRUE , then a faster ad hoc algorithm is used.
cdfnameUsed to specify the name of an alternative cdf package. If set to NULL , the usual cdf package based on Affymetrix' mappings will be used. Note that the name should not include the 'cdf' on the end, and that the corresponding probe package is also required to be installed. If either package is missing an error will result.
read.verboseLogical value. If TRUE , a message is returned as each celfile is read in.

Details

Note that this expression measure is given to you in log base 2 scale. This differs from most of the other expression measure methods.

The tuning factor 'k' will have different meanings if one uses the fast (add-hoc) algorithm or the empirical Bayes approach. See Wu et al. (2003)

Value

An ExpressionSet .

Seealso

gcrma

Author

James W. MacDonald jmacdon@med.umich.edu

Robust Multi-Array expression measure using sequence information

Description

This function converts an AffyBatch into an ExpressionSet using the robust multi-array average (RMA) expression measure with help of probe sequence.

Usage

gcrma(object,affinity.info=NULL,
      affinity.source=c("reference","local"),NCprobe=NULL,
      type=c("fullmodel","affinities","mm","constant"),
      k=6*fast+0.5*(1-fast),stretch=1.15*fast+1*(1-fast),correction=1,
      GSB.adjust=TRUE,
      rho=.7,optical.correct=TRUE,verbose=TRUE,fast=TRUE,
      subset=NULL,normalize=TRUE,list())

Arguments

ArgumentDescription
objectan AffyBatch
affinity.infoNULL or an AffyBatch containing the affinities in the exprs slot. This object can be created using the function compute.affinities .
affinity.sourcereference : use the package internal Non-specific binding data or local : use the experimental data in object . If local is chosen, either MM probes or a user-defined list of probes (see NCprobes ) are used to estimate affinities.
NCprobeIndex of negative control probes. When set as NULL ,the MM probes will be used. These probes are used to estimate parameters of non-specific binding on each array. These will be also used to estimate probe affinity profiles when affinity.info is not provided.
type"fullmodel" for sequence and MM model. "affinities" for sequence information only. "mm" for using MM without sequence information.
kA tuning factor.
stretch.
correction.
GSB.adjustLogical value. If TRUE , probe effects in specific binding will be adjusted.
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
optical.correctLogical value. If TRUE , optical background correction is performed.
verboseLogical value. If TRUE messages about the progress of the function is printed.
fastLogical value. If TRUE a faster ad hoc algorithm is used.
subseta character vector with the the names of the probesets to be used in expression calculation.
normalizelogical value. If 'TRUE' normalize data using quantile normalization.
list()further arguments to be passed (not currently implemented - stub for future use).

Details

Note that this expression measure is given to you in log base 2 scale. This differs from most of the other expression measure methods.

The tuning factor k will have different meanings if one uses the fast (add-hoc) algorithm or the empirical Bayes approach. See Wu et al. (2003)

Value

An ExpressionSet .

Author

Rafeal Irizarry

Examples

if(require(affydata) & require(hgu95av2probe) & require(hgu95av2cdf)){
data(Dilution)
ai <- compute.affinities(cdfName(Dilution))
Dil.expr<-gcrma(Dilution,affinity.info=ai,type="affinities")
}

GCRMA background adjust engine(internal function)

Description

This function adjust for non-specific binding when all arrays in the dataset share the same probe affinity information. It takes matrices of PM probe intensities, MM probe intensities, other negative control probe intensities(optional) and the associated probe affinities, and return one matrix of non-specific binding corrected PM probe intensities.

Usage

gcrma.engine(pms,mms,ncs=NULL,
                         pm.affinities=NULL,mm.affinities=NULL,anc=NULL,
                         type=c("fullmodel","affinities","mm","constant"),
                         k=6*fast+0.5*(1-fast),
                         stretch=1.15*fast+1*(1-fast),correction=1,GSB.adjust=TRUE,rho=0.7,
                         verbose=TRUE,fast=FALSE)

Arguments

ArgumentDescription
pmsThe matrix of PM intensities
mmsThe matrix of MM intensities
ncsThe matrix of negative control probe intensities. When left as NULL , the MMs are considered the negative control probes.
pm.affinitiesThe vector of PM probe affinities. Note: This can be shorter than the number of rows in pms when some probes do not have sequence information provided.
mm.affinitiesThe vector of MM probe affinities.
ancThe vector of Negative Control probe affinities. This is ignored if MMs are used as negative controls ( ncs=NULL )
type"fullmodel" for sequence and MM model. "affinities" for sequence information only. "mm" for using MM without sequence information.
kA tuning factor.
stretch.
correction.
GSB.adjustLogical value. If TRUE , probe effects in specific binding will be adjusted.
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
verboseLogical value. If TRUE messages about the progress of the function is printed.
fastLogicalvalue. If TRUE a faster add-hoc algorithm is used.

Details

Note that this expression measure is given to you in log base 2 scale. This differs from most of the other expression measure methods.

The tunning factor k will have different meainngs if one uses the fast (add-hoc) algorithm or the empirical bayes approach. See Wu et al. (2003)

Value

A matrix of PM intensties.

Seealso

gcrma.engine2

Author

Rafeal Irizarry & Zhijin Wu

GCRMA background adjust engine(internal function)

Description

This function adjust for non-specific binding when each array has its own probe affinity information. It takes an AffyBatch object of probe intensities and an AffyBatch of probe affinity, returns one matrix of non-specific binding corrected PM probe intensities.

Usage

gcrma.engine2(object,pmIndex=NULL,mmIndex=NULL,
              NCprobe=NULL,affinity.info,
              type=c("fullmodel","affinities","mm","constant"),
              k=6*fast+0.5*(1-fast),
              stretch=1.15*fast+1*(1-fast),correction=1,GSB.adjust=TRUE,rho=0.7,
              verbose=TRUE,fast=TRUE)

Arguments

ArgumentDescription
objectan AffyBatch . Note: this is an internal function. Optical noise should have been corrected for.
pmIndexIndex of PM probes.This will be computed within the function if left NULL
mmIndexIndex of MM probes.This will be computed within the function if left NULL
NCprobeIndex of negative control probes. When set as NULL ,the MM probes will be used. These probes are used to estimate parameters of non-specific binding on each array. These will be also used to estimate probe affinity profiles when affinity.info is not provided.
affinity.infoNULL or an AffyBatch containing the affinities in the exprs slot. This object can be created using the function compute.affinities .
type"fullmodel" for sequence and MM model. "affinities" for sequence information only. "mm" for using MM without sequence information.
kA tuning factor.
stretch.
correction.
GSB.adjustLogical value. If TRUE , probe effects in specific binding will be adjusted.
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7
verboseLogical value. If TRUE messages about the progress of the function is printed.
fastLogicalvalue. If TRUE a faster add-hoc algorithm is used.

Details

Note that this expression measure is given to you in log base 2 scale. This differs from most of the other expression measure methods.

The tunning factor k will have different meainngs if one uses the fast (add-hoc) algorithm or the empirical bayes approach. See Wu et al. (2003)

Value

A matrix of PM intensties.

Seealso

gcrma.engine

Author

Rafeal Irizarry & Zhijin Wu

Functions for Automatic Download of Packages

Description

These are internal functions that are called by justGCRMA and GCRMA in order to automatically download and install cdf environments and probe packages.

Usage

getCDF(cdfname, lib = .libPaths()[1], verbose = TRUE)
getProbePackage(probepackage, lib = .libPaths()[1], verbose = TRUE)

Arguments

ArgumentDescription
cdfnameName of the cdfenv to install.
probepackageName of the probe package to install.
libDirectory of the R library where packages will be installed.
verboseOutput informative comments? Defaults to TRUE

Value

Nothing is returned. These functions are called simply to install environments.

Seealso

getCDFinfo %code{link[affy]{getCDFinfo}} there is no such function in affy %called getCDFinfo

Author

James W. MacDonald, based on getCDFinfo , written by Jeff Gentry.

Compute GCRMA Directly from CEL Files

Description

This function converts CEL files into an ExpressionSet using the robust multi-array average (RMA) expression measure with help of probe sequences.

Usage

just.gcrma(list(), filenames=character(0),
                       phenoData=new("AnnotatedDataFrame"),
                       description=NULL,
                       notes="", compress=getOption("BioC")$affy$compress.cel,
                       normalize=TRUE, bgversion=2, affinity.info=NULL,
                       type=c("fullmodel","affinities","mm","constant"),
                       k=6*fast+0.5*(1-fast), stretch=1.15*fast+1*(1-fast),
                       correction=1, rho=0.7, optical.correct=TRUE,
                       verbose=TRUE, fast=TRUE, minimum=1, optimize.by =
                       c("speed","memory"), 
                       cdfname = NULL, read.verbose = FALSE)
            justGCRMA(list(), filenames=character(0),
                     widget=getOption("BioC")$affy$use.widgets,
                     compress=getOption("BioC")$affy$compress.cel,
                     celfile.path=getwd(),
                     sampleNames=NULL,
                     phenoData=NULL,
                     description=NULL,
                     notes="",
                     normalize=TRUE, 
                     bgversion=2, affinity.info=NULL,
                     type=c("fullmodel","affinities","mm","constant"),
                     k=6*fast+0.5*(1-fast), stretch=1.15*fast+1*(1-fast),
                     correction=1, rho=0.7, optical.correct=TRUE,
                     verbose=TRUE, fast=TRUE, minimum=1,
                     optimize.by = c("speed","memory"),
                     cdfname = NULL, read.verbose = FALSE)

Arguments

ArgumentDescription
list()file names separated by comma.
filenamesfile names in a character vector.
widgeta logical specifying if widgets should be used.
compressare the CEL files compressed?
phenoDataa AnnotatedDataFrame object.
descriptiona MIAME object.
notesnotes.
affinity.infoNULL or a list of three components: apm,amm and index, for PM probe affinities, MM probe affinities, the index of probes with known sequence, respectively.
type"fullmodel" for sequence and MM model. "affinities" for sequence information only. "mm" for using MM without sequence information.
kA tuning factor.
rhocorrelation coefficient of log background intensity in a pair of pm/mm probes. Default=.7.
stretch.
correction.
normalizeLogical value. If TRUE , then normalize data using quantile normalization.
optical.correctLogical value. If TRUE , then optical background correction is performed.
verboseLogical value. If TRUE , then messages about the progress of the function is printed.
fastLogical value. If TRUE , then a faster add-hoc algorithm is used.
optimize.by"speed" will use a faster algorithm but more RAM, and "memory" will be slower, but require less RAM.
bgversioninteger value indicating which RMA background to use 1: use background similar to pure R rma background given in affy version 1.0 - 1.0.2 2: use background similar to pure R rma background given in affy version 1.1 and above.
minimum.
celfile.patha character denoting the path 'ReadAffy' should look for cel files.
sampleNamesa character vector of sample names to be used in the 'AffyBatch'.
cdfnameUsed to specify the name of an alternative cdf package. If set to NULL , the usual cdf package based on Affymetrix' mappings will be used. Note that the name should not include the 'cdf' on the end, and that the corresponding probe package is also required to be installed. If either package is missing an error will result.
read.verboseLogical value. If TRUE , then messages will be printed as each celfile is read in.

Details

This method should require much less RAM than the conventional method of first creating an AffyBatch and then running gcrma .

This is a simpler version than gcrma , so some of the arguments available in gcrma are not available here. For example, it is not possible to use the MM probes to estimate background. Instead, the internal NSB estimates are used (which is also the default for gcrma ).

Note that this expression measure is given to you in log base 2 scale. This differs from most of the other expression measure methods.

The tuning factor k will have different meanings if one uses the fast (add-hoc) algorithm or the empirical Bayes approach. See Wu et al. (2003)

fast.bkg and mem.bkg are two internal functions.

Value

An ExpressionSet object.

Author

James W. MacDonald