load_cytoset_from_fcs: Read one or several FCS files in to a cytoset

View source: R/load_fcs.R

load_cytoset_from_fcsR Documentation

Read one or several FCS files in to a cytoset

Description

Similar to read.flowSet, this takes a list of FCS filenames and returns a cytoset.

Usage

load_cytoset_from_fcs(
  files = NULL,
  path = ".",
  pattern = NULL,
  phenoData = NULL,
  descriptions,
  name.keyword,
  transformation = "linearize",
  which.lines = NULL,
  decades = 0,
  is_h5 = NULL,
  h5_dir = NULL,
  backend = get_default_backend(),
  backend_dir = tempdir(),
  min.limit = NULL,
  truncate_max_range = TRUE,
  dataset = NULL,
  emptyValue = TRUE,
  num_threads = 1,
  ignore.text.offset = FALSE,
  sep = "\t",
  as.is = TRUE,
  name,
  file_col_name = 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 cytoframe object, see details.

descriptions

Character vector to annotate the object of class cytoset.

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.

transformation

see load_cytoframe_from_fcs for details.

which.lines

see load_cytoframe_from_fcs for details.

decades

see load_cytoframe_from_fcs for details.

is_h5

logical indicating whether the data should be stored in h5 format

h5_dir

String specifying a name for the h5 directory for the h5 files if is_h5 is TRUE

min.limit

see load_cytoframe_from_fcs for details.

truncate_max_range

see load_cytoframe_from_fcs for details.

dataset

see load_cytoframe_from_fcs for details.

emptyValue

see load_cytoframe_from_fcs for details.

num_threads

Integer allowing for parallelization of the parsing operation by specifiying a number of threads

ignore.text.offset

see load_cytoframe_from_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 phenoData.

name

An optional character scalar used as name of the object.

file_col_name

optionally specify the column name that stores the fcs filename when phenoData is supplied read.AnnotatedDataFrame, see details.

...

Further arguments that get passed on to

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

See Also

Other cytoframe/cytoset IO functions: cf_get_uri(), cf_write_disk(), cf_write_h5(), cs_get_uri(), load_cytoframe_from_fcs(), load_cytoframe()


RGLab/flowWorkspace documentation built on March 17, 2024, 2:24 p.m.