bsseq (version 1.8.2)

GoodnessOfFit: Binomial and poisson goodness of fit statistics for BSSeq objects

Description

Binomial and poisson goodness of fit statistics for BSSeq objects, including plotting capability.

Usage

poissonGoodnessOfFit(BSseq, nQuantiles = 10^5) binomialGoodnessOfFit(BSseq, method = c("MLE"), nQuantiles = 10^5) "print"(x, ...) "plot"(x, type = c("chisq", "pvalue"), plotCol = TRUE, qqline = TRUE, pch = 16, cex = 0.75, ...)

Arguments

BSseq
An object of class BSseq.
x
A chisqGoodnessOfFit object (as produced by poissonGoodnessOfFit or binomialGoodnessOfFit).
nQuantiles
The number of (evenly-spaced) quantiles stored in the return object.
method
How is the parameter estimated.
type
Are the chisq or the p-values being plotted.
plotCol
Should the extreme quantiles be colored.
qqline
Add a qqline.
pch, cex
Plotting symbols and size.
...
Additional arguments being passed to qqplot (for plot) or ignored (for print).

Value

The plotting method is invoked for its side effect. Both poissonGoodnessOfFit and binomialGoodnessOfFit returns an object of class chisqGoodnessOfFit which is a list with components
chisq
a vector of Chisq values.
quantiles
a vector of quantiles (of the chisq values).
df
degress of freedom

Details

These functions compute and plot goodness of fit statistics for BSseq objects. For each methylation loci, the Poisson goodness of fit statistic tests whether the coverage (at that loci) is independent and identically Poisson distributed across the samples. In a similar fashion, the Binomial goodness of fit statistic tests whether the number of reads supporting methylation are independent and identically binomial distributed across samples (with different size parameters given by the coverage vector).

These functions do not handle NA values.

See Also

For the plotting method, see qqplot.

Examples

Run this code
if(require(bsseqData)) {
  data(BS.cancer.ex)
  BS.cancer.ex <- updateObject(BS.cancer.ex)
  gof <- poissonGoodnessOfFit(BS.cancer.ex)
  plot(gof)
}

Run the code above in your browser using DataLab