sample_cells_apply: Sample cells and apply function

Description Usage Arguments Value

View source: R/cell_sampler.R

Description

Sample a certain number of cells from a DGE data.frame and apply a specific function to the subset.

Usage

1
sample_cells_apply(dge, sizes, groups, fun, funArgs, replace = TRUE)

Arguments

dge

A data.frame containing DGE data, with rows being genes and columns cells. The first column is assumed to provide the gene identifiers.

sizes

Number of cells that should be sampled from each group.

groups

A factor of length ncol(dge) - 1 providing group assignments for each cell in dge.

fun

Function to apply to sampled cells.

funArgs

A list with additional arguments for the applied function fun.

replace

Should samples be drawn with replacement?

Value

Output of function fun applied to sampled cells.


argschwind/dropseqr documentation built on May 23, 2019, 4:24 p.m.