readFCSdataset: FCS Dataset Parser

View source: R/fcs.R

readFCSdatasetR Documentation

FCS Dataset Parser

Description

Helper to parse dataset from Flow Cytometry Standard (FCS) compliant files.

Usage

readFCSdataset(fileName, options, display_progress = TRUE, ...)

Arguments

fileName

path to file.

options

list of options used to parse FCS file. It should contain (otherwise, it will be filled with the default values listed below):
- header, a list whose members define the "at" offset from header$start$at and the "n" number of bytes to extract:
– start: where to start reading current FCS dataset. Default is list(at = 0, n = 6),
– space: where to retrieve space. Default is list(at = 6, n = 4),
– 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 data segment beginning. Default is list(at = 26, n = 8),
– data_end: where to retrieve file data 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.
- text_check, whether to check if text segment is compliant with FCS specifications. Default is FALSE.
- text_empty, whether to allow empty values when parsing text segment. Default is FALSE.
- text_trim, remove whitespace in keywords names. Default is "none". Allowed are "both", "left", "right" and "none".

display_progress

whether to display a progress bar. Default is TRUE.

...

other arguments to be passed.

Details

'options' may be tweaked according to file type, instrument and software used to generate it.
Default 'options' should allow to read most files.
'options' members with the exception of 'header' may be passed thanks to '...'.

Value

a list containing:
- options, list of 'options' used
- header, list of header information corresponding to 'options'
- delimiter, unique character used to separate keyword-value pairs
- text, list of keywords values,
- data, data.frame of values.


IFC documentation built on Sept. 14, 2023, 1:08 a.m.