We will generate Y ~ Poisson(mu * rho) where mu ~ exp(log.mu/smudge), rho ~ Gamma(a,b)

make.sc.deg.data(
  file.header,
  nind = 40,
  ngenes = 1000,
  ncausal = 5,
  nreverse = 0,
  ncovar.conf = 3,
  ncovar.batch = 0,
  ncell.ind = 10,
  ngenes.covar = ngenes,
  num.mixtures = 1,
  pve.1 = 0.3,
  pve.c = 0.5,
  pve.a = 0.5,
  pve.r = 0,
  smudge = 1,
  rho.a = 2,
  rho.b = 2,
  rseed = 13,
  exposure.type = c("binary", "continuous")
)

Arguments

file.header

file set header

nind

num of individuals

ngenes

num of genes/features

ncausal

num of causal genes

nreverse

num of anti-causal genes

ncovar.conf

num of confounding covariates

ncovar.batch

num of confounding batch variables

ncell.ind

num of cells per individual

ngenes.covar

num of genes affected by covariates

num.mixtures

num of cell mixtures

pve.1

variance of treatment/disease effect

pve.c

variance of confounding effect

pve.a

variance of confounders to the assignment

pve.r

variance of reverse causation

smudge

a scaling factor for a GLM model (default: 1)

rho.a

rho ~ gamma(a, b)

rho.b

rho ~ gamma(a, b)

rseed

random seed

exposure.type

"binary" or "continuous"

Value

simulation results

Details

The simulation result list will have two lists:

data:

  • a matrix market data file data$mtx

  • a file with row names data$row

  • a file with column names data$col

  • an indexing file for the columns data$idx

  • a mapping file between column and individual names "indv"

indv:

  • obs.mu observed (noisy) gene x individual matrix

  • clean.mu clean gene x individual matrix

  • X confounder x individual matrix

  • W individual-level treatment assignment

  • rho sequencing depth

  • causal causal genes