Learn R Programming

immunedeconv (version 0.1.1)

make_random_bulk: Make a random bulk sample from a single-cell dataset

Description

Take random single cells from the input expression set, given the cell_fractions vector and combine them by taking the mean.

Usage

make_random_bulk(eset, cell_fractions, n_cells = 500, combine = mean)

Arguments

eset

Biobase::ExpressionSet with a cell_type column in pData. Each sample is the gene expression of a single cell. The cell type of each cell needs to be denoted in the pData table in the cell_type column.

cell_fractions

named list indicating the fraction of each cell type which will be in the sample. The names of the list need to correspond to the cell_type column in the ExpressionSet.

n_cells

number of single cells to integrate into a sample

combine

callback function used to aggregate the counts.