isFCSfile(files)
read.FCS(filename, transformation="linearize", which.lines=NULL, alter.names=FALSE, column.pattern=NULL, invert.pattern = FALSE, decades=0, ncdf = FALSE, min.limit=NULL, truncate_max_range = TRUE, dataset=NULL, emptyValue=TRUE, ...)
linearize
(default),
linearize-with-PnG-scaling
, or scale
.
The linearize
transformation applies the
appropriate power transform to the data. The
linearize-with-PnG-scaling
transformation applies the
appropriate power transform for parameters stored on log scale, and
also a linear scaling transformation based on the 'gain' (FCS \$PnG keywords)
for parameters stored on a linear scale. The scale
transformation scales all columns to $[0,10^decades]$. defaulting
to decades=0 as in the FCS4 specification.
A logical can also be used: TRUE
is equal to linearize
and FALSE
(or NULL
)
corresponds to no transformation.
Also when the transformation keyword of the FCS header is set to "custom" or "applied", no transformation will be used.
which.lines
is read
in.make.names
. The
default is FALSE.FALSE
. If TRUE
,
inverts the regular expression specified in column.pattern
. This is
useful for indicating the channel names that we do not want to read. If
column.pattern
is set to NULL
, this argument is ignored.-111
copies the behavior of flowJo. It can be set to an arbitrary number
or to NULL
, in which case the original values are kept. read.FCS
is a
single flowFrame
we can't automatically read in all available
sets. This parameter allows to chose one of the subsets for
import. Its value is supposed to be an integer in the range of
available data sets. This argument is ignored if there is only a
single data segment in the FCS file.isFCSfile
returns a logical vector.read.FCS
returns an object of class
flowFrame
that contains the
data in the exprs
slot, the parameters monitored in the
parameters
slot and the keywords and value saved in the header
of the FCS file.isFCSfile
determines whether its arguments are
valid FCS files. The function read.FCS
works with the output of the FACS machine
software from a number of vendors (FCS 2.0, FCS 3.0 and List Mode Data
LMD). However, the FCS 3.0 standard includes some options that are not
yet implemented in this function. If you need extensions, please let
me know. The output of the function is an object of class
flowFrame
.
For specifications of FCS 3.0 see http://www.isac-net.org and
the file ../doc/fcs3.html in the doc
directory of the
package.
The which.lines
arguments allow you to read a subset of the record as you might not want to read the thousands of
events recorded in the FCS file. It is mainly used when there is not enough memory to read one single FCS (which probably will not happen).
It will probably take more time than reading the entire FCS (due to the multiple disk IO).
read.flowSet
## a sample file
fcsFile <- system.file("extdata", "0877408774.B08", package="flowCore")
## read file and linearize values
samp <- read.FCS(fcsFile, transformation="linearize")
exprs(samp[1:3,])
description(samp)[3:6]
class(samp)
## Only read in lines 2 to 5
subset <- read.FCS(fcsFile, which.lines=2:5, transformation="linearize")
exprs(subset)
## Read in a random sample of 100 lines
subset <- read.FCS(fcsFile, which.lines=100, transformation="linearize")
nrow(subset)
Run the code above in your browser using DataLab