globalTest {BiSeq} | R Documentation

## Test whether at least one CpG is differentially methylated in a given genomic region

### Description

This method is a wrapper for conveniently invoking the globaltest method `gt` on a `BSrel-class` object. The globaltest can be applied to test against a high dimensional alternative in various regression models. E.g., it can be used to test whether at least one CpG is differentially methylated between two groups.

### Usage

    globalTest(response, alternative, ...)

### Arguments

`response` | The response vector of the regression model. May be supplied as a vector or as a `formula` object. In the latter case, the right hand side of `response` defines the null hypothesis. The default null hypopthesis is `~1`, i.e. only an intercept.
`alternative` | An object of `BSrel-class` defining the alternative. The CpGs are used as explanatory variable in the alternative regression model. The null hypothesis is that the coefficients of all CpGs are zero. If `response` is given as `formula`, `colData(alternative)` is used to obtain the respective data.
`...` | Other arguments passed to the `gt` method. The argument `subsets` can be given as `GRanges-class` object. Then, the globaltest is applied for each region using only the CpGs lying within the respective region. This is useful for, e.g., testing all promoter regions within function call.

### Details

For details see the documentation of the `gt` method in package globaltest.

### Value

The function returns an object of class `gt.object`. Several operations and diagnostic plots for this class are provided by the globaltest package.

### Author(s)

Hans-Ulrich Klein

### References

Goeman, J. J., van de Geer, S. A., and van Houwelingen, J. C. (2006). Testing against a high-dimensional alternative. Journal of the Royal Statistical Society Series B- Statistical Methodology, 68(3):477-493.

### See Also

`link{gt}`, `link{BSrel}`

### Examples

    data(rrbs)
    rrbs <- rawToRel(rrbs)
    regions <- GRanges(IRanges(start=c(850000, 1920000, 500), end=c(879000, 1980000, 600)),
                       seqnames=c("chr1", "chr2", "chr3"))

    globalTest(group~1, rrbs)
    globalTest(group~1, rrbs, subsets=regions)

[Package BiSeq version 1.26.0 Index]