Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justincbagley/49981334acde6ab092743c53e3448962 to your computer and use it in GitHub Desktop.
Save justincbagley/49981334acde6ab092743c53e3448962 to your computer and use it in GitHub Desktop.
How to Set DNA Substitution Models in Seq-Gen

How to Set DNA Substitution Models in Seq-Gen

August 27, 2017, Justin C. Bagley, Richmond, VA

In this Gist, I briefly provide some examples of how to set DNA substitution models in the program Seq-Gen (Rambaut and Grassly 1997). This software is available for download through Andrew Rambaut's website, and its infrequent development can also be tracked on GitHub at the Seq-Gen GitHub repository.

HKY + G

Here is an example using an alpha shape parameter of 0.5 (-a) for gamma-distributed rate heterogeneity, 4 discrete gamma categories (-g), empirical (fixed) base frequencies (-f), and a Ts:Tv ratio of 1.5 (-t): seqgencommand = -mHKY -l9077 -a0.5 -g4 -f0.314,0.198,0.218,0.270 -t1.5

HKY + I + G

This example is similar to that for HKY + G above, except a proportion of invariant sites of 0.5 is added with the -i flag: seqgencommand = -mHKY -l9077 -a0.5 -g4 -i0.5 -f0.314,0.198,0.218,0.270 -t1.5

K80 (K2P) + G

Go from HKY to K80 (also known as Kimura 2-parameter model, or "K2P") by starting from HKY and then setting base frequencies to be all equal to one another: seqgencommand = -mHKY -l3263 -a0.5 -g4 -fe -t1.5 ** Important note: if the -t flag is not used to provide a Ts:Tv rate ratio here, then Ts:Tv will be set to 1 and the model will reduce to the Jukes-Cantor '69 (JC69) model, which is probably not what you want here.

K80 (K2P) + I + G

seqgencommand =  -mHKY -l3263 -a0.5 -g4 -i0.5 -fe -t1.5

TrN + G

(Use HKY + G model as a substitute.)

TrN + I + G

(Use HKY + I + G model as a substitute.)

GTR + G

Here is a GTR example with gamma-distributed rate heterogeneity, Ts:Tv ratio, and other parameters set similar to the settings for HKY examples above: seqgencommand = -mGTR -l499 -a0.5 -g4 -f0.314,0.198,0.218,0.270 -t1.5

GTR + I + G

seqgencommand = -mGTR -l499 -a0.5 -g4 -i0.5 -f0.314,0.198,0.218,0.270 -t1.5

SYM + G

Get the SYM model by starting from GTR and then setting all base frequencies to be equal with the -f flag: seqgencommand = -mGTR -l2237 -a0.5 -g4 -fe -t1.5

SYM + I + G

seqgencommand = -mGTR -l499 -a0.5 -g4 -i0.5 -fe -t1.5

REFERENCES

  • Rambaut, A. and Grassly, N. C. (1997) Seq-Gen: An application for the Monte Carlo simulation of DNA sequence evolution along phylogenetic trees. Computer Applications in the Biosciences 13, 235-238.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment