simData {mnem} | R Documentation

## Simulate data.

### Description

This function simulates single cell data from a random mixture of networks.

### Usage

    simData(
      Sgenes = 5,
      Egenes = 1,
      Nems = 2,
      reps = NULL,
      mw = NULL,
      evolution = FALSE,
      nCells = 1000,
      uninform = 0,
      unitheta = FALSE,
      edgeprob = c(0, 1),
      multi = FALSE,
      subsample = 1,
      scalefree = FALSE,
      badCells = 0,
      exactProb = TRUE,
      ...
    )

### Arguments

`Sgenes` | number of Sgenes
`Egenes` | number of Egenes
`Nems` | number of components
`reps` | number of replicates, if set (not realistic for cells)
`mw` | mixture weights (has to be vector of length Nems)
`evolution` | evolving and not purely random network, if set to TRUE
`nCells` | number of cells
`uninform` | number of uninformative Egenes
`unitheta` | uniform theta, if TRUE
`edgeprob` | edge probability, value between 0 and 1 for sparse or dense networks or a range c(l,u) with lower and upper bound
`multi` | a vector with the percentages of cell with multiple perturbations, e.g. c(0.2,0.1,0) for 20 no quadruple knock-downs
`subsample` | range to subsample data. 1 means the full simulated data is used
`scalefree` | if TRUE, graph is scale free
`badCells` | number of cells, which are just noise and not connected to the ground truth network
`exactProb` | logical; if TRUE generates random network with exact fraction of edges provided by edgeprob
`...` | additional parameters for the scale free network sampler (see 'nem' package)

### Value

simulation object with meta information and data

`Nem` | list of adjacency matrixes generatign the data
`theta` | E-gene attachaments
`data` | data matrix
`index` | index for which Nem generated which cell (data column)
`mw` | vector of input mixture weights

### Author(s)

Martin Pirkl

### Examples

    sim <- simData(Sgenes = 3, Egenes = 2, Nems = 2, mw = c(0.4,0.6))

[Package mnem version 1.10.0 Index]