bioconductor v3.9.0 AffyPLM

A package that extends and improves the functionality of

Link to this section Summary

Functions

Relative M vs. A plots

Convert a PLMset to an ExpressionSet

Class PLMset

Read RMAExpress computed expression values

Internal affyPLM functions

LESN - Low End Signal is Noise Background corrections

Fit a Probe Level Model to Affymetrix Genechip Data.

Normalization applied to ExpressionSets

Quantile Normalization applied to probesets

Scaling normalization

Background correct and Normalize

Coloring pseudo chip images

Fit a RMA to Affymetrix Genechip Data as a PLMset

Three Step expression measures

Three Step expression measures returned as a PLMset

Link to this section Functions

Relative M vs. A plots

Description

Create boxplots of M or M vs A plots. Where M is determined relative to a specified chip or to a pseudo-median reference chip.

Arguments

ArgumentDescription
...Additional parameters for the routine
AA vector to plot along the horizonal axis
MA vector to plot along vertical axis
subsetA set of indices to use when drawing the loess curve
show.statisticsIf true some summary statistics of the M values are drawn
spanspan to be used for loess fit.
family.loess"guassian" or "symmetric" as in loess .
cexSize of text when writing summary statistics on plot

Seealso

mva.pairs

Link to this function

PLMset2exprSet()

Convert a PLMset to an ExpressionSet

Description

This function converts a PLMset to an ExpressionSet. This is often useful since many Bioconductor functions operate on ExpressionSet objects.

Usage

PLMset2exprSet(pset)
pset2eset(pset)

Arguments

ArgumentDescription
psetThe PLMset to convert to ExpressionSet .

Details

These functions convert PLMset objects to ExpressionSet objects. This is often useful since many Bioconductor functions operate on ExpressionSet objects. Note that the function pset2eset is a wrapper for PLMset2exprSet .

Value

returns a ExpressionSet

Seealso

ExpressionSet

Author

Ben Bolstad bmb@bmbolstad.com

Examples

if (require(affydata)) {
data(Dilution)
Pset <- fitPLM(Dilution)
eset <- pset2eset(Pset)
}

Class PLMset

Description

This is a class representation for Probe level Linear Models fitted to Affymetrix GeneChip probe level data.

Note

This class is better described in the vignette.

Author

B. M. Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Link to this function

ReadRMAExpress()

Read RMAExpress computed expression values

Description

Read RMAExpress computed binary output files into a matrix or ExpressionSet

Usage

ReadRMAExpress(filename, return.value=c("ExpressionSet","matrix"))

Arguments

ArgumentDescription
filenameThe name of the file containing RMAExpress output to be read in
return.valueshould a matrix or an ExpressionSet be returned

Value

returns an ExpressionSet

Author

Ben Bolstad bmb@bmbolstad.com

References

http://rmaexpress.bmbolstad.com

Link to this function

affyPLM_internal()

Internal affyPLM functions

Description

Internal affyPLM functions

Details

These are not to be called by the user and/or are undergoing testing

Link to this function

bgcorrectLESN()

LESN - Low End Signal is Noise Background corrections

Description

This function background corrects PM probe data using LESN - Low End Signal is Noise concepts.

Usage

bg.correct.LESN(object, method=2, baseline=0.25, theta=4)

Arguments

ArgumentDescription
objectan AffyBatch
methodan integer code specifying which method to use
baselineA baseline value to use
thetaA parameter used in the background correction process

Details

This method will be more formally documented at a later date.

The basic concept is to consider that the lowest end of intensites is most likely just noise (and should be heavily corrected) and the highest end signals are most likely signal and should have little adjustment. Low end signals are made much smaller while high end signals get less adjustment relative adjustment.

Value

An AffyBatch

Author

Ben Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Examples

if (require(affydata)) {
data(Dilution)
Dilution.example.bgcorrect <- bg.correct.LESN(Dilution)
}

