title: Pathological rate matrices: from primates to pathogens.
abstract: BACKGROUND
  Continuous-time Markov models allow flexible, parametrically succinct descriptions of sequence divergence. Non-reversible forms of these models are more biologically realistic but are challenging to develop. The instantaneous rate matrices defined for these models are typically transformed into substitution probability matrices using a matrix exponentiation algorithm that employs eigendecomposition, but this algorithm has characteristic vulnerabilities that lead to significant errors when a rate matrix possesses certain 'pathological' properties. Here we tested whether pathological rate matrices exist in nature, and consider the suitability of different algorithms to their computation.
  
  
  RESULTS
  We used concatenated protein coding gene alignments from microbial genomes, primate genomes and independent intron alignments from primate genomes. The Taylor series expansion and eigendecomposition matrix exponentiation algorithms were compared to the less widely employed, but more robust, Padé with scaling and squaring algorithm for nucleotide, dinucleotide, codon and trinucleotide rate matrices. Pathological dinucleotide and trinucleotide matrices were evident in the microbial data set, affecting the eigendecomposition and Taylor algorithms respectively. Even using a conservative estimate of matrix error (occurrence of an invalid probability), both Taylor and eigendecomposition algorithms exhibited substantial error rates: ~100% of all exonic trinucleotide matrices were pathological to the Taylor algorithm while ~10% of codon positions 1 and 2 dinucleotide matrices and intronic trinucleotide matrices, and ~30% of codon matrices were pathological to eigendecomposition. The majority of Taylor algorithm errors derived from occurrence of multiple unobserved states. A small number of negative probabilities were detected from the Padé algorithm on trinucleotide matrices that were attributable to machine precision. Although the Padé algorithm does not facilitate caching of intermediate results, it was up to 3x faster than eigendecomposition on the same matrices.
  
  
  CONCLUSIONS
  Development of robust software for computing non-reversible dinucleotide, codon and higher evolutionary models requires implementation of the Padé with scaling and squaring algorithm.
authors.affiliation: John Curtin School of Medical Research, The Australian National University, Canberra, ACT, Australia. harold.schranz@anu.edu.au
authors.forename: Harold W
authors.initials: HW
authors.lastname: Schranz
authors.forename: Von Bing
authors.initials: VB
authors.lastname: Yap
authors.forename: Simon
authors.initials: S
authors.lastname: Easteal
authors.forename: Rob
authors.initials: R
authors.lastname: Knight
authors.forename: Gavin A
authors.initials: GA
authors.lastname: Huttley
mesh_terms: D000465:Algorithms; D000818:Animals; D003062:Codon; D019295:Computational Biology / Q000379:methods*; D019143:Evolution, Molecular; D006801:Humans; D008390:Markov Chains; D011323:Primates / Q000235:genetics; D012984:Software
chemical_list: D003062:Codon