Bayesian Hidden Markov Models in DNA Sequence Segmentation using R: The case of Simian Vacuolating virus (SV40)

James Totterdell, Darfiana Nur, Kerrie Mengersen

    Research output: Contribution to journalArticlepeer-review

    1 Citation (Scopus)


    Segmentation models aim to partition compositionally heterogeneous domains into homogeneous segments which may be reflective of biological function. Due to the latent nature of the segments a natural approach to segmentation that has gained favour recently uses Bayesian hidden Markov models (HMMs). Concomitantly in the last few decades, the free R programming language has become a dominant tool for computational statistics, visualization and data science. Therefore, this paper aims to fully exploit R to fit a Bayesian HMM for DNA segmentation. The joint posterior distribution of parameters in the model to be considered is derived followed by the algorithms that can be used for estimation. Functions following these algorithms (Gibbs Sampling, Data Augmentation and Label Switching) are then fully implemented in R. The methodology is assessed through extensive simulation studies and then being applied to analyse Simian Vacuolating virus (SV40). It is concluded that: (1) the algorithms and functions in R can correctly estimate sequence segmentation if the HMM structure is assumed; (2) the performance of the model improves with sequence length; (3) R is reasonably fast for short to medium sequence lengths and number of segments and (4) the segmentation of SV40 appears to correspond with the two major transcripts, early and late, that regulate the expression of SV40 genes.

    Original languageEnglish
    Pages (from-to)2799-2827
    Number of pages29
    Issue number14
    Early online date2017
    Publication statusPublished - 22 Sep 2017


    • Bayesian modelling
    • data augmentation
    • DNA sequence
    • Gibbs sampler algorithm
    • hidden Markov models
    • label switching algorithm
    • R statistical software
    • segmentation modelling
    • Simian Vacuolating virus (SV40)


    Dive into the research topics of 'Bayesian Hidden Markov Models in DNA Sequence Segmentation using R: The case of Simian Vacuolating virus (SV40)'. Together they form a unique fingerprint.

    Cite this