evaluateDist: Model Diagnostics for RNAseq Data Set

Description Usage Arguments Value Author(s) Examples

Description

With this function, the user can determine goodness of fit for each gene.

Usage

1
2
evaluateDist(cnts, RNAseq, ncores=1, nsims=1,
frac.genes=1, min.meancount=1, min.libsize=1000)

Arguments

cnts

is a count matrix (row=gene, column=sample). Pprovide the measurements of one group only, e.g. the control group.

RNAseq

Character vector for "singlecell" or "bulk".

ncores,

number of cores for parallel computing, default is 1.

nsims

Number of simulations for MC p-value calculations, default is 1.

frac.genes

The fraction of genes to calculate goodness of fit statistics, default is 1, i.e. for all genes.

min.meancount

The minimum raw mean count per gene, default is 1.

min.libsize

The minimum raw read counts per sample, default is 1000.

Value

A list object with the results of goodness of fit and estimated parameters.

Author(s)

Beate Vieth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## Not run: 
## simulating read count matrix
ngenes <- 10000
ncells <- 100
## NB genes with dropouts:
ZNB.genes <- 2^rgamma(ngenes*0.45, 2, 2)
## NB genes with high expression:
NB.genes <- 2^runif(ngenes*0.45, 9, 12)
## Poisson genes:
P.genes <- 2^runif(ngenes*0.1, 3, 6)
## all means:
true.means <- c(ZNB.genes, NB.genes, P.genes)
sf.values <- rnorm(ncells, mean=1, sd=0.1)
sf.means <- outer(true.means, sf.values, '*')
true.dispersions <- 3 + 100/true.means[1:round(ngenes*0.9)]
## count matrix:
cnts.NB <- matrix(rnbinom(ngenes*0.9*ncells,
mu=sf.means[1:round(ngenes*0.9)],
size=1/true.dispersions),
ncol=ncells)
cnts.P <- matrix(rpois(ngenes*0.1*ncells,
lambda=sf.means[round(ngenes*0.9)+1:ngenes]),
ncol=ncells)
cnts <- rbind(cnts.NB, cnts.P)
## evaluate distribution fitting:
evaldistres <- evaluateDist(cnts=cnts, RNAseq='singlecell',
ncores=1, nsims=1, frac.genes=0.25,
min.meancount=0.1, min.libsize=1000)
## plot the evaluation results:
plotEvalDist(evalDist=evaldistres, annot=TRUE)

## End(Not run)

bvieth/powsim documentation built on May 13, 2019, 9:04 a.m.