analyzeComparative: Run a comparative analysis between conditions

Description Usage Arguments Value Examples

View source: R/analysisFunctions.R

Description

Run a comparative analysis between conditions

Usage

1
2
analyzeComparative(obj, dnaDesign, rnaDesign, fit.se = FALSE,
  reducedDesign = NULL, correctControls = TRUE, verbose = TRUE)

Arguments

obj

the MpraObject

dnaDesign

the design for the DNA model. Only terms that are matched with the RNA design should be included.

rnaDesign

the design for the RNA model.

fit.se

logical, if TRUE the standard errors of the coefficients are extracted from the model. These are necessary for computing coefficient- based testing, but make the model fitting slower. Deafult: FALSE

reducedDesign

the design for the reduced RNA model, for a likelihood- ratio testing scheme. The Reduced design must be nested within the full design (i.e all terms in the reduced must be included in the full).

correctControls

if TRUE (default), use the negative controls to establish the null hypothesis, correcting for systemic bias in the data

verbose

print progress reports (default: TRUE)

Value

the MpraObject with fitted models for the input enhancers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data <- simulateMPRA(tr = rep(2,5), da=c(rep(2,2), rep(2.5,3)), 
                     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")
## run an LRT-based analysis, as recommnded:
obj <- analyzeComparative(obj, dnaDesign = ~ batch + barcode + condition, 
                              rnaDesign = ~ condition, reducedDesign = ~ 1)
                              
## alternatively, run a coefficient-based analysis:
obj <- analyzeComparative(obj, dnaDesign = ~ batch + barcode + condition, 
                              rnaDesign = ~ condition, fit.se = TRUE)

Example output

Fitting model...
Fitting reduced model...
Analysis Done!
Fitting model...
error fitting enh_4: Error: memory exhausted (limit reached?)

error fitting enh_5: Error: memory exhausted (limit reached?)

Analysis Done!
Warning message:
system call failed: Cannot allocate memory 

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