read.maimages             package:limma             R Documentation

_R_e_a_d _R_G_L_i_s_t _f_r_o_m _I_m_a_g_e _A_n_a_l_y_s_i_s _O_u_t_p_u_t _F_i_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Reads an RGList from a series of microarray image analysis output
     files

_U_s_a_g_e:

     read.maimages(files,source="spot",path=NULL,ext=NULL,names=files,columns=NULL,wt.fun=NULL,verbose=TRUE,sep="\t",quote="\"",...)
     read.imagene(files,path=NULL,ext=NULL,names=NULL,columns=NULL,wt.fun=NULL,verbose=TRUE,sep="\t",quote="\"",...)

_A_r_g_u_m_e_n_t_s:

   files: character vector giving the names of the files containing
          image analysis output or, for Imagene data, a character
          matrix of names of files. If omitted, then all files with
          extension 'ext' will be read.

  source: character string specifing the image analysis program which
          produced the output files.  Choices are 'arrayvision',
          '"genepix"', '"imagene"', '"quantarray"', '"smd"', '"spot"'
          or '"spot.close.open"'.

    path: character string giving the directory containing the files.
          Can be omitted if the files are in the current working
          directory.

     ext: character string giving optional extension to be added to
          each file name

   names: character vector of names to be associated with each array as
          column name

 columns: list with fields 'Rf', 'Gf', 'Rb' and 'Gb' giving the column
          names to be used for red and green foreground and background.
           This is not usually specified by the user but, if it is, it
          over-rides 'source'.

  wt.fun: function to calculate quality weights

 verbose: logical, 'TRUE' to report each time a file is read in

     sep: the field separator character

   quote: character string of characters to be treated as quote marks

     ...: any other arguments are passed to 'read.table'

_D_e_t_a_i_l_s:

     This is the main data input function for the LIMMA package. It
     extracts the foreground and background intensities from a series
     of files, produced by an image analysis program, and assembles
     them into the components of one list. The image analysis programs
     ArrayVision, GenePix, Imagene, QuantArray, Stanford Microarray
     Database (SMD) and SPOT are supported explicitly. Data from some
     other image analysis programs can be read if the appropriate
     column names containing the foreground and background intensities
     are specified using the 'columns' argument. (This will work if the
     column names are unique and if there are no rows in the file after
     the last line of data. Header lines are ok.) In the case of SPOT,
     two possible background estimators are supported: if
     'source="spot.close.open"' then background intensities are
     estimated from 'morph.close.open' rather than 'morph'.

     Spot quality weights may be extracted from the image analysis
     files using a ready-made or a user-supplied weight function
     'wt.fun'. 'wt.fun' may be any user-supplied function which accepts
     a data.frame argument and returns a vector of non-negative
     weights. The columns of the data.frame are as in the image
     analysis output files. See 'QualityWeights' for provided weight
     functions.

     For Imagene image data the argument 'files' should be a matrix
     with two columns. The first column should contain the names of the
     files containing green channel (cy3) data and the second column
     should contain names of files containing red channel (cy5) data.
     The function 'read.imagene' is called by 'read.maimages' when
     'source="imagene"'. It does not need to be called directly by
     users.

_V_a_l_u_e:

     An 'RGList' object containing the components 

       R: matrix containing the red channel foreground intensities for
          each spot for each array.

      Rb: matrix containing the red channel background intensities for
          each spot for each array.

       G: matrix containing the green channel foreground intensities
          for each spot for each array.

      Gb: matrix containing the green channel background intensities
          for each spot for each array.

 weights: spot quality weights, if 'wt.fun' is given

 printer: list of class 'PrintLayout', currently set only if
          'source="imagene"'

   genes: data frame containing gene names and IDs and spatial
          positions on the array, currently set only if
          'source="imagene"'

_A_u_t_h_o_r(_s):

     Gordon Smyth

_R_e_f_e_r_e_n_c_e_s:

     Web pages for the image analysis software packages mentioned here
     are listed at <URL: http://www.statsci.org/micrarra/image.html>

_S_e_e _A_l_s_o:

     'read.maimages' is based on 'read.table' in the base package.
     'read.marrayRaw' is the corresponding function in the marrayInput
     package.

     An overview of LIMMA functions for reading data is given in
     3.ReadingData.

_E_x_a_m_p_l_e_s:

     #  Read all .gpr files from current working directory
     #  and give weight 0.1 to spots with negative flags

     ## Not run: 
     files <- dir(pattern="*\\.gpr$")
     RG <- read.maimages(files,"genepix",wt.fun=wtflags(0.1))
     ## End(Not run)

     #  Read all .spot files from current working director and down-weight
     #  spots smaller or larger than 150 pixels

     ## Not run: 
     files <- dir(pattern="*\\.spot$")
     RG <- read.maimages(files,"spot",wt.fun=wtarea(150))
     ## End(Not run)

