Description Usage Arguments Value Examples
Convert the viterbi path to a GRanges object
1 | viterbi2GRanges(viterbi, regions, binSize)
|
viterbi |
A list containing the viterbi paths as factors. The output from getViterbi. |
regions |
GRanges object of the regions (e.g. chromosomes) stored in the viterbi path. |
binSize |
The bin size of the viterbi path. |
The viterbi path as GRanges object.
1 2 3 4 5 6 7 8 9 10 | library(GenomicRanges)
data(yeastTF_databychrom_ex)
dStates = 6
dirobs = as.integer(c(rep(0,10), 1, 1))
bdhmm_gauss = initBdHMM(yeastTF_databychrom_ex, dStates = dStates, method ="Gaussian", directedObs=dirobs)
bdhmm_fitted_gauss = fitHMM(yeastTF_databychrom_ex, bdhmm_gauss)
viterbi_bdhmm_gauss = getViterbi(bdhmm_fitted_gauss, yeastTF_databychrom_ex)
yeastGRanges = GRanges(IRanges(start=1214616, end=1225008), seqnames="chrIV")
names(viterbi_bdhmm_gauss) = "chrIV"
viterbi_bdhmm_gauss_gr = viterbi2GRanges(viterbi_bdhmm_gauss, yeastGRanges, 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.