Fit a Probe Level Model to Affymetrix Genechip Data.

Description

This function converts an AffyBatch into an PLMset by fitting a specified robust linear model to the probe level data.

Usage

fitPLM(object,model=PM ~ -1 + probes +samples,
       variable.type=c(default="factor"),
       constraint.type=c(default="contr.treatment"),
       subset=NULL,
       background=TRUE, normalize=TRUE, background.method="RMA.2",
       normalize.method="quantile", background.param=list(),
       normalize.param=list(), output.param=verify.output.param(),
       model.param=verify.model.param(object, model),
       verbosity.level=0)

Arguments

ArgumentDescription
objectan AffyBatch
modelA formula describing the model to fit. This is slightly different from the standard method of specifying formulae in R. Read the description below
variable.typea way to specify whether variables in the model are factors or standard variables
constraint.typeshould factor variables sum to zero or have first variable set to zero (endpoint constraint)
subseta vector with the names of probesets to be used. If NULL then all probesets are used.
normalizelogical value. If TRUE normalize data using quantile normalization
backgroundlogical value. If TRUE background correct using RMA background correction
background.methodname of background method to use.
normalize.methodname of normalization method to use.
background.paramA list of parameters for background routines
normalize.paramA list of parameters for normalization routines
output.paramA list of parameters controlling optional output from the routine.
model.paramA list of parameters controlling model procedure
verbosity.levelAn integer specifying how much to print out. Higher values indicate more verbose. A value of 0 will print nothing

Details

This function fits robust Probe Level linear Models to all the probesets in an AffyBatch . This is carried out on a probeset by probeset basis. The user has quite a lot of control over which model is used and what outputs are stored. For more details please read the vignette.

Value

An PLMset

Seealso

expresso , rma , threestep

Author

Ben Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Examples

if (require(affydata)) {
data(Dilution)
Pset <- fitPLM(Dilution, model=PM ~ -1 + probes + samples)
se(Pset)[1:5,]

image(Pset)
NUSE(Pset)

#now lets try a wider class of models
Pset <- fitPLM(Dilution,model=PM ~ -1 + probes +liver,
normalize=FALSE,background=FALSE)
coefs(Pset)[1:10,]

Pset <- fitPLM(Dilution,model=PM ~ -1 + probes + liver +
scanner, normalize=FALSE,background=FALSE)
coefs(Pset)[1:10,]

#try liver as a covariate
logliver <- log2(c(20,20,10,10))
Pset <- fitPLM(Dilution, model=PM~-1+probes+logliver+scanner,
normalize=FALSE, background=FALSE, variable.type=c(logliver="covariate"))
coefs(Pset)[1:10,]

#try a different se.type
Pset <- fitPLM(Dilution, model=PM~-1+probes+scanner,
normalize=FALSE,background=FALSE,m odel.param=list(se.type=2))
se(Pset)[1:10,]
}
Link to this function

normalizeexprSet()

Normalization applied to ExpressionSets

Description

Allows the user to apply normalization routines to ExpressionSets.

Usage

normalize.ExpressionSet.quantiles(eset, transfn=c("none","log","antilog"))
  normalize.ExpressionSet.loess(eset, transfn=c("none","log","antilog"),...)
  normalize.ExpressionSet.contrasts(eset, span = 2/3,
      choose.subset=TRUE, subset.size=5000, verbose=TRUE, family="symmetric",
      transfn=c("none","log","antilog")) 
  normalize.ExpressionSet.qspline(eset, transfn=c("none","log","antilog"),...)
  normalize.ExpressionSet.invariantset(eset,prd.td=c(0.003, 0.007),
      verbose=FALSE, transfn=c("none","log","antilog"),
      baseline.type=c("mean","median","pseudo-mean","pseudo-median")) 
  normalize.ExpressionSet.scaling(eset, trim=0.02, baseline=-1,
      transfn=c("none","log","antilog"))

