| nbh {RIPSeeker} | R Documentation |
Generic function for nbh.GRanges and nbh.integer
nbh(x, ...)
x |
Object of class Integer or GRanges. |
... |
Extra arguments passed to either |
Yue Li
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/)
mainSeekSingleChrom, nbh.integer, nbh.GRanges
# 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)