pool_fs: Pool a flowSet of multiple flowFrames into a single pooled...

Description Usage Arguments Value Note Examples

View source: R/pool_fs.R

Description

'pool_fs()' lets you pool cells from multiple flowFrames contained in a 'flowSet' into a single 'flowFrame'. If 'copy_desc = TRUE' it also attempts to copy the keyword values that are common in all constituent flowFrames.

Usage

1
pool_fs(fs, copy_desc = TRUE)

Arguments

fs

Input flowSet.

copy_desc

(Optional): if 'TRUE' will attempt to copy common keywords to output 'flowFrame'.

Value

A pooled flowFrame.

Note

The input fs can either be a 'flowCore::flowSet' or 'ncdfFlow::ncdfFlowSet'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Mock up two flowFrames
set.seed(1234)
library(flowCore)
rstrings <- function(n = 10) {
  a <- do.call(paste0, replicate(5, sample(LETTERS, n, TRUE), FALSE))
  paste0(a, sprintf("%04d", sample(9999, n, TRUE)), sample(LETTERS, n, TRUE))
}
ff1_exprs <- matrix(rnorm(1:10000), nrow = 1000)
colnames(ff1_exprs) <- rstrings(dim(ff1_exprs)[[2]])
ff1 <- flowFrame(ff1_exprs)
ff2_exprs <- matrix(rnorm(1:10000), nrow = 1000)
colnames(ff2_exprs) <- colnames(ff1_exprs)
ff2 <- flowFrame(ff2_exprs)
fs <- flowSet(ff1, ff2)
dim(ff1)
#>     events parameters
#>       1000         10
dim(ff2)
#>     events parameters
#>       1000         10
fs <- flowSet(ff1, ff2)
pooled_ff <- pool_fs(fs)
dim(pooled_ff)
#>     events parameters
#>       2000         10

Biomiha/SCMisc documentation built on Feb. 17, 2020, 12:32 a.m.