combine-method: combine method

combine-methodR Documentation

combine method

Description

combine two BSData-class or two BSDMCs-class

Usage

combine(obj1, obj2)

## S4 method for signature 'BSData,BSData'
combine(obj1, obj2)

## S4 method for signature 'BSDMCs,BSDMCs'
combine(obj1, obj2)

Arguments

obj1

A BSData-class or BSDMCs-class

obj2

A BSData-class or BSDMCs-class

Value

A BSData-class or BSDMCs-class

Author(s)

Farhad Shokoohi <shokoohi@icloud.com>

Examples

set.seed(1980)
nr <- 150; nc <- 8
metht <- matrix(as.integer(runif(nr * nc*2, 0, nr)), nr)
methc <- matrix(rbinom(n=nr*nc,c(metht),prob = runif(nr*nc*2)),nr,nc*2)
r1 <- GRanges(rep('chr1', nr), IRanges(1:nr, width=1), strand='*')
names(r1) <- 1:nr
cd1 <- DataFrame(Group=rep('G1',each=nc),row.names=LETTERS[1:nc])
OBJ1 <- cBSData(rowRanges=r1,methReads=methc[,1:nc],totalReads=metht[,1:nc],
colData=cd1)
cd2 <- DataFrame(Group=rep('G2',each=nc),row.names=LETTERS[nc+1:nc])
OBJ2 <- cBSData(rowRanges=r1,methReads=methc[,nc+1:nc],totalReads=
metht[,nc+1:nc],colData=cd2)
OBJ3 <- combine(OBJ1, OBJ2)
OBJ3

shokoohi/DMCHMM documentation built on April 19, 2022, 3:25 a.m.