Parse data from Flow Cytometry Standard (FCS) compliant files.
readFCS(
fileName,
options = list(header = list(start = list(at = 0, n = 6), text_beg = list(at = 10, n
= 8), text_end = list(at = 18, n = 8), data_beg = list(at = 26, n = 8), data_end =
list(at = 34, n = 8)), apply_scale = TRUE, dataset = 1, force_header = FALSE,
text_only = FALSE),
display_progress = TRUE,
...
)
a list whose elements are lists for each dataset stored within the file.
each sub-list contains:
- header, list of header information corresponding to 'options'
- delimiter, unique character used to separate keyword - values
- text, list of keywords values,
- data, data.frame of values.
path to file.
list of options used to parse FCS file. It should contain:
- header, a list whose members define the "at" offset from header$start$at and the "n" number of bytes to extract:
-- start: where start reading FCS dataset. Default is list(at = 0, n = 6),
-- text_beg: where to retrieve file text segment beginning. Default is list(at = 10, n = 8),
-- text_end: where to retrieve file text segment end. Default is list(at = 18, n = 8),
-- data_beg: where to retrieve file text segment beginning. Default is list(at = 26, n = 8),
-- data_end: where to retrieve file text segment end. Default is list(at = 34, n = 8),
- apply_scale, whether to apply data scaling. It only applies when fcs file is stored as DATATYPE "I". Default is TRUE.
- dataset, (coerced to) an ordered vector of unique indices of desired dataset(s) to extract. Default is 1 to extract only the first dataset, whereas NULL allows to extract all available datasets.
- force_header, whether to force the use of header to determine the position of data segment. Default is FALSE, for using positions found in "$BEGINDATA" and "$ENDDATA" keywords.
- text_only, whether to only extract text segment. Default is FALSE.
whether to display a progress bar. Default is TRUE.
other arguments to be passed.
'options' may be tweaked according to file type, instrument and software used to generate it.
Default 'options' should allow to read most files.
'apply_scale', 'force_header', 'dataset', and 'textt_only' can also be passed to 'options' thanks to ...