cBSDMCs-method: cBSDMCs method

cBSDMCs-methodR Documentation

cBSDMCs method

Description

Creates a BSDMCs-class object

Usage

cBSDMCs(
  methReads,
  totalReads,
  methLevels,
  methStates,
  methVars,
  rowRanges,
  colData = DataFrame(row.names = colnames(methReads)),
  metadata = list(),
  ...
)

## S4 method for signature 'matrix,matrix,matrix,matrix,matrix,GRanges'
cBSDMCs(
  methReads,
  totalReads,
  methLevels,
  methStates,
  methVars,
  rowRanges,
  colData = DataFrame(row.names = colnames(methReads)),
  metadata = list(),
  ...
)

Arguments

methReads

The matrix methReads contains the number of methylated reads spanning a CpG-site. The rows represent the CpG sites in rowRanges and the columns represent the samples in colData.

totalReads

The matrix totalReads contains the number of reads spanning a CpG-site. The rows represent the CpG sites in rowRanges and the columns represent the samples in colData.

methLevels

The matrix methLevels contains the predicted methylation level spanning a CpG-site using Hidden Markov model. The rows represent the CpG sites in rowRanges and the columns represent the samples in colData.

methStates

The matrix methStates contains the state of methylation obtained from Hidden Markov model spanning a CpG-site. The rows represent the CpG sites in rowRanges and the columns represent the samples in colData. The value of state is stored in metadata, named Beta.

methVars

The matrix methVars contains the variances of the corresponding methLevels obtianed from MCMC.

rowRanges

A GRanges or GRangesList object describing the ranges of interest. Names, if present, become the row names of the SummarizedExperiment object. The length of the GRanges or GRangesList must equal the number of rows of the matrices in assays. If rowRanges is missing, a SummarizedExperiment instance is returned.

colData

Object of class "DataFrame" containing information on variable values of the samples

metadata

An optional list of arbitrary content describing the overall experiment

...

other possible parameters

Details

The rows of a BSDMCs object represent ranges (in genomic coordinates) of interest. The ranges of interest are described by a GRanges or a GRangesList object, accessible using the rowRanges function. The GRanges and GRangesList classes contains sequence (e.g., chromosome) name, genomic coordinates, and strand information. Each range can be annotated with additional data; this data might be used to describe the range or to summarize results (e.g., statistics of differential abundance) relevant to the range. Rows may or may not have row names; they often will not.

Value

A BSDMCs-class

Author(s)

Farhad Shokoohi <shokoohi@icloud.com>

Examples

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)
meths <- matrix(as.integer(runif(nr * nc, 0, 10)), nr)
methl <- methc/metht
methv <- matrix((runif(nr * nc, 0.1, 0.5)), nr)
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])
OBJ2 <- cBSDMCs(rowRanges=r1,methReads=methc,totalReads=metht,
methLevels=methl,methStates=meths,methVars=methv,colData=cd1)
OBJ2

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