analyzeComparative {MPRAnalyze} | R Documentation |
Run a comparative analysis between conditions
analyzeComparative( obj, rnaDesign, dnaDesign = NULL, fit.se = FALSE, reducedDesign = NULL, correctControls = TRUE, verbose = TRUE, mode = "classic", BPPARAM = NULL )
obj |
the MpraObject |
rnaDesign |
the design for the RNA model. |
dnaDesign |
the design for the DNA model. Only terms that are matched with the RNA design should be included. |
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) |
mode |
whether to run in classic mode ("classic") or in scalable mode ("scale"). Scale mode is only available in situations when each RNA observation has a single corresponding DNA observation. |
BPPARAM |
a parallelization object created by BiocParallel. This overwrites the BPPARAM object set in the object creation. |
the MpraObject with fitted models for the input enhancers
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)