design_joint: use scDesign to make experimental design assuming two cell...

Description Usage Arguments Value Author(s)

View source: R/design_data.R

Description

use scDesign to make experimental design assuming two cell states are sequenced together

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
design_joint(
  realcount1,
  realcount2,
  prop1,
  prop2,
  S = 1e+08,
  ncell = round(2^seq(6, 13, 1)),
  B = 100,
  de_method = "ttest",
  p_thre = 10^seq(-2, -6, -1),
  plot_dir = "./",
  ncores = 1,
  rank = 1000
)

Arguments

realcount1

A numeric matrix with rows representing genes and columns representing cells (cell state 1). Gene names are given as row names.

realcount2

A numeric matrix with rows representing genes and columns representing cells (cell state 2). Gene names are given as row names.

prop1

A number giving the proportion of state 1 cells in the cell population.

prop2

A number giving the proportion of state 2 cells in the cell population.

S

A number specifying the total number of RNA-seq reads for the cell population. Default to 1e8.

ncell

An integer vector specifying the total number of cells to sequence. Defaults to 2^seq(6,13,1).

B

An integer giving the number of experiments to repeat in order the calculate the average DE analysis accuracy. Defaults to 100.

de_method

A character specifying the differential expression analysis method to use. Currently supports "ttest" (default) or "mast".

p_thre

A numeric vector specifying the FDR thresholds used to identify differentially expressed genes. Defaults to 10^seq(-2,-6,-1).

plot_dir

A character giving the directory to save experimental design results Defaults to "./".

ncores

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

rank

An integer specifying the number of top DE genes to identify from scImpute's results as the standard in DE analysis. Defaults to 1000.

Value

A list of five elments:

precision:

a matrix of precision.

recall:

a matrix of recall (true positive rate).

TN:

a matrix of TN (true negative rate).

F1:

a matrix of F1 (precision vs. recall).

F2:

a matrix of F2 (TN vs. recall).

In all the matrices, rows correspond to different FDR thresholds and columns correspond to the cell numbers specified in ncell. design_joint also writes the list to design_summary.txt and saves it to plot_dir. The corresponding plots are also saved to plot_dir.

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.