Learn R Programming

flowCore (version 1.38.2)

read.flowSet: Read a set of FCS files

Description

Read one or several FCS files: Data File Standard for Flow Cytometry

Usage

read.flowSet(files=NULL, path=".", pattern=NULL, phenoData, descriptions,name.keyword, alter.names=FALSE, transformation = "linearize", which.lines=NULL, column.pattern = NULL, invert.pattern = FALSE, decades=0, sep="\t", as.is=TRUE, name, ncdf=FALSE, dataset=NULL, min.limit=NULL, emptyValue=TRUE, ignore.text.offset = FALSE, ...)

Arguments

files
Optional character vector with filenames.
path
Directory where to look for the files.
pattern
This argument is passed on to dir, see details.
phenoData
An object of class AnnotatedDataFrame, character or a list of values to be extracted from the flowFrame object, see details.
descriptions
Character vector to annotate the object of class flowSet.
name.keyword
An optional character vector that specifies which FCS keyword to use as the sample names. If this is not set, the GUID of the FCS file is used for sampleNames, and if that is not present (or not unique), then the file names are used.
alter.names
see read.FCS for details.
transformation
see read.FCS for details.
which.lines
see read.FCS for details.
column.pattern
see read.FCS for details.
invert.pattern
see read.FCS for details.
decades
see read.FCS for details.
sep
Separator character that gets passed on to read.AnnotatedDataFrame.
as.is
Logical that gets passed on to read.AnnotatedDataFrame. This controls the automatic coercion of characters to factors in the phenoDataslot.
name
An optional character scalar used as name of the object.
ncdf
Deprecated. Please refer to 'ncdfFlow' package for cdf based storage.
dataset
see read.FCS for details.
min.limit
see read.FCS for details.
emptyValue
see read.FCS for details.
ignore.text.offset
see read.FCS for details.
...
Further arguments that get passed on to read.AnnotatedDataFrame, see details.

Value

flowSet.

Details

There are four different ways to specify the file from which data is to be imported: First, if the argument phenoData is present and is of class AnnotatedDataFrame, then the file names are obtained from its sample names (i.e. row names of the underlying data.frame). Also column name will be generated based on sample names if it is not there. This column is mainly used by visualization methods in flowViz. Alternatively, the argument phenoData can be of class character, in which case this function tries to read a AnnotatedDataFrame object from the file with that name by calling read.AnnotatedDataFrame(file.path(path,phenoData),...). In some cases the file names are not a reasonable selection criterion and the user might want to import files based on some keywords within the file. One or several keyword value pairs can be given as the phenoData argument in form of a named list.

Third, if the argument phenoData is not present and the argument files is not NULL, then files is expected to be a character vector with the file names. Fourth, if neither the argument phenoData is present nor files is not NULL, then the file names are obtained by calling dir(path, pattern).

Examples

Run this code

fcs.loc <- system.file("extdata",package="flowCore")
file.location <- paste(fcs.loc, dir(fcs.loc), sep="/")

samp <- read.flowSet(file.location[1:3])

Run the code above in your browser using DataLab