MAPLE
MAPLE copied to clipboard
How to get nucleotide equilibrium and symmetry matrix
Maple can output Q matrix, but can it output nucleotide equilibrium frequency and symmetry matrix. Especially the nucleotide equilibrium frequency. Looking forward to your answer.
MAPLE defines the root nucleotide frequencies as the nucleotide frequencies in the input reference genome. This is an approximation based on the assumption of short divergence from the reference.
In case an UNREST substitution model is used, the equilibrium frequencies will likely differ from the root frequencies. In this case the equilibrium nucleotide frequencies are not used by the software and need to be calculated from the output Q matrix. This can be done easily in python, for example using
from discreteMarkovChain import markovChain mc = markovChain(Q) mc.computePi('linear') #can also use 'power', 'krylov' or 'eigen' print(mc.pi)
I'll consider adding this information to the output in future versions of MAPLE, but for now you should be able to obtain what you need following the instructions above, right?
Thank you very much!I used the above code to solve the problem.