merge_sce: Merge a list of 'SingleCellExperiment' objects

View source: R/merge_sce.R

merge_sceR Documentation

Merge a list of SingleCellExperiment objects

Description

Combine several SingleCellExperiment objects from different batches/experiments. Extracted from the scMerge package.

Usage

merge_sce(
  sce_list,
  method = "union",
  cut_off_batch = 0.01,
  cut_off_overall = 0.01,
  use_assays = NULL,
  colData_names = intersect,
  batch_names = names(sce_list),
  verbose = TRUE
)

Arguments

sce_list

A list contains the SingleCellExperiment Object from each batch.

method

A string indicates the method of combining the gene expression matrix, either union or intersect. Default to intersect. union only supports matrix class.

cut_off_batch

A numeric vector indicating the cut-off for the proportion of a gene is expressed within each batch.

cut_off_overall

A numeric vector indicating the cut-off for the proportion of a gene is expressed overall data.

use_assays

A string vector indicating the expression matrices to be combined. The first assay named will be used to determine the proportion of zeros.

colData_names

A string vector indicating the colData that are combined.

batch_names

A string vector indicating the batch names for the output SCE object.

verbose

Print messages.

Value

A SingleCellExperiment object with the list of SCE objects combined.

Examples

obj <- example_obj("sce")
batch_names <- unique(obj$groups)
sce_list <- list(obj[,obj$groups=='g1'],
                 obj[,obj$groups=='g2'])
obj2 <- merge_sce(sce_list, batch_names = batch_names)

bschilder/scKirby documentation built on Oct. 2, 2024, 10:16 p.m.