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
MAplot()
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
Argument | Description |
---|---|
... | Additional parameters for the routine |
A | A vector to plot along the horizonal axis |
M | A vector to plot along vertical axis |
subset | A set of indices to use when drawing the loess curve |
show.statistics | If true some summary statistics of the M values are drawn |
span | span to be used for loess fit. |
family.loess | "guassian" or "symmetric" as in loess . |
cex | Size of text when writing summary statistics on plot |
Seealso
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
Argument | Description |
---|---|
pset | The 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
Author
Ben Bolstad bmb@bmbolstad.com
Examples
if (require(affydata)) {
data(Dilution)
Pset <- fitPLM(Dilution)
eset <- pset2eset(Pset)
}
PLMset_class()
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.
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
Argument | Description |
---|---|
filename | The name of the file containing RMAExpress output to be read in |
return.value | should a matrix or an ExpressionSet be returned |
Value
returns an ExpressionSet
Author
Ben Bolstad bmb@bmbolstad.com
References
affyPLM_internal()
Internal affyPLM functions
Description
Internal affyPLM functions
Details
These are not to be called by the user and/or are undergoing testing
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
Argument | Description |
---|---|
object | an AffyBatch |
method | an integer code specifying which method to use |
baseline | A baseline value to use |
theta | A 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)
}
fitPLM()
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
Argument | Description |
---|---|
object | an AffyBatch |
model | A formula describing the model to fit. This is slightly different from the standard method of specifying formulae in R. Read the description below |
variable.type | a way to specify whether variables in the model are factors or standard variables |
constraint.type | should factor variables sum to zero or have first variable set to zero (endpoint constraint) |
subset | a vector with the names of probesets to be used. If NULL then all probesets are used. |
normalize | logical value. If TRUE normalize data using quantile normalization |
background | logical value. If TRUE background correct using RMA background correction |
background.method | name of background method to use. |
normalize.method | name of normalization method to use. |
background.param | A list of parameters for background routines |
normalize.param | A list of parameters for normalization routines |
output.param | A list of parameters controlling optional output from the routine. |
model.param | A list of parameters controlling model procedure |
verbosity.level | An 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
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,]
}
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
Argument | Description |
---|---|
eset | An ExpressionSet |
span | parameter to be passed to the function loess . |
choose.subset | use a subset of values to establish the normalization relationship |
subset.size | number to use for subset |
verbose | verbosity flag |
family | parameter to be passed to the function loess . |
prd.td | cutoff parameter (details in the bibliographic reference) |
trim | How much to trim from the top and bottom before computing the mean when using the scaling normalization |
baseline | Index of array to use as baseline, negative values (-1,-2,-3,-4) control different baseline selection methods |
transfn | Transform the ExpressionSet before normalizing. Useful when dealing with expression values that are log-scale |
baseline.type | A 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)
}
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
Argument | Description |
---|---|
abatch | An AffyBatch |
type | how should MM and PM values be handled |
use.median | use median rather than mean |
use.log | take 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
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
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
Argument | Description |
---|---|
X | A matrix. The columns of which are to be normalized. |
abatch | An AffyBatch |
type | A parameter controlling how normalization is applied to the Affybatch. |
trim | How much to trim from the top and bottom before computing the mean when using the scaling normalization. |
baseline | Index of array to use as baseline, negative values (-1,-2,-3,-4) control different baseline selection methods. |
log.scalefactors | Compute 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)
}
preprocess()
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
Argument | Description |
---|---|
object | an AffyBatch |
subset | a vector with the names of probesets to be used. If NULL then all probesets are used. |
normalize | logical value. If TRUE normalize data using quantile normalization |
background | logical value. If TRUE background correct using RMA background correction |
background.method | name of background method to use. |
normalize.method | name of normalization method to use. |
background.param | list of parameters for background correction methods |
normalize.param | list of parameters for normalization methods |
verbosity.level | An 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
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)
}
pseudo()
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
Argument | Description |
---|---|
low | color at low end of scale |
high | color at high end of scale |
mid | color at exact middle of scale |
k | number of colors to have |
x | A data series |
horizontal | If TRUE then color bar is to be draw horizontally |
col | colors for color bar |
scale | tickmarks for x if x is not numeric |
log.ticks | use a log type transformation to assign the colors |
... | additional parameters to plotting routine |
Details
Adapted from similar tools in maPlots pacakge.
Seealso
Author
Ben Bolstad bmb@bmbolstad.com
rmaPLM()
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
Argument | Description |
---|---|
object | an AffyBatch |
subset | a vector with the names of probesets to be used. If NULL then all probesets are used. |
normalize | logical value. If TRUE normalize data using quantile normalization |
background | logical value. If TRUE background correct using RMA background correction |
background.method | name of background method to use. |
normalize.method | name of normalization method to use. |
background.param | A list of parameters for background routines |
normalize.param | A list of parameters for normalization routines |
output.param | A list of parameters controlling optional output from the routine. |
model.param | A list of parameters controlling model procedure |
verbosity.level | An 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)
}
threestep()
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
Argument | Description |
---|---|
object | an AffyBatch . |
subset | a vector with the names of probesets to be used. If NULL , then all probesets are used. |
normalize | logical value. If TRUE normalize data using quantile normalization |
background | logical value. If TRUE background correct using RMA background correction |
background.method | name of background method to use. |
normalize.method | name of normalization method to use. |
summary.method | name of summary method to use. |
background.param | list of parameters for background correction methods. |
normalize.param | list of parameters for normalization methods. |
summary.param | list of parameters for summary methods. |
verbosity.level | An 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
Seealso
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")
}
threestepPLM()
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
Argument | Description |
---|---|
object | an AffyBatch |
subset | a vector with the names of probesets to be used. If NULL then all probesets are used. |
normalize | logical value. If TRUE normalize data using quantile normalization |
background | logical value. If TRUE background correct using RMA background correction |
background.method | name of background method to use. |
normalize.method | name of normalization method to use. |
summary.method | name of summary method to use. |
background.param | list of parameters for background correction methods |
normalize.param | list of parameters for normalization methods |
output.param | list of parameters for output methods |
model.param | list of parameters for model methods |
verbosity.level | An 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)
}