sce2fcs {CATALYST} | R Documentation |
flowFrame/Set
If split_by = NULL
, the input SCE is converted to a
flowFrame
. Otherwise,
it is split into a flowSet
by the specified colData
column.
Any cell metadata (colData
) and dimension reductions
available in the SCE may be dropped or propagated to the output.
sce2fcs(x, split_by = NULL, keep_cd = FALSE, keep_dr = FALSE, assay = "counts")
x |
|
split_by |
NULL or a character string
specifying a |
keep_cd, keep_dr |
logials specifying whether cell metadata
(stored in |
assay |
a character string specifying
which assay data to use; valid values are |
a flowFrame
if split_by = NULL
; otherwise a
flowSet
.
Helena L Crowell helena.crowell@uzh.ch
# PREPROCESSING data(sample_ff, sample_key) sce <- prepData(sample_ff, by_time = FALSE) sce <- assignPrelim(sce, sample_key, verbose = FALSE) # split SCE by barcode population fs <- sce2fcs(sce, split_by = "bc_id") # do some spot checks library(flowCore) library(SingleCellExperiment) length(fs) == nrow(sample_key) all(fsApply(fs, nrow)[, 1] == table(sce$bc_id)) identical(t(exprs(fs[[1]])), assay(sce, "exprs")[, sce$bc_id == "A1"]) # DIFFERENTIAL ANALYSIS data(PBMC_fs, PBMC_panel, PBMC_md) sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md) sce <- cluster(sce, verbose = FALSE) # split by 20 metacluster populations sce$meta20 <- cluster_ids(sce, "meta20") fs <- sce2fcs(sce, split_by = "meta20", assay = "exprs") all(fsApply(fs, nrow)[, 1] == table(sce$meta20))