exprSet {Biobase} | R Documentation

## Class for Microarray Data and Methods for Processing Them

### Description

This is a class representation for microarray data

### Extends

Directly extends class `annotatedDataset`.

### Creating Objects

`new('exprSet', exprs = [exprMatrix], se.exprs = [exprMatrix], phenoData = [phenoData], annotation = [character], description = [characterORMIAME], notes = [character])`

### Slots

Derived from `annotatedDataset`:

`reporterInfo`
  class:`data.frameOrNULL`
`phenoData`:
  Object of class 'phenoData' containing the patient (or case) level data. The columns of the pData slot of this entity represent variables and the rows represent patients or cases.

Introduced in `exprSet`:

`exprs`:
  Object of class 'exprMatrix'. The observed expression levels. This is a matrix with columns representing patients or cases and rows representing genes.
`se.exprs`:
  Object of class 'exprMatrix'. This is a matrix of the same dimensions as `exprs` which contains standard error estimates for the estimated expression levels.
`annotation`
  A character string identifying the annotation that may be used for the `exprSet` instance.
`description`:
  Object of class 'characterORMIAME'. For compatibility with previous version of this class description can also be a 'character'. The clase `characterOrMIAME` has been defined just for this.
`notes`:
  Object of class 'character' of explanatory text

### Methods

Derived from `annotatedDataset`:

`$(exprSet)` and `$(exprSet, value)<-`
  An old-style method. It is `pData(eset)[[as.character(val)]]` which does not quite have the right semantics but it is close. This operator extracts the named component of the `pData` slot in `phenoData`.
`[[(index)` and `[[(index, value)<-`:
  see `annotatedDataset`
`phenoData(exprSet)` and `phenoData(exprSet, value)<-`
  see `annotatedDataset`
`reporterInfo(exprSet)` and `reporterInfo(exprSet, value)<-`
  see `annotatedDataset`
`pData(exprSet)` and `pData(exprSet, value)<-`
  see `annotatedDataset`
`varLabels(exprSet)`
  see `annotatedDataset`

Class-specific methods:

`update2MIAME(exprSet)`:
  Converts `exprSet`s from previous versions, that have a `character` in description to an object that has an instance of the class `MIAME` in the description slot. The old description is stored in the `title` slot. If the object already has a `MIAME` description the same object is returned.
`assayData(exprSet)`:
  Method to access `exprs` slot
`exprs(exprSet)` and `exprs(exprSet)<-`:
  Methods to access/update `exprs` slot
`se.exprs(exprSet)` and `se.exprs(exprSet)<-`:
  Methods to access/update `se.exprs` slot
`description(exprSet)` and `description(exprSet, value)<-`:
  Methods to access/update `description` slot
`annotation(exprSet)` and `annotation(exprSet, value)<-`:
  Methods to access/update `annotation` slot
`notes(exprSet)` and `notes(exprSet, value)<-`:
  Methods to access/update `notes` slot
`abstract(exprSet)`:
  Not documented: `function(object) abstract(description(object))`
`sampleNames(exprSet)` and `sampleNames(exprSet, value)<-`:
  Methods to access/update `dimnames` of the `exprs` slot
`geneNames(exprSet)` and `geneNames(exprSet, value)<-`:
  Methods to access/update `row.names` of the `exprs` slot - gene names
`write.exprs(exprSet,...)`:
  Writes the expression levels to file. It takes the same arguments as `write.table`. If called with no arguments it is equivalent to `write.table(exprs(exprSet),file="tmp.txt",quote=FALSE,sep="\t")`.
`exprs2excel(exprSet,...)`:
  Writes the expression levels to `csv` file. This file will open nicely in excel. It takes the same arguments as `write.table`. If called with no arguments it is equivalent to `write.table(exprs(exprSet),file="tmp.csv", sep = ",", col.names = NA)`.
`as.data.frame.exprSet(exprSet, row.names = NA, optional = NA)`:
  Converts `exprSet` into a `data.frame`. In the return value, the first column is called `exprs` and contains the values returned by the method `exprs()`. The second column is called genenames and contains the values returned by the method `geneNames()`. The other columns will depend on the contents of the `phenoData` slot.

Iterator-series methods:
This is a set of methods to iterate over different types of objects. The behaviour of the methods is similar to that of the `apply` family.

`iter(exprSet, missing, function)`:
  An iterator over genes. Returns the result of applying `function` to the matrix of expressions on margin 1 (see `apply`)
`iter(exprSet, missing, list)`:
  A multi-iterator over genes. Concatenates result of applying each function in the list `list` in a matrix (assumes result of each function evaluation is a scalar).
`iter(exprSet, character, function)`:
  An iterator over genes. `function` is assumed to have arguments x and y; the pData element named by covlab will be bound to x, the gene expression values will be iteratively bound to y

Split-series methods:

`split(exprSet, factor)`:
  See method for `vector`
`split(exprSet, vector)`:
  Splits the exprSet. The returned value is a list, each component of which is an `exprSet`. If the length of `vector` is a divisor of the number of rows of the phenoData data frame then the split is made on this.

Standard generic methods:

`show(exprSet)`:
  Renders information about the exprSet in a concise way on stdout.
`[(exprSet)`:
  A subset operator. Ensures that both `exprs` and `phenoData` are subset properly.
`validObject(exprSet)`:
  Validity-checking method, ensuring the number and names of `phenoData` rows match the number and names of `exprs` columns

### See Also

`MIAME`, `annotatedDataset`, `phenoData`, `class:exprMatrix`, `class:characterORMIAME`, `read.exprSet`, `esApply`

### Examples

      data(geneData)
      data(geneCov)
      covdesc<- list("Covariate 1", "Covariate 2", "Covariate 3")
      names(covdesc) <- names(geneCov)
      pdata <- new("phenoData", pData=geneCov, varLabels=covdesc)
      pdata[1,]
      pdata[,2]

      expr <- new("exprSet", exprs=geneData, phenoData=pdata)
      expr
      expr[,1:10]
      expr[,1]
      expr[1,]
      expr[1,1]
      expr[1:100,]
      expr[1:44,c(2,4,6)]
      Means <- iter(expr, f=mean)

      chkdich <- function(x) if(length(unique(x))!=2) stop("x not dichotomous")
      mytt <- function(x,y) {
         chkdich(x)
         d <- split(y,x)
         t.test(d[[1]],d[[2]])$p.val
      }

      Tpvals <- iter(expr, "cov1", mytt )

      sp1 <- split(expr, c(1,2))
      sp2 <- split(expr, c(rep(1,6), rep(2,7)))

      sampleNames(expr)
      sampleNames(expr) <- letters

      # as.data.frame.exprSet - example
      data(sample.exprSet)
      sd.genes <- esApply(sample.exprSet, 1, sd)
      dataf <- as.data.frame(sample.exprSet)
      dataf <- cbind(dataf, sd.genes=rep(unname(sd.genes), length=nrow(dataf)))
      coplot(sd.genes ~ exprs | sex+type, data=dataf)

[Package Biobase version 1.10.1 Index]