det_mrpr: det_mrpr() This function determines methylation-rich and...

Description Usage Arguments Value Examples

View source: R/det_mrpr.R

Description

det_mrpr() This function determines methylation-rich and -poor regions based on clustering of methylation (hsm sites). First, the ddstats() function is used to establish the distribution of distances between d-nearest neighbors. Short distances indcate clustering of hsm sites, and long distances indicate regions relatively devoid of hsm sites.

Usage

1
2
3
4
5
6
7
8
det_mrpr(
  mrobj,
  sampleL,
  ddset = c(1, 5),
  nbrxtrms = 100L,
  outfile = "",
  doplots = TRUE
)

Arguments

mrobj

A methylRaw object.

sampleL

Label used in output to identify the sample.

ddset

Vector of distances; d=1 is required to detect methylation-poor regions; default: c(1,5)

nbrxtrms

integer; number of extreme regions to evaluate

outfile

If specified, then output is saved in the specified file name.

doplots

Logical; if true, then show plots of distances

Value

List of two data frames, recording hsm rich and poor regions.

Examples

1
2
3
4
5
6
7
  mydatf <- system.file("extdata","Am.dat",package="BWASPR")
  myparf <- system.file("extdata","Am.par",package="BWASPR")
  myfiles <- setup_BWASPR(datafile=mydatf,parfile=myparf)
  AmHE <- mcalls2mkobj(myfiles$datafiles,species="Am",study="HE",
                       type="CpGhsm", mincov=1,assembly="Amel-4.5")
  det_mrpr(AmHE[[1]],"Am_HE_fr",ddset=c(1,5),nbrxtrms=100L,
           outfile="dst-Am_HE_fr.txt",doplots=TRUE)

BrendelGroup/BWASPR documentation built on Feb. 6, 2022, 9:09 a.m.