simData: Simulate data.

Description Usage Arguments Value Author(s) Examples

View source: R/mnems.r

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
simData(
  Sgenes = 5,
  Egenes = 1,
  Nems = 2,
  reps = NULL,
  mw = NULL,
  evolution = FALSE,
  nCells = 1000,
  uninform = 0,
  unitheta = FALSE,
  edgeprob = 0.25,
  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

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

...

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

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

mnem documentation built on Nov. 18, 2020, 2 a.m.