readBaseFileSection: Low-level function to read a BASE file section from a...

Description Usage Arguments Value Out of memory? Slow performance? Author(s) See Also

Description

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

Usage

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

Arguments

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.

Value

Returns a named list structure containing the parsed BASE structure.

Out of memory?

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.

Slow performance?

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

Author(s)

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

See Also

readBaseFile().


HenrikBengtsson/aroma.Base documentation built on May 7, 2019, 1:51 a.m.