Learn R Programming

xps (version 1.32.0)

attachExpr-methods: Attach/Remove Expression Measures

Description

Attach/remove expression levels to/from ExprTreeSet.

Usage

attachExpr(object, treenames = "*")

removeExpr(object)

Arguments

object
Object of class "ExprTreeSet".
treenames
Object of class "list" representing the names of the ROOT expression trees.

Value

A ExprTreeSet object.

Details

By default expression levels will be saved in class ExprTreeSet as slot data, since usually the data.frame obtained as result of e.g. rma normalization is of reasonable size. However, when normalizing many arrays, especially exon arrays at probeset levels, it may be better to compute rma with slot add.data=FALSE thus avoiding memory problems. In this case, function attachExpr allows to fill slot data on demand.

attachExpr exports expression levels from expression trees from ROOT expression file and and saves as data.frame data. treenames is a vector of tree names to attach; for treenames="*" all trees from slot treenames will be exported and expression levels attached as data.frame data.

removeExpr removes expression levels from ExprTreeSet and replaces data.frame data with an empty data.frame of dim(0,0).

See Also

attachCall, removeCall

Examples

Run this code
## first, load ROOT scheme file and ROOT data file
scheme.test3 <- root.scheme(paste(path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
data.test3 <- root.data(scheme.test3, paste(path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

data.rma <- rma(data.test3,"tmp_Test3RMA0",tmpdir="",background="pmonly",normalize=TRUE,add.data=FALSE,verbose=FALSE)

## attach data
data.rma <- attachExpr(data.rma)

## get data.frame
expr.rma <- validData(data.rma)
head(expr.rma)

## remove data
data.rma <- removeExpr(data.rma)

rm(scheme.test3, data.test3)
gc()

Run the code above in your browser using DataLab