methdata_to_granges: methdata_to_granges

Description Usage Arguments Value Author(s) Examples

View source: R/methdata_to_granges.R

Description

Produces a dotplot of a specific (region of) CpG(s) given a matrix of beta-values superposed onto the RefSeq genomic location.

Usage

1
2
3
4
5
6
7
8
methdata_to_granges(
  methdata,
  annotation.gr,
  chr,
  start_region,
  end_region,
  flanks
)

Arguments

methdata

Methylation data (betas or M-values)

annotation.gr

Annotation data in GenomicRanges format

chr

The chromosome as character (ex. "chr6")

start_region

The start of the region as numeric

end_region

The end of the region as numeric

flanks

The size of the around the region of interest. Defaults to 0

Value

A region of the annotation.gr and betas given the coordinates in GenomicRanges format

Author(s)

Andrew Y.F. Li Yim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Load data
require(minfiData)
baseDir <- system.file("extdata", package = "minfiData")
targets <- read.metharray.sheet(base = baseDir)
RGset <- read.metharray.exp(targets = targets, recursive = T)
Mset <- preprocessIllumina(rgSet = RGset, bg.correct = T, normalize = "controls", reference = 2)
Rset <- ratioConvert(Mset)
GMset <- mapToGenome(Rset)

Beta <- getBeta(GMset)
annotation.gr <- makeGRangesFromDataFrame(getAnnotation(GMset), keep.extra.columns = T, start.field = "pos", end.field = "pos")

methdata_to_granges(methdata = Beta, annotation.gr = annotation.gr, chr = "chr6", start_region = 70672841, end_region = 70672878)

ND91/ndlib documentation built on Aug. 10, 2020, 11:59 a.m.