Description Usage Arguments Value Examples
View source: R/analysisFunctions.R
Run a comparative analysis between conditions
1 2 | analyzeComparative(obj, dnaDesign, rnaDesign, fit.se = FALSE,
reducedDesign = NULL, correctControls = TRUE, verbose = TRUE)
|
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) |
the MpraObject with fitted models for the input enhancers
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.