Arguments

ArgumentDescription
esetAn ExpressionSet
spanparameter to be passed to the function loess .
choose.subsetuse a subset of values to establish the normalization relationship
subset.sizenumber to use for subset
verboseverbosity flag
familyparameter to be passed to the function loess .
prd.tdcutoff parameter (details in the bibliographic reference)
trimHow much to trim from the top and bottom before computing the mean when using the scaling normalization
baselineIndex of array to use as baseline, negative values (-1,-2,-3,-4) control different baseline selection methods
transfnTransform the ExpressionSet before normalizing. Useful when dealing with expression values that are log-scale
baseline.typeA method of selecting the baseline array
...Additional parameters that may be passed to the normalization routine

Details

This function carries out normalization of expression values. In general you should either normalize at the probe level or at the expression value level, not both.

Typing normalize.ExpressionSet.methods should give you a list of methods that you may use. note that you can also use the normalize function on ExpressionSets. Use method to select the normalization method.

Value

A normalized ExpressionSet .

Author

Ben Bolstad, bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Examples

if (require(affydata)) {
data(Dilution)
eset <- rma(Dilution, normalize=FALSE, background=FALSE)
normalize(eset)
}
Link to this function

normalizequantilesprobeset()

Quantile Normalization applied to probesets

Description

Using a normalization based upon quantiles, this function normalizes a matrix of probe level intensities.

Usage

normalize.AffyBatch.quantiles.probeset(abatch,type=c("separate","pmonly","mmonly","together"),use.median=FALSE,use.log=TRUE)

Arguments

ArgumentDescription
abatchAn AffyBatch
typehow should MM and PM values be handled
use.medianuse median rather than mean
use.logtake logarithms, then normalize

Details

This function applies the quantile method in a probeset specific manner.

In particular a probeset summary is normalized using the quantile method and then the probes adjusted accordingly.

Value

A normalized AffyBatch .

Seealso

normalize.quantiles

Author

Ben Bolstad, bmb@bmbolstad.com

References

Bolstad, B (2001) list("Probe Level Quantile Normalization of High Density ", " Oligonucleotide Array Data") . Unpublished manuscript http://oz.berkeley.edu/~bolstad/stuff/qnorm.pdf

Bolstad, B. M., Irizarry R. A., Astrand, M, and Speed, T. P. (2003) list("A Comparison of Normalization Methods for High Density ", " Oligonucleotide Array Data Based on Bias and Variance.") Bioinformatics 19(2) ,pp 185-193. http://www.stat.berkeley.edu/~bolstad/normalize/normalize.html

Link to this function

normalizescaling()

Scaling normalization

Description

Allows the user to apply scaling normalization.

Usage

normalize.scaling(X,trim=0.02, baseline=-1, log.scalefactors=FALSE)
normalize.AffyBatch.scaling(abatch,
    type=c("together","pmonly","mmonly","separate"),
    trim=0.02, baseline=-1, log.scalefactors=FALSE)

Arguments

ArgumentDescription
XA matrix. The columns of which are to be normalized.
abatchAn AffyBatch
typeA parameter controlling how normalization is applied to the Affybatch.
trimHow much to trim from the top and bottom before computing the mean when using the scaling normalization.
baselineIndex of array to use as baseline, negative values (-1,-2,-3,-4) control different baseline selection methods.
log.scalefactorsCompute the scale factors based on log2 transformed data.

Details

These function carries out scaling normalization of expression values.

Value

A normalized ExpressionSet .

Author

Ben Bolstad, bmb@bmbolstad.com

Examples

if (require(affydata)) {
data(Dilution)
normalize.AffyBatch.scaling(Dilution)
}

Background correct and Normalize

Description

This function pre-processes an AffyBatch .

Usage

preprocess(object, subset=NULL, normalize=TRUE, background=TRUE,
           background.method="RMA.2", normalize.method="quantile",
           background.param=list(), normalize.param=list(),
           verbosity.level=0)

