Description Usage Arguments Value Examples
View source: R/hypothesisTesting.R
test for significant activity (quantitative analysis) using various empirical tests (see details)
1 2 3 4 5 6 7 |
obj |
the MpraObject, after running an analysis function |
statistic |
if null [default], the intercept term is used as the score. An alternate score can be provided by setting 'statistic'. Must be a numeric vector. |
useControls |
is TRUE and controls are available, use the controls to establish the background model and compare against. This allows for more accurate zscores as well as empircal p-values. |
twoSided |
should the p-value be from a two-sided test (default: FALSE, right-side test) |
subset |
only test a subset of the enhancers in the object (logical, indices or names). Default is NULL, then all the enhancers are included. |
a data.frame of empirical summary statistics based on the model's estimate of slope, or the given statistic. These are:
statistic: the statistic (either the provided, or extracted from the models)
zscore: Z-score of the statistic (number of standard devisations from the mean). If controls are available, the score is based on their distribution: so it's the number of control-sd from the control-mean
mad.score: a median-baed equivalent of the Z-score, with less sensitivity to outlier values. If controls are provided, it's based on their distribution.
pval.zscore: a p-value based on the normal approximation of the Z-scores
pval.empirical: only available if negative controls are provided. empirical P-value, using the control distribution as the null
1 2 3 4 5 6 7 8 9 10 11 12 | data <- simulateMPRA(tr = rep(2,10), da=NULL, 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")
obj <- analyzeQuantification(obj, dnaDesign = ~ batch + barcode,
rnaDesign = ~1)
results <- testEmpirical(obj)
## or test with a different statistic:
aggregated.ratio <- rowSums(data$obs.rna) / rowSums(data$obs.dna)
results <- testEmpirical(obj, aggregated.ratio)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.