Learn R Programming

flowCore (version 1.38.2)

write.flowSet: Write an FCS file

Description

Write FCS file for each flowFrame in a flowSet

Usage

write.flowSet(x, outdir=identifier(x), filename, ...)

Arguments

x
filename
A character scalar or vector giving the output file names. By default, the function will use the identifiers of the individual flowFrames as the file name, potentially adding the .fcs suffix unless a file extension is already present. Alternatively, one can supply either a character scalar, in which case the prefix i_ is appended (i being an integer in seq_len(length(x))), or a character vector of the same length as the flowSet x.
outdir
A character scalar giving the output directory. As the default, the output of identifier(x) is used.
...
Further arguments that are passed on to write.FCS.

Value

A character of the output directory.

Details

The function write.flowSet creates FCS 3.0 standard file for all flowFrames in an object of class flowSet. In addition, it will write the content of the phenoData slot in the ASCII file "annotation.txt". This file can subsequently be used to reconstruct the whole flowSet using the read.flowSet function, e.g.:

read.flowSet(path=outdir, phenoData="annotation.txt"

The function uses write.FCS for the actual writing of the FCS files.

See Also

link[flowCore]{write.FCS}

Examples

Run this code
## sample data
data(GvHD)
foo <- GvHD[1:5]
outDir <- file.path(tempdir(), "foo")

## now write out into  files
write.flowSet(foo, outDir)
dir(outDir)

## and read back in
bar <- read.flowSet(path=outDir, phenoData="annotation.txt")

Run the code above in your browser using DataLab