title: zipHMMlib: a highly optimised HMM library exploiting repetitions in the input to speed up the forward algorithm.
abstract: BACKGROUND
  Hidden Markov models are widely used for genome analysis as they combine ease of modelling with efficient analysis algorithms. Calculating the likelihood of a model using the forward algorithm has worst case time complexity linear in the length of the sequence and quadratic in the number of states in the model. For genome analysis, however, the length runs to millions or billions of observations, and when maximising the likelihood hundreds of evaluations are often needed. A time efficient forward algorithm is therefore a key ingredient in an efficient hidden Markov model library.
  
  
  RESULTS
  We have built a software library for efficiently computing the likelihood of a hidden Markov model. The library exploits commonly occurring substrings in the input to reuse computations in the forward algorithm. In a pre-processing step our library identifies common substrings and builds a structure over the computations in the forward algorithm which can be reused. This analysis can be saved between uses of the library and is independent of concrete hidden Markov models so one preprocessing can be used to run a number of different models.Using this library, we achieve up to 78 times shorter wall-clock time for realistic whole-genome analyses with a real and reasonably complex hidden Markov model. In one particular case the analysis was performed in less than 8 minutes compared to 9.6 hours for the previously fastest library.
  
  
  CONCLUSIONS
  We have implemented the preprocessing procedure and forward algorithm as a C++ library, zipHMM, with Python bindings for use in scripts. The library is available at http://birc.au.dk/software/ziphmm/.
authors.affiliation: Bioinformatics Research Centre, Aarhus University, Aarhus, Denmark. asand@birc.au.dk.
authors.forename: Andreas
authors.initials: A
authors.lastname: Sand
authors.forename: Martin
authors.initials: M
authors.lastname: Kristiansen
authors.forename: Christian N S
authors.initials: CN
authors.lastname: Pedersen
authors.forename: Thomas
authors.initials: T
authors.lastname: Mailund
mesh_terms: D000465:Algorithms; D000818:Animals; D003198:Computer Simulation; D006071:Gorilla gorilla / Q000235:genetics; D006801:Humans; D016013:Likelihood Functions; D008390:Markov Chains; D064887:Observational Studies as Topic; D002679:Pan troglodytes / Q000235:genetics; D019151:Peptide Library; D057079:Pongo / Q000235:genetics; D011336:Probability; D012984:Software; D013997:Time Factors
chemical_list: D019151:Peptide Library