sim_data: Data Simulator

Description Usage Arguments Value Examples

Description

Simulates two condition data for a range of conditions depending on the parameters used.

Usage

1
2
sim_data(genes, cells, sig.genes, sig.genes.s, clus.t1, clus.t2,
  same.sig = FALSE, u.l = 1, u.h = 2)

Arguments

genes

The number of genes to be simulated.

cells

The number of cells to be simulated per condition.

sig.genes

The number of marker genes for each cluster.

sig.genes.s

The number of marker genes shared across conditions for each cluster. Should be less than or equal to sig.genes

clus.t1

A vector of clusters present in the first condition. Start at 1, e.g. c(1,2,3,4)

clus.t2

A vector of clusters present in the second condition. Does not have to match clus.t1, e.g c(3,4,5)

same.sig

TRUE or FALSE. Should each cluster have a unique set of marker genes. default is FALSE.

u.l

Lower bound for the cluster gene means, default is 1.

u.h

Upper bound for the cluster gene means, default is 2.

Value

A list containing the two simulated data matrices, dat.1 and dat.2, true clusters for the cells in the first and second conditions, clusters1 and clusters2, a matrix indicating marker genes for the first and second condition, sig.gene.mat.1 and sig.gene.mat.2, the base mean values for each gene gene.means and the cluster specific additions for each gene clus.gene.means

Examples

1
2
3
4
5
6
7
8
9
set.seed(10)
genes <- 1000  # Simulate 1,000 genes
cells <- 100  # Simulate 100 cells per condition
clus.t1 <- c(1,2,3)  # Generate 3 clusters present in condition A
clus.t2 <- c(1,2,3)  # Generate 3 clusters present in condition B
sig.genes <- 30  # Generate 30 marker genes per cluster
sig.genes.s <- 15  # Let half of the 30 marker genes be shared.
temp_sim_dat <- sim_data(genes, cells, sig.genes, sig.genes.s,
clus.t1, clus.t2)

SparseDC documentation built on May 2, 2019, 9:29 a.m.