\name{MadbSet-class} \docType{class} \alias{MadbSet-class} %\alias{drawBioControls,MadbSet-method} %\alias{drawBioControls} \alias{drawHistogram,MadbSet-method} \alias{drawHistogram} \alias{drawMA,MadbSet-method} \alias{drawMA} \alias{drawMA,ExpressionSet-method} %\alias{drawPolyAControls,MadbSet-method} %\alias{drawPolyAControls} \alias{getArrays,MadbSet-method} \alias{getArrays} \alias{getA,MadbSet-method} \alias{getA} \alias{getM,MadbSet-method} \alias{getM} \alias{getSignalChannels,MadbSet-method} \alias{getSignalChannels} \alias{getWeights,MadbSet-method} \alias{getWeights} \alias{publishToDB,MadbSet-method} %\alias{toExprSet,MadbSet-method} %\alias{toExprSet} \alias{writeTable,MadbSet-method} \alias{writeTable} \alias{MadbSet} \title{Class "MadbSet" an extended version of the "ExpressionSet" class from "Biobase" } \description{The "MadbSet" class directly extends the "ExpressionSet" class from the package "Biobase", additional functionality that has been included in this type of object are a "weights" slot, that can be used to mark flagged genes, some generic methods like "drawMA" and "drawHistogram" as well the functions "getM" and "getA" that are quite useful. The "MadbSet" class can be used for both two color micro arrays and Affymetrix GeneChips. Limma objects (\code{RGList} or \code{MAList}) or \code{ExpressionSet} objects can be converted with the \code{\link{newMadbSet}} function} \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("MadbSet", ...)} or using the function \code{\link{newMadbSet}}. The use of the \code{\link{newMadbSet}} function is preferred, since it allows to convert other objects to a MadbSet object. } \section{Slots}{ \describe{ \item{\code{type}:}{Object of class \code{"character"} specifying if the data origins from a one color array ("Affymetrix") or from a two color array ("TwoColor"). This argument is optional. } \item{\code{printer}:}{Object of class \code{"Layout"} same as in the limma package the printer attribute. Defines the number of rows and columns per subgrid as well as the rows and columns of subgrids on the array. } \item{\code{samples}:}{Object of class \code{"list"} a list containing the sample names. Optional parameter.} \item{\code{array.pairs}:}{Object of class \code{"numeric"} a vector that specifies what columns belong to each other. like the red and green intensities per array. In Affymetrix chips this is a optional parameter, for two color micro arrys this parameter should be defined. e.g with "array.pairs=c(1,-1,2,-2)" for a "MadbSet" that contains data from two arrays (and has therefore 4 expression columns), the number defines what columns belong to each other, the signs define the color (positive for Red, negative for Green, in the tradition of the M value that is \code{log2(R)-log2(G)}).} \item{\code{weights}:}{Object of class \code{"matrix"} a matrix with zeros (flagged features) and ones (not flagged ones). should always have the same number of columns and rows as the "exprMatrix". Optional argument.} \item{\code{exprs}:}{Inherited from \code{ExpressionSet}, for more information refer to the \code{ExpressionSet} documentation.} \item{\code{se.exprs}:}{Inherited from \code{ExpressionSet}, for more information refer to the \code{ExpressionSet} documentation.} \item{\code{phenoData}:}{Inherited from \code{ExpressionSet}, for more information refer to the \code{ExpressionSet} documentation.} % \item{\code{description}:}{Object of class \code{"characterORMIAME"} look at the documentation of the "exprSet" object. } \item{\code{annotation}:}{Inherited from \code{ExpressionSet}, for more information refer to the \code{ExpressionSet} documentation.} % \item{\code{notes}:}{Object of class \code{"character"} look at the documentation of the "exprSet" class. } \item{\code{genes}:}{Object of class \code{"matrix"}, holds information about the genes that belong to the rows in the \code{exprs} slot. This slot is automatically loaded with the \code{genes} slot of a \pkg{limma} object (MAList or RGList) when the function \code{\link{newMadbSet}} is used to transform those objects into a MadbSet.} } } \section{Extends}{ Class \code{"ExpressionSet"}, directly. } \section{Methods}{ \describe{ \item{average}{See documenation \code{\link{average}}.} % \item{drawBioControls}{\code{signature(object = "EexprSet")}: Draws % the expression intensities from the biotynilated control sequences % that Affymetrix included in their GeneChips. } \item{drawHistogram}{\code{(object, index=NULL, type=NULL, draw.pairs=FALSE,nr.breaks=250, draw.legend=FALSE,col=NULL)}: Draws histograms of the intensities of the different chips. \code{index}: with index you can specify the channels (intensities) for which a histogram should be drawn. By default a histogram with all channels available will be drawn. \code{type}: not used yet... \code{draw.pairs}: not used yet... \code{nr.breaks}: the number of breaks for the histogram. \code{draw.legend}: if a legend should be drawn into the plot. \code{col}: the color in which the lines should be drawn. By default for each line an other color will be used. } \item{drawMA}{\code{(object, array.pairs=NULL, g=NULL, r=NULL, log.values=NULL, one.image=TRUE,d raw.flagged=FALSE, use.weights.from=NULL,main=NULL, colramp=NULL,col=NULL,...)}: Draws an M versus A plot of the data. By submitting r and g one can specify what chips (or channel) should be used as the red intensities and which as the green channel. r and g can either be the index of the respective sample in the ExpressionMatrix (exprs slot), or the name of the sample (i.e. the Affymetrix cel file name). \code{array.pairs}: a vector with the indizes of the channels to compare. Red signal channels should be specified as positive numbers, green channels as negative ones. When the object was created with the \code{\link{newMadbSet}} this argument is already stored in the object itself. Usually it is better to specify the channels to draw with the \code{r} and \code{g} arguments. \code{g}: the index of the green intensity channel. \code{exprs} matrix (or the name of the sample/array). \code{r}: the same for the red signal channel. \code{log.values}: if the values in the object are already in log2 scale. This argument is optional as the function checks for log scale values anyway. \code{one.image}: if all MA plots should be drawn into one image, only usefull when array.pairs are specified! \code{draw.flagged}: if the flagged genes should also be drawn into the plot (as orange points). \code{use.weights.from}: index of the channel from which the weights should be used; if for one MA plot only the weights of one of the two signal channels should be used, otherwise only those genes will be drawn, that are not flagged bad in both channels. \code{main}: the title for the plot. \code{colramp}: a function that takes numbers as input and returns colors (just like the \link{heat.colors} or \link{topo.colors}). If submitted, the points are colored according to the density of spots in the place of the point. \code{col}: the color or vector of colors in which the points should be drawn. } % \item{drawPolyAControls}{\code{signature(object = "EexprSet")}: % Draws the expression intensities of the poly A control sequences % from Affymetrix. } \item{getA}{\code{(object,r,g,remove.flagged=FALSE)}: returns the A values (average intensity, A = 1/2 * log2(R*G)). To define which columns in the expression matrix represent the green and which the red channel one can submit the r and g parameters with the index of the red signals and green signals respectively (or the names of the columns of the samples in the \code{exprs} slot). For example \code{getA(Eset,r=2,g=1)} uses the second column of the exprs slot of the Eset object as red signal channel in the formula above and the first column as green signal channel. It is also possible to submit a numerical vector with the indizes of the red signal channels as r (for example \code{r=c(2,4)}) and the same for the g parameter (\code{g=c(1,3)}). This returns an A values matrix with two columns, the first with A values using the the 2nd column as red and 1st column as green channel, the second column of A values was calculated by using the 4th column as red and the 3rd as green channel. By setting the parameter \code{remove.flagged} to \code{TRUE} will give all genes that have a weight of 0 (in the \code{weights} slot of the \code{MadbSet} object) in one of the signal channels a \code{NA} value.} \item{getArrays}{\code{(object, ...)}: returns the names of the arrays of the \code{MadbSet} object submitted.} \item{getM}{\code{(object,r,g,remove.flagged=FALSE)}: Same as the getA function, but this function returns the regulation (log2 ratio) values (M = log2(R/G)). } \item{getSignalChannels}{\code{(object,...)}: returns the signal channel names of the \code{MadbSet} object submitted.} \item{getWeights}{\code{object}: Returns the weights for the single intensities. A weight of 0 means that the feature was flagged, a weight of 1 means that the signal is ok. } % \item{toExprSet}{\code{(object)}: Casts the EexprSet object in a % expSet object. } \item{loadFromDB}{\code{(object,connection,name,pk,v=TRUE)}: loads a previously saved (with the function \code{\link{publishToDB}}) \code{MadbSet} object from the database. This method requires the \pkg{pgUtils} package. Arguments: \code{object}: a instance of the \code{MadbSet} class, submit \code{newMadbSet()} to create a newone. \code{connection}: the database connection to a PostgreSQL database. \code{name}: the experiment name (experiment title) that you want to load from the database. To get a overview of the available experiments in the database you can call \code{dbGetExperimentInfo(connection)}. \code{pk}: optional argument. Useful to load a subset of an experiment from the database. Simply submit the primary keys from the signal channels (column \code{signal\_channels\_pk} in the result from the \code{dbGetExperimentInfo} function). \code{v}: if TRUE additional informations will be printed to the console. } \item{publishToDB}{\code{signature(object = "MadbSet")}: stores the object into a PostgreSQL database. Call \code{help(publishToDB)} to get more information of this method. This method requires the \pkg{pgUtils} package.} \item{writeTable}{\code{(object,file,mas5calls,include.annotation)}: writes the expression values to a tab delimited table. Arguments: \code{object}: the object from the type \code{MadbSet} that contains the normalized values. \code{file}: the file where the data should be written into. \code{mas5calls}: optional, for MAS5 normalized chips. If submitted, the calls will be included in the output file.} } } \author{ Johannes Rainer } \note{ For further informations and examples refer to the package vignette (documentation), which can be opened using \code{\link{openMadbVignette}}. } \seealso{ % \code{\link{createEexprSetFromLimma}}, % \code{\link{exprSet-class}}, \code{\link{average}} \code{\link[Biobase:class.ExpressionSet]{ExpressionSet}} } \keyword{classes}