design_data: use scDesign to simulate scRNA-seq data

Description Usage Arguments Value Author(s)

View source: R/design_data.R

Description

use scDesign to simulate scRNA-seq data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
design_data(
  realcount,
  S = 1e+08,
  ncell,
  ngroup = 1,
  pUp = 0.05,
  pDown = 0.05,
  fU = 5,
  fL = 1.5,
  ncores = 1,
  exprmean = NULL
)

Arguments

realcount

A numeric matrix with rows representing genes and columns representing cells. Gene names are given as row names.

S

A number specifying the total number of RNA-seq reads. Default to 1e8. When ngroup > 1, S should be a vector specifying the read number in each cell state.

ncell

An integer specifying the number of cells. When ngroup > 1, ncell is vector specifying the number of cells in each cell state.

ngroup

An integer giving the number of cell states to simulate. Defaults to 1.

pUp

A value between 0 and 1 specifying the proportion of up regulated genes between two adjacent cell states. Defaults to 0.05 and only used when ngroup > 1.

pDown

A value between 0 and 1 specifying the proportion of down regulated genes between two adjacent cell states. Defaults to 0.05 and only used when ngroup > 1.

fU

A value specifying the upper bound of fold changes of differentially expressed genes. Deaults to 5.

fL

A value specifying the lower bound of fold changes of differentially expressed genes. Deaults to 1.5.

ncores

An integer specifying the number of cores used for parallel computation. Defaults to 1.

exprmean

A named vector of user-specified gene mean expression parameters. The names of exprmean should match the rownames of realcount in the same order. Supplied gene expression mean should be on the $log_10$ scale.

Value

When ngroup = 1, design_data returns a simulated count matrix with rows representing genes and columns representing cells. When ngroup > 1, design_data returns a list of ngroup elements. The g-th element corresponds to the g-th cell state, and is a list containing three elements:

count:

a count matrix with rows representing genes and columns representing cells;

genesUp:

a character vector giving the names of up-regulated genes from state g-1 to g;

genesDown:

a character vector giving the names of down-regulated genes from state g-1 to g.

Author(s)

Wei Vivian Li, liw@ucla.edu

Jingyi Jessica Li, jli@stat.ucla.edu


Vivianstats/scDesign documentation built on Dec. 17, 2020, 8:04 a.m.