Learn R Programming

xps (version 1.32.0)

intensity-methods: Get/Set Data Values

Description

Get/set data values from/for class DataTreeSet.

Usage

intensity(object) intensity(object, filename = NULL, verbose = FALSE) <- value

Arguments

object
object of class DataTreeSet.
filename
character vector containing optional ROOT file name.
verbose
logical, if TRUE print status information.
value
data.frame containing expression values.

Details

Get the intensity values from slot data or set slot data to value.

Method intensity returns the data values from slot data as data.frame, while replacement method intensity<- allows to replace slot data with a data.frame.

Using replacement method intensity<- with default settings will not change the data stored in the ROOT data file, and thus will not have any effect on subsequent processing methods. If you really want to use the replacement data for further processing you must supply a new ROOT filename. This will export each intensity column of value as CEL-file (version 3), which will then be imported into the new ROOT data file filename.

Warning: Do not use replacement method intensity<- until you really know what you are doing!

Note: The first two columns of replacement data.frame value must be the (X,Y) coordinates, followed by the intensities whereby the number of intensity columns must be identical to the columns to be replaced.

Note: If you do not want to replace your current object, create first a copy of type DataTreeSet by simply writing newobj <- oldobj, and use newobj for replacement. This is important since intensity<- does also update slots rootfile, filedir and treenames when a new filename was chosen.

Note: The CEL-files created are fully functional CEL-files (version 3), however some header rows such as GridCornerUL, AlgorithmParameters, and some of the data in DatHeader are placeholders only.

Warning: The CEL-files created WILL REPLACE THE ORIGINAL CEL-files, if they have identical names to the original CEL-files and the original CEL-files are located in the working directory. Thus the original CEL-files should preferable be located in directory celdir of function import.data.

See Also

validData

Examples

Run this code
## Not run: 
# ## 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="/"))
# 
# ## get intensity values
# value <- intensity(data.test3)
# 
# ## make a copy of your object if you do not want to replace it
# newdata.test3 <- data.test3
# 
# ## replace slot data with value
# intensity(newdata.test3, "ReplacementData", FALSE) <- value
# str(newdata.test3)
# 
# ## now you can create an ExprTreeSet using the new intensity data
# data.rma <- rma(newdata.test3,"ReplacementRMA",tmpdir="",background="none",normalize=TRUE,verbose=FALSE)
# ## End(Not run)

Run the code above in your browser using DataLab