findDMCs-method: findDMCs method

Description Usage Arguments Value Author(s) Examples

Description

finds the DMCs after smoothing using HMM

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
findDMCs(
  object,
  formula,
  FDRthreshold,
  Methylthreshold,
  mc.cores,
  weightfunction
)

## S4 method for signature 'BSDMCs'
findDMCs(
  object,
  formula,
  FDRthreshold,
  Methylthreshold,
  mc.cores,
  weightfunction
)

Arguments

object

A BSData-class or BSDMCs-class object

formula

A formula

FDRthreshold

A numeric value

Methylthreshold

A numeric value

mc.cores

An integer greater than 0

weightfunction

A function to create weights using variance obtained form the MCMC algorithm

Value

BSDMCs-class object

Author(s)

Farhad Shokoohi <shokoohi@icloud.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(1980)
nr <- 150; nc <- 8
metht <- matrix(as.integer(runif(nr * nc, 0, 100)), nr)
methc <- matrix(rbinom(n=nr*nc,c(metht),prob = runif(nr*nc)),nr,nc)
r1 <- GRanges(rep('chr1', nr), IRanges(1:nr, width=1), strand='*')
names(r1) <- 1:nr
cd1 <- DataFrame(Group=rep(c('G1','G2'),each=nc/2),row.names=LETTERS[1:nc])
OBJ1 <- cBSData(rowRanges=r1,methReads=methc,totalReads=metht,colData=cd1)
OBJ2 <- methHMEM(OBJ1, MaxK=2, mc.cores=2)
OBJ3 <- methHMMCMC(OBJ2, mc.cores=2)
OBJ4 <- findDMCs(OBJ3, mc.cores=2)
head(metadata(OBJ4)$DMCHMM)

DMCHMM documentation built on Nov. 8, 2020, 8:20 p.m.