Package 'convert'

Title: Convert Microarray Data Objects
Description: Define coerce methods for microarray data objects.
Authors: Gordon Smyth <[email protected]>, James Wettenhall <[email protected]>, Yee Hwa (Jean Yang) <[email protected]>, Martin Morgan <[email protected]>
Maintainer: Yee Hwa (Jean) Yang <[email protected]>
License: LGPL
Version: 1.83.0
Built: 2024-11-29 05:23:59 UTC
Source: https://github.com/bioc/convert

Help Index


Convert Data Objects

Description

Convert between limma, marray and Biobase data objects.

Details

Objects can be converted (coerced) from one class to another using as(object, Class) where object is an object to convert and Class is the name of the class to convert to. The following conversions are provided:

From: To:
RGList marrayRaw
marrayRaw RGList
MAList marrayNorm
marrayNorm MAList
RGList NChannelSet
marrayRaw NChannelSet
MAList ExpressionSet
marrayNorm ExpressionSet

RGList and marrayRaw are coerced to NChannelSet. Channel values are not transformed.

MAList and marrayNorm are coerced so that the ExpressionSet slot contains log-ratios (M-values) and the ExpressionSet object has the same number of columns as the original object. In this case, information on the A-values is lost.

There is intentionally no conversion from RGList or marrayRaw to ExpressionSet, as ExpressionSet is intended for expression values, not intensities.

Author(s)

Gordon Smyth and others

See Also

as in the methods package.

Examples

##first set up some fake intensity matrices
testRed <- matrix(rnorm(5*2),5,2, 
  dimnames=list(paste("gene",1:5, sep=""), c("S1", "S2")))
testGreen <- matrix(rnorm(5*2),5,2, 
  dimnames=list(paste("gene",1:5, sep=""), c("S1", "S2")))

##some sample/target info
testTarget <- data.frame(slide=c("S1", "S2"), Cy3=c("T", "C"),
  Cy5=c("C", "T"), row.names=c("S1", "S2"))

maT <- new("marrayInfo", maLabels=c("S1", "S2"),
  maInfo= testTarget)

##now create instances and convert
x <- new("RGList")
x$R <- testRed
x$G <- testGreen
y <- as(x,"marrayRaw")
z <- as(x, "NChannelSet")

x <- new("marrayRaw")
x@maGf <- testGreen
x@maRf <- testRed
x@maTargets = maT
y <- as(x,"RGList")
z <- as(x, "NChannelSet")

x <- new("MAList")
y <- as(x,"marrayNorm")

##we construct a reasonably complete fake, small 
##instance of the marrayNorm class
x <- new("marrayNorm")
x@maM <- testRed
x@maA <- testGreen
maTargets(x) = maT
y <- as(x,"MAList")
y <- as(x, "ExpressionSet")

x <- new("MAList")
x$M <- testRed
x$A <- testGreen
x$targets <- testTarget
y <- as(x,"ExpressionSet")