testEmpirical: test for significant activity (quantitative analysis) using...

Description Usage Arguments Value Examples

View source: R/hypothesisTesting.R

Description

test for significant activity (quantitative analysis) using various empirical tests (see details)

Usage

1
2
testEmpirical(obj, statistic = NULL, useControls = TRUE,
  subset = NULL)

Arguments

obj

the MpraObject, after running an analysis function

statistic

if null [default], the intercept term is used as the score. An alternate score can be provided by setting 'statistic'. Must be a numeric vector.

useControls

is TRUE and controls are available, use the controls to establish the background model and compare against. This allows for more accurate zscores as well as empircal p-values.

subset

only test a subset of the enhancers in the object (logical, indices or names). Default is NULL, then all the enhancers are included.

Value

a data.frame of empirical summary statistics based on the model's estimate of slope, or the given statistic. These are:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data <- simulateMPRA(tr = rep(2,10), da=NULL, nbatch=2, nbc=15)
obj <- MpraObject(dnaCounts = data$obs.dna, 
                  rnaCounts = data$obs.rna, 
                  colAnnot = data$annot)
obj <- estimateDepthFactors(obj, lib.factor = "batch", which.lib = "both")
obj <- analyzeQuantification(obj, dnaDesign = ~ batch + barcode, 
                              rnaDesign = ~1)
results <- testEmpirical(obj)

## or test with a different statistic:
aggregated.ratio <- rowSums(data$obs.rna) / rowSums(data$obs.dna)
results <- testEmpirical(obj, aggregated.ratio)

MPRAnalyze documentation built on Nov. 8, 2020, 8:22 p.m.