Skip to contents

A 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 TEXT segment of the FCS file.

  • [['data']] is written as binary.

    • this forms the DATA segment of the FCS file.

  • The HEADER segment (string) – containing the required offsets – is derived from TEXT and DATA.

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.

Value

The FCS 3.1 file is written to disk and a summary message is displayed.