Learn R Programming

monocle3 (version 1.0.0)

mc_es_apply: Multicore apply-like function for cell_data_set

Description

mc_es_apply computes the row-wise or column-wise results of FUN, just like esApply. Variables in colData from cds are available in FUN.

Usage

mc_es_apply(
  cds,
  MARGIN,
  FUN,
  required_packages,
  cores = 1,
  convert_to_dense = TRUE,
  reduction_method = "UMAP",
  ...
)

Arguments

cds

A cell_data_set object.

MARGIN

The margin to apply to, either 1 for rows (samples) or 2 for columns (features).

FUN

Any function.

required_packages

A list of packages FUN will need. Failing to provide packages needed by FUN will generate errors in worker threads.

cores

The number of cores to use for evaluation.

convert_to_dense

Whether to force conversion of a sparse matrix to a dense one before calling FUN.

reduction_method

character, the method used to reduce dimension. Default "UMAP".

...

Additional parameters for FUN.

Value

The result of with(colData(cds) apply(counts(cds)), MARGIN, FUN, ...))