read.flowSet: Read a set of FCS files

Description Usage Arguments Details Value Author(s) Examples

View source: R/IO.R

Description

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

Usage

1
2
3
4
5
6
7
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,
             truncate_max_range = TRUE, emptyValue=TRUE, 
             ignore.text.offset = FALSE, channel_alias = NULL, ...)

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.

truncate_max_range

see read.FCS for details.

emptyValue

see read.FCS for details.

ignore.text.offset

see read.FCS for details.

channel_alias

see read.FCS for details.

...

Further arguments that get passed on to read.AnnotatedDataFrame, see details.

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).

Value

An object of class flowSet.

Author(s)

F. Hahne, N.Le Meur, B. Ellis

Examples

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

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

flowCore documentation built on Nov. 8, 2020, 5:19 p.m.