maskOut {Repitools} | R Documentation

## Function to mask suspicious regions.

### Description

Function to mask out regions that are prone to causing problems in the empirical Bayes approach `empBayes`. The corresponding bins are marked and in the empirical Bayes approach not taken into account. Notice that methylation estimates using `methylEst` will nevertheless be produced for these bins.

### Usage

    maskOut(x, ranges)

### Arguments

`x` | Object of class `BayMethList`.
`ranges` | A GRanges object definining the coordinates of regions to be masked out.

### Value

A `BayMethList` object where the slot `maskout` is filled with a boolean vector indicating which bins will be excluded in `empBayes`.

### Author(s)

Andrea Riebler

### Examples

        if(require(BSgenome.Hsapiens.UCSC.hg18)){
            windows <- genomeBlocks(Hsapiens, chrs="chr21", width=100, spacing=100)
            cpgdens <- cpgDensityCalc(windows, organism=Hsapiens,
                w.function="linear", window=700)
            co <- matrix(rnbinom(length(windows), mu=10, size=2), ncol=1)
            sI <- matrix(rnbinom(2*length(windows), mu=5, size=2), ncol=2)
            bm <- BayMethList(windows=windows, control=co,
                sampleInterest=sI, cpgDens=cpgdens)

            # mask out unannotated high copy number regions
            # see Pickrell et al. (2011), Bioinformatics 27: 2144-2146.
            data(hcRegions)

            bm <- maskOut(bm, hcRegions)
       }

[Package Repitools version 1.28.0 Index]