readBaseFileSection        package:aroma.Base        R Documentation

_L_o_w-_l_e_v_e_l _f_u_n_c_t_i_o_n _t_o _r_e_a_d _a _B_A_S_E _f_i_l_e _s_e_c_t_i_o_n _f_r_o_m _a _c_o_n_n_e_c_t_i_o_n _o_r _a _f_i_l_e

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

     Low-level function to read a BASE file section from a connection
     or a file. This a supportive function to readBaseFile().

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

     ## Default S3 method:
     readBaseFileSection(con, suppressSingleAssayLabels=TRUE, extractSpotsData=FALSE, verbose=FALSE, ...)

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

     con: A 'connection' or a 'character' string filename.

suppressSingleAssayLabels: If 'TRUE' and only a single assay is read,
          field names in data table is non suffixed with assay name.

extractSpotsData: If 'TRUE', data tables in 'spots' sections are
          written to seperate files such that each assay has its own
          file. Files are written as tab-delimited files to current
          directory, using filename format "spots_<assay>.txt". Written
          data is removed from the final list structure and replaced
          with a header 'dataFiles' of the filenames for each assay.

 verbose: Either a 'logical', a 'numeric', or a 'Verbose' object
          specifying how much verbose/debug information is written to
          standard output. If a Verbose object, how detailed the
          information is is specified by the threshold level of the
          object. If a numeric, the value is used to set the threshold
          of a new Verbose object. If 'TRUE', the threshold is set to
          -1 (minimal). If 'FALSE', no output is written. 

     ...: Not used.

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

     Returns a named 'list' structure containing the parsed BASE
     structure.

_O_u_t _o_f _m_e_m_o_r_y?:

     Some BASE files are very large due to large amount of assay data
     in 'spots' sections.  By setting argument 'extractSpotsData=TRUE',
     such data is written to separate files for each assay immediately
     after being read and thereafter removed from memory.  This means
     that it is in practice possible to read BASE files with almost any
     number of assays, also if they are "passed" via stdin.

_S_l_o_w _p_e_r_f_o_r_m_a_n_c_e?:

     The number of lines in the data table of a BASE file data section
     is either not known on before hand or specified by the 'count'
     header. If 'count' is available, the data table is read
     approximately eight times faster than if it is not. To the best of
     our knowledge, starting with BASE v1.2.17 (released November
     2005), header 'count' is included by default and in previous
     versions it is not available at all. If 'count' is not specified,
     the table is first read line by line to a temporary file and then
     re-read by 'read.table()'. (The reason for this is that
     'read.table()' otherwise will read to end of file, and not to the
     first empty line. Unfortunately, this means that the reading of
     data is a bit slow.)

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

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

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

     'readBaseFile'().

