readExpressionSet {Biobase} | R Documentation |
Create an instance of class ExpressionSet by reading data from files.
Unfortunately, 'widget' functionality is not yet implemented for read.ExpressionSet.
readExpressionSet(exprsFile, phenoDataFile=character(0), experimentDataFile=character(0), notesFile=character(0), annotation=character(0), ## arguments to read.* methods exprsArgs=list(...), phenoDataArgs=list(...), experimentDataArgs=list(...), notesArgs=list(...), ## widget widget = getOption("BioC")$Base$use.widgets, ...)
exprsFile |
(character) File name from which to read expression
values. File should contain a matrix with rows as features and
columns as samples. Tab-delimited files can be read with the
additional argument sep="\t" . |
phenoDataFile |
(character) File name from which to read
phenotypic data. See read.AnnotatedDataFrame for
details. |
experimentDataFile |
(character) File name from which to read
experiment data. See read.MIAME for details. |
notesFile |
(character) File name from which to read notes;
readLines is used to input the file. |
annotation |
(character) A single character string indicating the annotation associated with this ExpressionSet. |
exprsArgs |
A list of arguments to be used (with
read.table ) when reading in the expression matrix. |
phenoDataArgs |
A list of arguments to be used (with
read.AnnotatedDataFrame ) when reading
phenoData . |
experimentDataArgs |
A list of arguments to be used (with
read.MIAME ) when reading experiment data. |
notesArgs |
A list of arguments to be used (with
readLines ) when reading notes. |
widget |
A boolean value indicating whether widgets can be
used. Widgets are NOT yet implemented for
read.AnnotatedDataFrame . |
... |
Arugments passed by default to all methods used to read data. |
Expression values are read using the read.table
function. Phenotypic data are read using the
read.AnnotatedDataFrame
function. Experiment data are
read using the read.MIAME
function. Notes are read using
the readLines
function. The return value must be a valid
ExpressionSet
.
An instance of ExpressionSet-class
.
Martin Morgan <mtmorgan@fhcrc.org>
ExpressionSet
for additional methods.
## Create a temporary file for expression data exprsFile <- tempfile() data(geneData) write.table(geneData[,1:6], exprsFile, quote = FALSE, sep = "\t", row.names = TRUE, col.names = TRUE) ## Create a temporary file with a structure like that from 'Save ## as...' text file from a popular spreadsheet (see ## read.AnnotatedDataFrame) phenoDataFile <- tempfile() df <- data.frame(Id=paste("Sample", 1:6), x=1:6, y=rep(c("Low", "High"), 3), z=I(letters[1:6])) write.table(df, phenoDataFile, quote=FALSE, sep="\t", row.names=FALSE) ## Read ExpressionSet with appropriate parameters obj <- readExpressionSet(exprsFile, phenoDataFile, header=TRUE, sep="\t") obj unlink(c("exprsFile", "phenoDataFile"))