Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
389 lines (360 sloc) 16.3 KB
;; - Pfold RNA model plus a state for intergenic sites
(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
(name ncRnaDualStrand)
(update-rates 1)
(update-rules 1)
;; state 0: START
(transform (from (START)) (to ()) (prob 0.0001))
(transform (from (START)) (to (FWD_RNA_GENE)) (prob 0.00005))
(transform (from (START)) (to (REV_RNA_GENE)) (prob 0.00005))
(transform (from (START)) (to (INTERGENIC)) (prob 0.9998))
;; state 1: FWD_RNA_GENE
(transform (from (FWD_RNA_GENE)) (to (FWD_PFOLD_S POST_RNA_GENE)))
;; state 2: REV_RNA_GENE
(transform (from (REV_RNA_GENE)) (to (REV_PFOLD_S POST_RNA_GENE)))
;; state 3: POST_RNA_GENE
(transform (from (POST_RNA_GENE)) (to ()) (prob .0001))
(transform (from (POST_RNA_GENE)) (to (INTERGENIC)) (prob .9999))
;; state 4: INTERGENIC
(transform (from (INTERGENIC)) (to (X INTERGENIC*))
(annotate (row SS_cons) (column X) (label n)))
(transform (from (INTERGENIC*)) (to ()) (prob 0.000262754))
(transform (from (INTERGENIC*)) (to (FWD_RNA_GENE)) (prob 0.0136401))
(transform (from (INTERGENIC*)) (to (REV_RNA_GENE)) (prob 0.0136401))
(transform (from (INTERGENIC*)) (to (INTERGENIC)) (prob 0.972655))
;; state 5: FWD_PFOLD_S = start state for FWD_PFOLD_ subgrammar (fwd)
(transform (from (FWD_PFOLD_S)) (to (FWD_PFOLD_L)) (prob 0.131488))
(transform (from (FWD_PFOLD_S)) (to (FWD_PFOLD_B)) (prob 0.868742))
;; state 6: FWD_PFOLD_F = emit state for paired bases (fwd)
(transform (from (FWD_PFOLD_F)) (to (LNUC FWD_PFOLD_F* RNUC)) (gaps-ok)
(annotate (row SS_cons) (column LNUC) (label <))
(annotate (row SS_cons) (column RNUC) (label >))
(annotate (row STRAND) (column LNUC) (label +))
(annotate (row STRAND) (column RNUC) (label +)))
(transform (from (FWD_PFOLD_F*)) (to (FWD_PFOLD_F)) (prob 0.787854))
(transform (from (FWD_PFOLD_F*)) (to (FWD_PFOLD_B)) (prob 0.212421))
;; state 7: FWD_PFOLD_L = transition between paired and unpaired sites (fwd)
(transform (from (FWD_PFOLD_L)) (to (FWD_PFOLD_F)) (prob 0.105404))
(transform (from (FWD_PFOLD_L)) (to (FWD_PFOLD_U)) (prob 0.895025))
;; state 8: FWD_PFOLD_B = bifurcation (fwd)
(transform (from (FWD_PFOLD_B)) (to (FWD_PFOLD_L FWD_PFOLD_S)))
;; state 9: FWD_PFOLD_U = emit state for unpaired bases (fwd)
(transform (from (FWD_PFOLD_U)) (to (FWD_PFOLD_U* NUC)) (gaps-ok)
(annotate (row SS_cons) (column NUC) (label _))
(annotate (row STRAND) (column NUC) (label +)))
(transform (from (FWD_PFOLD_U*)) (to ()) (prob 1))
;; state 10: REV_PFOLD_S = start state for REV_PFOLD_ subgrammar (rev)
(transform (from (REV_PFOLD_S)) (to (REV_PFOLD_L)) (prob 0.131488))
(transform (from (REV_PFOLD_S)) (to (REV_PFOLD_B)) (prob 0.868742))
;; state 11: REV_PFOLD_F = emit state for paired bases (rev)
(transform (from (REV_PFOLD_F)) (to (~RNUC REV_PFOLD_F* ~LNUC)) (gaps-ok)
(annotate (row SS_cons) (column RNUC) (label <))
(annotate (row SS_cons) (column LNUC) (label >))
(annotate (row STRAND) (column RNUC) (label -))
(annotate (row STRAND) (column LNUC) (label -)))
(transform (from (REV_PFOLD_F*)) (to (REV_PFOLD_F)) (prob 0.787854))
(transform (from (REV_PFOLD_F*)) (to (REV_PFOLD_B)) (prob 0.212421))
;; state 12: REV_PFOLD_L = transition between paired and unpaired sites (rev)
(transform (from (REV_PFOLD_L)) (to (REV_PFOLD_F)) (prob 0.105404))
(transform (from (REV_PFOLD_L)) (to (REV_PFOLD_U)) (prob 0.895025))
;; state 13: REV_PFOLD_B = bifurcation (rev)
(transform (from (REV_PFOLD_B)) (to (REV_PFOLD_S REV_PFOLD_L)))
;; state 14: REV_PFOLD_U = emit state for unpaired bases (rev)
(transform (from (REV_PFOLD_U)) (to (~NUC REV_PFOLD_U*)) (gaps-ok)
(annotate (row SS_cons) (column NUC) (label _))
(annotate (row STRAND) (column NUC) (label -)))
(transform (from (REV_PFOLD_U*)) (to ()) (prob 1))
;; Basepairs
(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
;; Unpaired bases
(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
;; Intergenic sites
(update-policy rev)
(terminal (X))
;; initial probability distribution
(initial (state (a)) (prob 0.29))
(initial (state (c)) (prob 0.21))
(initial (state (g)) (prob 0.21))
(initial (state (u)) (prob 0.29))
;; mutation rates
(mutate (from (a)) (to (c)) (rate 0.153628))
(mutate (from (a)) (to (g)) (rate 0.308527))
(mutate (from (a)) (to (u)) (rate 0.249658))
(mutate (from (c)) (to (a)) (rate 0.212192))
(mutate (from (c)) (to (g)) (rate 0.189962))
(mutate (from (c)) (to (u)) (rate 0.554081))
(mutate (from (g)) (to (a)) (rate 0.421819))
(mutate (from (g)) (to (c)) (rate 0.188036))
(mutate (from (g)) (to (u)) (rate 0.284897))
(mutate (from (u)) (to (a)) (rate 0.251214))
(mutate (from (u)) (to (c)) (rate 0.403657))
(mutate (from (u)) (to (g)) (rate 0.209678))
) ;; end chain X
) ;; end grammar ncRna