removeSNPs {MethylSeekR} | R Documentation

## Remove CpGs overlapping SNPs

### Description

Removes CpGs that overlap with SNPs from methylation GRanges object.

### Usage

    removeSNPs(m, snps)

### Arguments

`m` | GRanges object containing the methylation data.
`snps` | GRanges object containing the SNPs.

### Value

The methylation GRanges object (m) with all CpGs overlapping SNPs removed.

### Author(s)

Lukas Burger lukas.burger@fmi.ch

### Examples

    library(MethylSeekR)

    # get chromosome lengths
    library("BSgenome.Hsapiens.UCSC.hg18")
    sLengths=seqlengths(Hsapiens)

    # read methylation data
    methFname <- system.file("extdata", "Lister2009_imr90_hg18_chr22.tab",
    package="MethylSeekR")
    meth.gr <- readMethylome(FileName=methFname, seqLengths=sLengths)

    #read SNP data
    snpFname <- system.file("extdata", "SNVs_hg18_chr22.tab",
    package="MethylSeekR")
    snps.gr <- readSNPTable(FileName=snpFname, seqLengths=sLengths)

    # remove SNPs
    meth.gr <- removeSNPs(meth.gr, snps.gr)

[Package MethylSeekR version 1.30.0 Index]