saveUMRLMRSegments: Save UMR and LMR segments

Description Usage Arguments Value Author(s) Examples

View source: R/saveUMRLMRSegments.R

Description

Save UMR and LMRs segments in rds format and/or as tab-delimited file

Usage

1
saveUMRLMRSegments(segs, GRangesFilename = NULL, TableFilename = NULL)

Arguments

segs

GRanges object containing the UMR/LMR segmentation. Return value of the segmentUMRsLMRs function (see example).

GRangesFilename

Filename of the GRanges object.

TableFilename

Filename of the UMR/LMR table.

Value

No return value. Only one filename is required.

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
19
20
21
22
23
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)

FDR.cutoff <- 5 
m.sel <- 0.5 
n.sel <- 3

#segment UMRs and LMRs, assuming no PMDs
UMRLMRsegments.gr <- segmentUMRsLMRs(m=meth.gr, meth.cutoff=m.sel,
nCpG.cutoff=n.sel, num.cores=1,
myGenomeSeq=Hsapiens, seqLengths=sLengths)

#save UMRs and LMRs
saveUMRLMRSegments(segs=UMRLMRsegments.gr, GRangesFilename="UMRsLMRs.gr.rds",
 TableFilename="UMRsLMRs.tab")

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