Arguments

ArgumentDescription
objectan AffyBatch
subseta vector with the names of probesets to be used. If NULL then all probesets are used.
normalizelogical value. If TRUE normalize data using quantile normalization
backgroundlogical value. If TRUE background correct using RMA background correction
background.methodname of background method to use.
normalize.methodname of normalization method to use.
background.paramlist of parameters for background correction methods
normalize.paramlist of parameters for normalization methods
verbosity.levelAn integer specifying how much to print out. Higher values indicate more verbose. A value of 0 will print nothing

Details

This function carries out background correction and normalization pre-processing steps. It does not summarize to produce gene expression measures. All the same pre-processing methods supplied by threestep are supported by this function.

Value

An AffyBatch

Seealso

expresso , rma

Author

Ben Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Examples

if (require(affydata)) {
data(Dilution)

# should be equivalent to the bg and norm of rma()
abatch.preprocessed <- preprocess(Dilution)
}

Coloring pseudo chip images

Description

These are routines used for coloring pseudo chip images.

Usage

pseudoPalette(low = "white", high = c("green", "red"), mid = NULL,k =50) 
  pseudoColorBar(x, horizontal = TRUE, col = heat.colors(50), scale = 1:length(x),k = 11, log.ticks=FALSE,...)

Arguments

ArgumentDescription
lowcolor at low end of scale
highcolor at high end of scale
midcolor at exact middle of scale
knumber of colors to have
xA data series
horizontalIf TRUE then color bar is to be draw horizontally
colcolors for color bar
scaletickmarks for x if x is not numeric
log.ticksuse a log type transformation to assign the colors
...additional parameters to plotting routine

Details

Adapted from similar tools in maPlots pacakge.

Seealso

AffyBatch , read.affybatch

Author

Ben Bolstad bmb@bmbolstad.com

Fit a RMA to Affymetrix Genechip Data as a PLMset

Description

This function converts an AffyBatch into an PLMset by fitting a multichip model. In particular we concentrate on the RMA model.

Usage

rmaPLM(object, subset=NULL, normalize=TRUE, background=TRUE,
       background.method="RMA.2", normalize.method="quantile",
       background.param=list(), normalize.param=list(), output.param=list(),
       model.param=list(), verbosity.level=0)

Arguments

ArgumentDescription
objectan AffyBatch
subseta vector with the names of probesets to be used. If NULL then all probesets are used.
normalizelogical value. If TRUE normalize data using quantile normalization
backgroundlogical value. If TRUE background correct using RMA background correction
background.methodname of background method to use.
normalize.methodname of normalization method to use.
background.paramA list of parameters for background routines
normalize.paramA list of parameters for normalization routines
output.paramA list of parameters controlling optional output from the routine.
model.paramA list of parameters controlling model procedure
verbosity.levelAn integer specifying how much to print out. Higher values indicate more verbose. A value of 0 will print nothing

Details

This function fits the RMA as a Probe Level Linear models to all the probesets in an AffyBatch .

Value

An PLMset

Seealso

expresso , rma , threestep , fitPLM , threestepPLM

Author

Ben Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, list() list() Irizarry RA, Bolstad BM, Collin F, Cope LM, Hobbs B and Speed TP (2003) list("Summaries of Affymetrix GeneChip probe level data") Nucleic Acids Research 31(4):e15 list() list() Bolstad, BM, Irizarry RA, Astrand, M, and Speed, TP (2003) list("A Comparison of Normalization Methods for High Density ", " Oligonucleotide Array Data Based on Bias and Variance.") Bioinformatics 19(2):185-193

Examples

if (require(affydata)) {
# A larger example testing weight image function
data(Dilution)
Pset <- rmaPLM(Dilution,output.param=list(weights=TRUE))
image(Pset)
}

Three Step expression measures

Description

