design_sep: 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 independently

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
design_sep(
  realcount1,
  realcount2,
  S1 = 1e+08,
  S2 = 1e+08,
  ncell = NULL,
  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.

S1

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

S2

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

ncell

A two-column matrix specifying the numbers of cells. Column 1 is for cell state 1 and column 2 is for cell state 2. By default, the following cell number matrix is used:

64 64
128 128
256 256
512 512
1024 1024
2048 2048
4096 4096
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_sep 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.