\name{average} %\docType{methods} %\alias{average,EexprSet-method} \alias{average,MadbSet-method} \alias{average} \title{Average signal channels of a microarray experiment} \description{ \code{average} allows to average replicated signal channels (or replicated features within a signal channel) of a \code{MadbSet} object. } \usage{ average(object,average.which,log.scale=TRUE,method,array.names=NULL,v=TRUE,average.genes=TRUE,exclude.flagged=TRUE,only.good.spots=FALSE,...) } \arguments{ \item{object}{The \code{MadbSet} that contains the signal channels that should be averaged.} \item{average.which}{A numerical vector defining which columns of the \code{exprs} (which signal channels) slot of the \code{object} should be averaged. e.g. if the \code{exprs} slot contains 4 column and the columns 1 and 3 respectiveley 2 and 4 contain the expression values of replicated samples, \code{c(1,2,1,2)} has to be submitted to average the replicated samples.} \item{log.scale}{If the expression values should be log2 transformed before averaging.} \item{method}{The averaging method (one of \code{c("mean","median","tukey.biweight")}).} \item{array.names}{The names for the averaged signal channels (the \code{colnames} of the \code{exprs} slot in the returned \code{EexprSet} object).} \item{v}{Display some verbose messages during the execution of the function.} \item{average.genes}{If replicated spots / genes per signal channel should also be averaged (must have the same ID!).} \item{exclude.flagged}{If features with a weight of 0 (in the weights slot, means feature was flagged bad by the scanning software) should not be used to calculate the average across replicates. Could be problematic when doing a dye swap normalization with only two arrays with this function and some features are flagged bad on one and not flagged bad on the other array (function will use only the value from the not flagged feature in this case). In this case it could be better submitting exclude.flagged=FALSE.} \item{only.good.spots}{If only those features should be averaged across replicated arrays, that are not flagged bad in all arrays (Only for averaging accross arrays, not averaging within arrays!).} \item{...}{Additional parameters for a optional filter function.} } \details{ This function allows to average measured intensities of replicated microarrays (technical replicates). If the \code{weights} slot of the \code{MadbSet} object is not NULL and the \code{exclude.flagged} parameter is set TRUE, all genes that have weight of 0 (e.g. were flagged as bad spots by the scanning software) are excluded from the calculation of the average expression values (see description of the attribute exclude.flagged for more information). } \value{ A \code{MadbSet} object that contains the averaged expression values for replicated microarrays. } \author{Johannes Rainer} \seealso{ \code{\link{MadbSet-class}} } \keyword{methods}