mc_es_apply: Multicore apply-like function for cell_data_set

Description Usage Arguments Value

View source: R/utils.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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, ...))


cole-trapnell-lab/monocle3 documentation built on April 8, 2021, 5:54 a.m.