read.FCSset: Load multiple FCS files

View source: R/read.FCSset.R

read.FCSsetR Documentation

Load multiple FCS files

Description

It reads multiple FCS files (in a computationaly-distributed way) contained in a specific folder or given through a vector. Important note: all files should have an identicar header (i.e., same name and markers order), if not only those common will be read (you can use FlowCT::unify.FCSheaders() for doing that).

Usage

read.FCSset(
  filelist = NULL,
  directory = getwd(),
  pattern = ".fcs$",
  events = "all",
  dataset = 1,
  num.threads = NULL
)

Arguments

filelist

A vector with full path of FCS files to be read, commonly generated through base::list.files(). If NULL, this file list will be generated as indicated below.

directory

If filelist = NULL, those files stored in this location will be read. Default = getwd() (current directory).

pattern

Pattern for reading files within directory. Default = "fcs".

events

Numeric vector indicating how many events to read in each FCS file (same behaviour as flowCcre::read.FCS()). Default = NULL, i.e., all events will be read.

dataset

Specify data segment to be read in the FCS file (same behaviour as flowCcre::read.FCS()). Default = 1.

num.threads

Number of threads for reading the FCS files. For Windows users, you should to install parallelsugar package from (Nathanvan's GitHub). Defult = NULL (i.e., not parallelization).

Examples

## Not run: 
# option 1: trough a vector with filenames (full path)
filelist <- list.files(pattern = "fcs", path = "../data/", full.names = T)
fcs1 <- read.FCSset(filelist = filelist, which.lines = 1000)

# option 2: specifiying a directory
fcs2 <- read.FCSset(directory = "../data", pattern = ".LMD", num.threads = 4)

## End(Not run)

jgarces02/FlowCT documentation built on March 28, 2023, 12:42 p.m.