Method:
If needed, convert rates per day to rates per generation
Convert rates per generation to probabilities per generation
Make diagonal such that rows of probability matrix p sum to 1
Convert to q matrix, assuming a mutation rate of mut_rate mutations/site/generation, by solving for q in the equation p = exp(q*mut_rate)
Arguments
- rates
4x4 matrix of individual nucleotide substitution rates for each potential substitution (per-site per-generation or per-site per-day) with the following row and column names: A,C,G,T.
- mut_rate
Overall per-site per-generation mutation rate.
- generation_time
Generation time (if nucleotide substitution rates are in days rather than generations; default: NULL, assumes that rate matrix is per-generation)
