Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
305 lines (290 sloc) 12.6 KB
(alphabet
(name RNA)
(token (a c g u))
(complement (u g c a))
(extend (to n) (from a) (from c) (from g) (from u))
(extend (to x) (from a) (from c) (from g) (from u))
(extend (to t) (from u))
(extend (to r) (from a) (from g))
(extend (to y) (from c) (from u))
(extend (to m) (from a) (from c))
(extend (to k) (from g) (from u))
(extend (to s) (from c) (from g))
(extend (to w) (from a) (from u))
(extend (to h) (from a) (from c) (from u))
(extend (to b) (from c) (from g) (from u))
(extend (to v) (from a) (from c) (from g))
(extend (to d) (from a) (from g) (from u))
(wildcard *)
) ;; end alphabet RNA
(grammar
(name pfold)
(update-rates 1)
(update-rules 1)
(fold-string-tag PFOLD)
(chain
(update-policy rev)
(terminal (LNUC RNUC))
;; initial probability distribution
(initial (state (a a)) (prob 0.001167))
(initial (state (c a)) (prob 0.001806))
(initial (state (g a)) (prob 0.001058))
(initial (state (u a)) (prob 0.177977))
(initial (state (a c)) (prob 0.001806))
(initial (state (c c)) (prob 0.000391))
(initial (state (g c)) (prob 0.266974))
(initial (state (u c)) (prob 0.000763))
(initial (state (a g)) (prob 0.001058))
(initial (state (c g)) (prob 0.266974))
(initial (state (g g)) (prob 0.000406))
(initial (state (u g)) (prob 0.049043))
(initial (state (a u)) (prob 0.177977))
(initial (state (c u)) (prob 0.000763))
(initial (state (g u)) (prob 0.049043))
(initial (state (u u)) (prob 0.002793))
;; mutation rates
(mutate (from (a a)) (to (c a)) (rate 0.42))
(mutate (from (a a)) (to (g a)) (rate 0.589))
(mutate (from (a a)) (to (u a)) (rate 0.617))
(mutate (from (a a)) (to (a c)) (rate 0.42))
(mutate (from (a a)) (to (g c)) (rate 0.132))
(mutate (from (a a)) (to (u c)) (rate 0.019))
(mutate (from (a a)) (to (a g)) (rate 0.589))
(mutate (from (a a)) (to (c g)) (rate 0.132))
(mutate (from (a a)) (to (u g)) (rate 0.026))
(mutate (from (a a)) (to (a u)) (rate 0.617))
(mutate (from (a a)) (to (c u)) (rate 0.019))
(mutate (from (a a)) (to (g u)) (rate 0.026))
(mutate (from (c a)) (to (a a)) (rate 0.271))
(mutate (from (c a)) (to (g a)) (rate 0.068))
(mutate (from (c a)) (to (u a)) (rate 2.861))
(mutate (from (c a)) (to (a c)) (rate 0.024))
(mutate (from (c a)) (to (c c)) (rate 0.079))
(mutate (from (c a)) (to (g c)) (rate 0.008))
(mutate (from (c a)) (to (u c)) (rate 0.01))
(mutate (from (c a)) (to (a g)) (rate 0.003))
(mutate (from (c a)) (to (c g)) (rate 2.135))
(mutate (from (c a)) (to (u g)) (rate 0.401))
(mutate (from (c a)) (to (a u)) (rate 0.124))
(mutate (from (c a)) (to (c u)) (rate 0.008))
(mutate (from (c a)) (to (g u)) (rate 0.057))
(mutate (from (c a)) (to (u u)) (rate 0.02))
(mutate (from (g a)) (to (a a)) (rate 0.65))
(mutate (from (g a)) (to (c a)) (rate 0.116))
(mutate (from (g a)) (to (u a)) (rate 0.257))
(mutate (from (g a)) (to (a c)) (rate 0.006))
(mutate (from (g a)) (to (g c)) (rate 0.734))
(mutate (from (g a)) (to (a g)) (rate 0.097))
(mutate (from (g a)) (to (c g)) (rate 0.06))
(mutate (from (g a)) (to (u g)) (rate 0.024))
(mutate (from (g a)) (to (a u)) (rate 0.29))
(mutate (from (g a)) (to (c u)) (rate 0.019))
(mutate (from (g a)) (to (g u)) (rate 0.237))
(mutate (from (u a)) (to (a a)) (rate 0.004))
(mutate (from (u a)) (to (c a)) (rate 0.029))
(mutate (from (u a)) (to (g a)) (rate 0.002))
(mutate (from (u a)) (to (a c)) (rate 0.001))
(mutate (from (u a)) (to (c c)) (rate 0.002))
(mutate (from (u a)) (to (g c)) (rate 0.115))
(mutate (from (u a)) (to (u c)) (rate 0.007))
(mutate (from (u a)) (to (a g)) (rate 0.002))
(mutate (from (u a)) (to (c g)) (rate 0.501))
(mutate (from (u a)) (to (g g)) (rate 0.001))
(mutate (from (u a)) (to (u g)) (rate 0.274))
(mutate (from (u a)) (to (a u)) (rate 0.185))
(mutate (from (u a)) (to (c u)) (rate 0.003))
(mutate (from (u a)) (to (g u)) (rate 0.023))
(mutate (from (u a)) (to (u u)) (rate 0.016))
(mutate (from (a c)) (to (a a)) (rate 0.271))
(mutate (from (a c)) (to (c a)) (rate 0.024))
(mutate (from (a c)) (to (g a)) (rate 0.003))
(mutate (from (a c)) (to (u a)) (rate 0.124))
(mutate (from (a c)) (to (c c)) (rate 0.079))
(mutate (from (a c)) (to (g c)) (rate 2.135))
(mutate (from (a c)) (to (u c)) (rate 0.008))
(mutate (from (a c)) (to (a g)) (rate 0.068))
(mutate (from (a c)) (to (c g)) (rate 0.008))
(mutate (from (a c)) (to (u g)) (rate 0.057))
(mutate (from (a c)) (to (a u)) (rate 2.861))
(mutate (from (a c)) (to (c u)) (rate 0.01))
(mutate (from (a c)) (to (g u)) (rate 0.401))
(mutate (from (a c)) (to (u u)) (rate 0.02))
(mutate (from (c c)) (to (c a)) (rate 0.365))
(mutate (from (c c)) (to (u a)) (rate 0.799))
(mutate (from (c c)) (to (a c)) (rate 0.365))
(mutate (from (c c)) (to (g c)) (rate 0.992))
(mutate (from (c c)) (to (u c)) (rate 0.204))
(mutate (from (c c)) (to (c g)) (rate 0.992))
(mutate (from (c c)) (to (u g)) (rate 0.191))
(mutate (from (c c)) (to (a u)) (rate 0.799))
(mutate (from (c c)) (to (c u)) (rate 0.204))
(mutate (from (c c)) (to (g u)) (rate 0.191))
(mutate (from (c c)) (to (u u)) (rate 0.563))
(mutate (from (g c)) (to (a a)) (rate 0.001))
(mutate (from (g c)) (to (g a)) (rate 0.003))
(mutate (from (g c)) (to (u a)) (rate 0.077))
(mutate (from (g c)) (to (a c)) (rate 0.014))
(mutate (from (g c)) (to (c c)) (rate 0.001))
(mutate (from (g c)) (to (u c)) (rate 0.004))
(mutate (from (g c)) (to (c g)) (rate 0.13))
(mutate (from (g c)) (to (g g)) (rate 0.004))
(mutate (from (g c)) (to (u g)) (rate 0.019))
(mutate (from (g c)) (to (a u)) (rate 0.334))
(mutate (from (g c)) (to (c u)) (rate 0.001))
(mutate (from (g c)) (to (g u)) (rate 0.232))
(mutate (from (g c)) (to (u u)) (rate 0.003))
(mutate (from (u c)) (to (a a)) (rate 0.029))
(mutate (from (u c)) (to (c a)) (rate 0.024))
(mutate (from (u c)) (to (u a)) (rate 1.551))
(mutate (from (u c)) (to (a c)) (rate 0.018))
(mutate (from (u c)) (to (c c)) (rate 0.105))
(mutate (from (u c)) (to (g c)) (rate 1.265))
(mutate (from (u c)) (to (a g)) (rate 0.026))
(mutate (from (u c)) (to (c g)) (rate 0.473))
(mutate (from (u c)) (to (u g)) (rate 0.324))
(mutate (from (u c)) (to (a u)) (rate 0.688))
(mutate (from (u c)) (to (c u)) (rate 1.105))
(mutate (from (u c)) (to (g u)) (rate 0.044))
(mutate (from (u c)) (to (u u)) (rate 0.473))
(mutate (from (a g)) (to (a a)) (rate 0.65))
(mutate (from (a g)) (to (c a)) (rate 0.006))
(mutate (from (a g)) (to (g a)) (rate 0.097))
(mutate (from (a g)) (to (u a)) (rate 0.29))
(mutate (from (a g)) (to (a c)) (rate 0.116))
(mutate (from (a g)) (to (g c)) (rate 0.06))
(mutate (from (a g)) (to (u c)) (rate 0.019))
(mutate (from (a g)) (to (c g)) (rate 0.734))
(mutate (from (a g)) (to (u g)) (rate 0.237))
(mutate (from (a g)) (to (a u)) (rate 0.257))
(mutate (from (a g)) (to (g u)) (rate 0.024))
(mutate (from (c g)) (to (a a)) (rate 0.001))
(mutate (from (c g)) (to (c a)) (rate 0.014))
(mutate (from (c g)) (to (u a)) (rate 0.334))
(mutate (from (c g)) (to (c c)) (rate 0.001))
(mutate (from (c g)) (to (g c)) (rate 0.13))
(mutate (from (c g)) (to (u c)) (rate 0.001))
(mutate (from (c g)) (to (a g)) (rate 0.003))
(mutate (from (c g)) (to (g g)) (rate 0.004))
(mutate (from (c g)) (to (u g)) (rate 0.232))
(mutate (from (c g)) (to (a u)) (rate 0.077))
(mutate (from (c g)) (to (c u)) (rate 0.004))
(mutate (from (c g)) (to (g u)) (rate 0.019))
(mutate (from (c g)) (to (u u)) (rate 0.003))
(mutate (from (g g)) (to (u a)) (rate 0.252))
(mutate (from (g g)) (to (g c)) (rate 2.511))
(mutate (from (g g)) (to (c g)) (rate 2.511))
(mutate (from (g g)) (to (u g)) (rate 0.631))
(mutate (from (g g)) (to (a u)) (rate 0.252))
(mutate (from (g g)) (to (g u)) (rate 0.631))
(mutate (from (g g)) (to (u u)) (rate 0.145))
(mutate (from (u g)) (to (a a)) (rate 0.001))
(mutate (from (u g)) (to (c a)) (rate 0.015))
(mutate (from (u g)) (to (g a)) (rate 0.001))
(mutate (from (u g)) (to (u a)) (rate 0.996))
(mutate (from (u g)) (to (a c)) (rate 0.002))
(mutate (from (u g)) (to (c c)) (rate 0.002))
(mutate (from (u g)) (to (g c)) (rate 0.101))
(mutate (from (u g)) (to (u c)) (rate 0.005))
(mutate (from (u g)) (to (a g)) (rate 0.005))
(mutate (from (u g)) (to (c g)) (rate 1.262))
(mutate (from (u g)) (to (g g)) (rate 0.005))
(mutate (from (u g)) (to (a u)) (rate 0.084))
(mutate (from (u g)) (to (c u)) (rate 0.001))
(mutate (from (u g)) (to (g u)) (rate 0.037))
(mutate (from (u g)) (to (u u)) (rate 0.038))
(mutate (from (a u)) (to (a a)) (rate 0.004))
(mutate (from (a u)) (to (c a)) (rate 0.001))
(mutate (from (a u)) (to (g a)) (rate 0.002))
(mutate (from (a u)) (to (u a)) (rate 0.185))
(mutate (from (a u)) (to (a c)) (rate 0.029))
(mutate (from (a u)) (to (c c)) (rate 0.002))
(mutate (from (a u)) (to (g c)) (rate 0.501))
(mutate (from (a u)) (to (u c)) (rate 0.003))
(mutate (from (a u)) (to (a g)) (rate 0.002))
(mutate (from (a u)) (to (c g)) (rate 0.115))
(mutate (from (a u)) (to (g g)) (rate 0.001))
(mutate (from (a u)) (to (u g)) (rate 0.023))
(mutate (from (a u)) (to (c u)) (rate 0.007))
(mutate (from (a u)) (to (g u)) (rate 0.274))
(mutate (from (a u)) (to (u u)) (rate 0.016))
(mutate (from (c u)) (to (a a)) (rate 0.029))
(mutate (from (c u)) (to (c a)) (rate 0.018))
(mutate (from (c u)) (to (g a)) (rate 0.026))
(mutate (from (c u)) (to (u a)) (rate 0.688))
(mutate (from (c u)) (to (a c)) (rate 0.024))
(mutate (from (c u)) (to (c c)) (rate 0.105))
(mutate (from (c u)) (to (g c)) (rate 0.473))
(mutate (from (c u)) (to (u c)) (rate 1.105))
(mutate (from (c u)) (to (c g)) (rate 1.265))
(mutate (from (c u)) (to (u g)) (rate 0.044))
(mutate (from (c u)) (to (a u)) (rate 1.551))
(mutate (from (c u)) (to (g u)) (rate 0.324))
(mutate (from (c u)) (to (u u)) (rate 0.473))
(mutate (from (g u)) (to (a a)) (rate 0.001))
(mutate (from (g u)) (to (c a)) (rate 0.002))
(mutate (from (g u)) (to (g a)) (rate 0.005))
(mutate (from (g u)) (to (u a)) (rate 0.084))
(mutate (from (g u)) (to (a c)) (rate 0.015))
(mutate (from (g u)) (to (c c)) (rate 0.002))
(mutate (from (g u)) (to (g c)) (rate 1.262))
(mutate (from (g u)) (to (u c)) (rate 0.001))
(mutate (from (g u)) (to (a g)) (rate 0.001))
(mutate (from (g u)) (to (c g)) (rate 0.101))
(mutate (from (g u)) (to (g g)) (rate 0.005))
(mutate (from (g u)) (to (u g)) (rate 0.037))
(mutate (from (g u)) (to (a u)) (rate 0.996))
(mutate (from (g u)) (to (c u)) (rate 0.005))
(mutate (from (g u)) (to (u u)) (rate 0.038))
(mutate (from (u u)) (to (c a)) (rate 0.013))
(mutate (from (u u)) (to (u a)) (rate 0.988))
(mutate (from (u u)) (to (a c)) (rate 0.013))
(mutate (from (u u)) (to (c c)) (rate 0.079))
(mutate (from (u u)) (to (g c)) (rate 0.287))
(mutate (from (u u)) (to (u c)) (rate 0.129))
(mutate (from (u u)) (to (c g)) (rate 0.287))
(mutate (from (u u)) (to (g g)) (rate 0.021))
(mutate (from (u u)) (to (u g)) (rate 0.663))
(mutate (from (u u)) (to (a u)) (rate 0.988))
(mutate (from (u u)) (to (c u)) (rate 0.129))
(mutate (from (u u)) (to (g u)) (rate 0.663))
) ;; end chain LNUC RNUC
(chain
(update-policy rev)
(terminal (NUC))
;; initial probability distribution
(initial (state (a)) (prob 0.364097))
(initial (state (c)) (prob 0.151009))
(initial (state (g)) (prob 0.211881))
(initial (state (u)) (prob 0.273013))
;; mutation rates
(mutate (from (a)) (to (c)) (rate 0.099))
(mutate (from (a)) (to (g)) (rate 0.322))
(mutate (from (a)) (to (u)) (rate 0.263))
(mutate (from (c)) (to (a)) (rate 0.239))
(mutate (from (c)) (to (g)) (rate 0.242))
(mutate (from (c)) (to (u)) (rate 0.927))
(mutate (from (g)) (to (a)) (rate 0.553))
(mutate (from (g)) (to (c)) (rate 0.173))
(mutate (from (g)) (to (u)) (rate 0.396))
(mutate (from (u)) (to (a)) (rate 0.351))
(mutate (from (u)) (to (c)) (rate 0.513))
(mutate (from (u)) (to (g)) (rate 0.307))
) ;; end chain NUC
;; state pfoldS
(transform (from (pfoldS)) (to (pfoldL)) (prob 0.131488))
(transform (from (pfoldS)) (to (pfoldB)) (prob 0.868742))
;; state pfoldF
(transform (from (pfoldF)) (to (LNUC pfoldF* RNUC)) (gaps-ok)
(annotate (row PFOLD) (column LNUC) (label <))
(annotate (row PFOLD) (column RNUC) (label >)))
(transform (from (pfoldF*)) (to (pfoldF)) (prob 0.787854))
(transform (from (pfoldF*)) (to (pfoldB)) (prob 0.212421))
;; state pfoldL
(transform (from (pfoldL)) (to (pfoldF)) (prob 0.105404))
(transform (from (pfoldL)) (to (pfoldU)) (prob 0.895025))
;; state pfoldB
(transform (from (pfoldB)) (to (pfoldL pfoldS)))
;; state pfoldU
(transform (from (pfoldU)) (to (NUC pfoldU*)) (gaps-ok))
(transform (from (pfoldU*)) (to ()) (prob 1))
) ;; end grammar pfold