Twocelltype.Generator: Simulate Single cell read counts

View source: R/simulation.R

Twocelltype.GeneratorR Documentation

Simulate Single cell read counts

Description

Simulate expected library sizes from a log-normal distribution

Usage

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.

Details

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

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;


xuranw/MuSiC documentation built on March 7, 2024, 11:45 a.m.