readExpressionSet          package:Biobase          R Documentation

_R_e_a_d '_E_x_p_r_e_s_s_i_o_n_S_e_t'

_D_e_s_c_r_i_p_t_i_o_n:

     Create an instance of class ExpressionSet by reading data from
     files.

     Unfortunately, 'widget' functionality is not yet implemented for
     read.ExpressionSet.

_U_s_a_g_e:

     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,
                        ...)

_A_r_g_u_m_e_n_t_s:

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.

_D_e_t_a_i_l_s:

     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'.

_V_a_l_u_e:

     An instance of 'ExpressionSet-class'.

_A_u_t_h_o_r(_s):

     Martin Morgan <mtmorgan@fhcrc.org>

_S_e_e _A_l_s_o:

     'ExpressionSet' for additional methods.

_E_x_a_m_p_l_e_s:

     ## 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"))