This function converts an AffyBatch into an ExpressionSet using a three step expression measure.

Usage

threestep(object, subset=NULL, normalize=TRUE, background=TRUE,
          background.method="RMA.2", normalize.method="quantile",
          summary.method="median.polish", background.param=list(),
          normalize.param=list(), summary.param=list(), verbosity.level=0)

Arguments

ArgumentDescription
objectan AffyBatch .
subseta vector with the names of probesets to be used. If NULL , then all probesets are used.
normalizelogical value. If TRUE normalize data using quantile normalization
backgroundlogical value. If TRUE background correct using RMA background correction
background.methodname of background method to use.
normalize.methodname of normalization method to use.
summary.methodname of summary method to use.
background.paramlist of parameters for background correction methods.
normalize.paramlist of parameters for normalization methods.
summary.paramlist of parameters for summary methods.
verbosity.levelAn integer specifying how much to print out. Higher values indicate more verbose. A value of 0 will print nothing.

Details

This function computes the expression measure using threestep methods. Greater details can be found in a vignette.

Value

An ExpressionSet

Seealso

expresso , rma

Author

Ben Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Examples

if (require(affydata)) {
data(Dilution)

# should be equivalent to rma()
eset <- threestep(Dilution)

# Using Tukey Biweight summarization
eset <- threestep(Dilution, summary.method="tukey.biweight")

# Using Average Log2 summarization
eset <- threestep(Dilution, summary.method="average.log")

# Using IdealMismatch background and Tukey Biweight and no normalization.
eset <- threestep(Dilution, normalize=FALSE,background.method="IdealMM",
summary.method="tukey.biweight")

# Using average.log summarization and no background or normalization.
eset <- threestep(Dilution, background=FALSE, normalize=FALSE,
background.method="IdealMM",summary.method="tukey.biweight")

# Use threestep methodology with the rlm model fit
eset <- threestep(Dilution, summary.method="rlm")

# Use threestep methodology with the log of the average
eset <- threestep(Dilution, summary.method="log.average")

# Use threestep methodology with log 2nd largest method
eset <- threestep(Dilution, summary.method="log.2nd.largest")

eset <- threestep(Dilution, background.method="LESN2")
}

Three Step expression measures returned as a PLMset

Description

This function converts an AffyBatch into an PLMset using a three step expression measure.

Usage

threestepPLM(object,subset=NULL, normalize=TRUE, background=TRUE,
             background.method="RMA.2", normalize.method="quantile",
             summary.method="median.polish", background.param = list(),
             normalize.param=list(), output.param=list(),
             model.param=list(), verbosity.level=0)

Arguments

ArgumentDescription
objectan AffyBatch
subseta vector with the names of probesets to be used. If NULL then all probesets are used.
normalizelogical value. If TRUE normalize data using quantile normalization
backgroundlogical value. If TRUE background correct using RMA background correction
background.methodname of background method to use.
normalize.methodname of normalization method to use.
summary.methodname of summary method to use.
background.paramlist of parameters for background correction methods
normalize.paramlist of parameters for normalization methods
output.paramlist of parameters for output methods
model.paramlist of parameters for model methods
verbosity.levelAn integer specifying how much to print out. Higher values indicate more verbose. A value of 0 will print nothing

Details

This function computes the expression measure using threestep methods. It returns a PLMset . The most important difference is that the PLMset allows you to access the residuals which the threestep function does not do.

Value

An PLMset

Seealso

expresso , rma , threestep , rmaPLM , fitPLM

Author

Ben Bolstad bmb@bmbolstad.com

References

Bolstad, BM (2004) list("Low Level Analysis of High-density ", " Oligonucleotide Array Data: Background, Normalization and ", " Summarization") . PhD Dissertation. University of California, Berkeley.

Examples

if (require(affydata)) {
data(Dilution)

# should be equivalent to rma()
eset <- threestepPLM(Dilution)
}