nbh: Generic function of negative binomial HMM

Description Usage Arguments Author(s) References See Also Examples

Description

Generic function for nbh.GRanges and nbh.integer

Usage

1
nbh(x, ...)

Arguments

x

Object of class Integer or GRanges.

...

Extra arguments passed to either nbh.GRanges or nbh.integer.

Author(s)

Yue Li

References

Rabiner, L. R. (1989). A tutorial on hidden Markov models and selected applications in speech recognition (Vol. 77, pp. 257-286). Presented at the Proceedings of the IEEE. doi:10.1109/5.18626

Bishop, Christopher. Pattern recognition and machine learning. Number 605-631 in Information Science and Statisitcs. Springer Science, 2006.

Capp\'e, O. (2001). H2M : A set of MATLAB/OCTAVE functions for the EM estimation of mixtures and hidden Markov models. (http://perso.telecom-paristech.fr/cappe/h2m/)

See Also

mainSeekSingleChrom, nbh.integer, nbh.GRanges

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Retrieve system files
extdata.dir <- system.file("extdata", package="RIPSeeker") 

bamFiles <- list.files(extdata.dir, ".bam$", recursive=TRUE, full.names=TRUE)

bamFiles <- grep("PRC2", bamFiles, value=TRUE)

alignGal <- getAlignGal(bamFiles[1], reverseComplement=TRUE, genomeBuild="mm9")

alignGR <- as(alignGal, "GRanges")

alignGRList <- GRangesList(as.list(split(alignGR, seqnames(alignGR))))

binSize <- 1e5  # use a large fixed bin size for demo only

binGR <- binCount(alignGRList$chrX, binSize)

# test on GRanges object
nbhGR <- nbh(binGR, 2, runViterbi=TRUE)

# test on integer object
nbhList <- nbh(values(binGR)$count, 2, runViterbi=TRUE)

yueli-compbio/RIPSeeker documentation built on May 8, 2019, 2:34 a.m.