Description Usage Arguments Value Examples
View source: R/hypothesisTesting.R
Calculate the significance of a factor in the regression model
1 | testCoefficient(obj, factor, contrast)
|
obj |
the MpraObject |
factor |
the name of the factor to make the comparison on |
contrast |
the character value of the factor to use as a contrast. See details. |
a data.frame of the results this include the test statistic, logFC, p-value and BH-corrected FDR.
1 2 3 4 5 6 7 8 9 10 11 | 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")
## fit.se must be TRUE for coefficient based testing to work
obj <- analyzeComparative(obj, dnaDesign = ~ batch + barcode + condition,
rnaDesign = ~ condition, fit.se = TRUE)
results <- testCoefficient(obj, "condition", "contrast")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.