Simulate expected library sizes from a log-normal distribution

Twocelltype.Generator(
  n.sc = 10,
  n.bulk = 100,
  G = 100,
  mu,
  sub.var,
  sort.bulk = FALSE,
  sigma = NULL,
  ...
)

Arguments

n.bulk

integer, number of bulk subjects.

G

integer, number of genes.

mu

matrix, 2 by G, the mean expression of genes in each cell types.

sub.var

matrix, 2 by G, scale of log-normal distribution for each subjects at genes. Part of them are zeros.

sort.bulk

logical, default is FALSE. Sort the cell type proportion.

N

integer, number of subjects in total.

Value

a list with elements

  • p.bulk: cell type proportions of generated bulk data;

  • p.sc: cell type proportions of generated single cell data;

  • bulk.mtx: Expression Matrix of bulk data;

  • sc.sce: SingleCellExperiment of single cell data;

Details

Generate simulation datasets. n.sc or n.bulk is zero, then we only generate one dataset and cell type proportions.