Description Usage Arguments Value Author(s) Examples
Returns p-values for each region reflecting the probability of observing the mean test-statistic of the between group comparisons among the inter-replicate comparisons. The 'lite' version works with the outcome of M3D_Wrapper_lite and the 'lite' parallel version.
1 2 3 | pvals_lite(rrbs, CpGs, M3D_stat_lite, group1, group2, smaller = FALSE,
comparison = "allReps", method = "empirical", outlier_test = FALSE,
thresh = NA, cut_off = 0.975, sds = 8, closePara = 0.005)
|
rrbs |
An rrbs object containing methylation and coverage data as created using the BiSeq pacakge |
CpGs |
A GRanges object with each row being a testing region |
M3D_stat_lite |
A matrix containing the M3D test-statistic, as returned from the M3D_Wrapper_lite function. This has the mean of the MMDs for the comparisons between groups in the first column, and the within groups MMDs in the others, for each region in the CpGs object. |
group1 |
The name of the first group for the comparison. This is stored in colData(rrbs) |
group2 |
The name of the second group for the comparison. This is stored in colData(rrbs) |
smaller |
Determines whether the p-value is computed whether the test-statistic is greater or lesser than inter-replicate values. For our purposes, it should be set to FALSE. |
comparison |
Details which groups we are using to define our empirical testing distribution. The default is to use all of them, however, should the user find one group contains unusually high variability, then that group can be selected. Values are either 'allReps', 'Group1' or 'Group2'. |
method |
Determines which method is used to calculate p-values. 'empirical' uses the empirical distribution directly, without modelling. This is the default. 'model', fits an exponential distribution to the tail of our null distribution. |
outlier_test |
Logical, indicating whether to screen for outliers in null distribution. Use only when comparison is to one group. Default is FALSE |
thresh |
The threshold for cutting off regions as highly variable. This is only to be used if results are being standardised across multiple tests. Default is NA and is calculated using cut_off and sds parameters. |
cut_off |
In the outlier test, we require any outlier to be in this quartile, as a minimum, set to 0.975 by default |
sds |
In the outlier test, we require any outlier in the null to be greater than the mean of the null plus this many standard deviations, set to 8 by default |
closePara |
Sets a threshold for how close the exponential curve should fit the empirical distribution in the 'model' method. If the method produces errors, consider raising this parameter. |
Returns a list P, with 2 entries. 'FDRmean' is the Benjamini-Hochberg adjusted p-values. The unadjusted p-values are stored in 'Pmean'. If we are test for outliers, we also have the highly variable regions as a third entry
Tom Mayo t.mayo@ed.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 | data(rrbsDemo)
data(CpGsDemo)
library(GenomicRanges)
library(BiSeq)
CpGsDemo <- CpGsDemo[1:5]
overlaps <- GenomicRanges::findOverlaps(CpGsDemo,rrbsDemo)
M3D_list <- M3D_Wrapper_lite(rrbsDemo,overlaps)
group1 <- unique(colData(rrbsDemo)$group)[1]
group2 <-unique(colData(rrbsDemo)$group)[2]
PDemo <- pvals_lite(rrbsDemo, CpGsDemo, M3D_list,
group1, group2, smaller=FALSE,comparison='allReps')
head(PDemo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.