removeSNPs: Remove CpGs overlapping SNPs

Description Usage Arguments Value Author(s) Examples

View source: R/removeSNPs.R

Description

Removes CpGs that overlap with SNPs from methylation GRanges object.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

LukasBurger/MethylSeekR documentation built on June 23, 2021, 8:46 a.m.