Write a flowstate as a Flow Cytometry Standard file (FCS 3.1)
Source: R/write_flowstate.R
write.flowstate.RdA flowstate – following Flow Cytometry Standard conventions – is converted to FCS 3.1 and written to disk. The conversion is as follows:
[['keywords']],[['parameters']], and[['spill']](if present) are converted to character string using a delimiter"|"to separate keyword-value pairs.this string forms the
TEXTsegment of the FCS file.
[['data']]is written as binary.this forms the
DATAsegment of the FCS file.
The
HEADERsegment (string) – containing the required offsets – is derived fromTEXTandDATA.
The FCS 3.1 compliant file is then written to disk.
N.B.: During testing, FCS 3.1 files written to disk by write.flowstate were fully compatible with read.flowstate and flowCore::read.FCS; issues were only with proprietary software (i.e., FlowJo). If proprietary software is to be used with FCS 3.1 files generated by write.flowstate, caution is advised.
Usage
write.flowstate(
flowstate.object,
new.fil = NULL,
add.fil.mod = TRUE,
file.dir,
endianness = c("little", "big")
)Arguments
- flowstate.object
A
flowstate- new.fil
Character string – default
NULL; if defined, the keyword'$FIL'will be updated with the provided value.- add.fil.mod
Logical – default
TRUE; the suffix'flowstateMOD'(string) will be appended to the value of'$FIL'.- file.dir
Character vector – a base; a file directory for saving the output FCS 3.1 file.
- endianness
Character string – default
"little"; see endian.