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
3
analyzeComparative(obj, dnaDesign, rnaDesign, fit.se = FALSE,
  reducedDesign = NULL, correctControls = TRUE, verbose = TRUE,
  BPPARAM = NULL)

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)

BPPARAM

a parallelization object created by BiocParallel. This overwrites the BPPARAM object set in the object creation.

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(0,2), rep(1,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)

YosefLab/MPRAnalyze documentation built on Nov. 7, 2019, 10:32 a.m.