Cut-off on methylation for calling hypomethylated
regions.
nCpG.cutoff
Cut-off on the minimal number of CpGs for calling
hypomethylated regions.
PMDs
GRanges object of PMDs. Set to either the return value of
the function segmentPMDs (see example) or to NA if there are no PMDs
(default).
pdfFilename
Name of the pdf file in which the figure is
saved. If no name is provided (default), the figure is printed to
the screen.
num.cores
Number of cores used for the calculations.
myGenomeSeq
Genome sequence as BSgenome object.
seqLengths
A named vector indicating the chromosome lengths of
the genome used.
nCpG.smoothing
The number of consecutive CpGs that the
methylation levels are averaged over.
minCover
Only CpGs with a coverage of at least minCover reads
will be used.
Value
Returns a GRanges object containing all UMRs and LMRs with the
following metadata values: the number of CpGs with a coverage of at
least minCover per region (nCG.segmentation), the number of CpGs in
the DNA sequence (nCG), the total number of reads that map to CpGs in
the region (T), the total number of read that map to CpGs without
conversion of the C (M), the mean methylation of the segment (pmeth),
the median methylation of the segment (median.meth) and the type
(UMR/LMR) of region (type). The function creates a figure showing the
classification of regions into UMRs and LMRs based on the number of
CpGs they contain. The figure is either printed to the screen
(default) or saved as a pdf if a filename is provided.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MethylSeekR)
Loading required package: rtracklayer
Loading required package: GenomicRanges
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: mhsmm
Loading required package: mvtnorm
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/MethylSeekR/segmentUMRsLMRs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: segmentUMRsLMRs
> ### Title: Identify UMRs and LMRs
> ### Aliases: segmentUMRsLMRs
>
> ### ** Examples
>
>
> library(MethylSeekR)
>
> # get chromosome lengths
> library("BSgenome.Hsapiens.UCSC.hg18")
Loading required package: BSgenome
Loading required package: Biostrings
Loading required package: XVector
> sLengths=seqlengths(Hsapiens)
>
> # read methylation data
> methFname <- system.file("extdata", "Lister2009_imr90_hg18_chr22.tab",
+ package="MethylSeekR")
> meth.gr <- readMethylome(FileName=methFname, seqLengths=sLengths)
reading methylome data
Read 200000 records
>
> 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, myGenomeSeq=Hsapiens, seqLengths=sLengths)
identifying UMRs and LMRs
>
>
>
>
>
>
> dev.off()
null device
1
>