Usage
pvals(rrbs, CpGs, MMD, group1, group2, smaller = FALSE, comparison = "allReps", method = "empirical", closePara = 0.005)
Arguments
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
MMD
A matrix containing the M3D test-statistic, the difference the
full and methylation blind metrics,
for each region in the CpGs object. Each column is a comparison between two
samples, which are described in the column names.
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.
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.