readBaseFile: Low-level function to read a BASE file (stream) from a...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Low-level function to read a BASE file (stream) from a connection or a file.

Usage

1
2
## Default S3 method:
readBaseFile(con, ..., verbose=FALSE)

Arguments

con

A connection or a character string filename.

...

Arguments such as the important extractSpotsData, passed to readBaseFileSection().

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 (and neither is the R.utils package required).

Value

Returns a named list structure containing the parsed BASE structure. The names of the elements in the list are the same as the names (types) of the sections as given by section header 'section'.

Author(s)

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

References

[1] BASE - BioArray Software Environment,
http://base.thep.lu.se/

[2] Carl Troein, How to write a plugin for BASE, April 2003.
http://base.thep.lu.se/documentation/development/plugins.txt
http://opensource.microarray.omrf.org/wiki/bin/view/BASE/PluginWritingHowto

See Also

writeBaseFile(). readBaseFileSection(). See stdin() in showConnections to read from standard input.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Read a simple BASE file structure (adopted from [2])
filename <- system.file("data-ex", "baseExample.base", package="aroma.Base")
base <- readBaseFile(filename)
print(base)

# Write it back to file
tmpfile <- tempfile()
writeBaseFile(tmpfile, base)

# Read the newly create file
base2 <- readBaseFile(tmpfile)
file.remove(tmpfile)

# Compare with the original structure
stopifnot(equals(base, base2))

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