Applying different substitution models to each codon position

804 views
Skip to first unread message

Peter

unread,
Nov 2, 2016, 4:58:08 AM11/2/16
to beast-users
Hi everyone,

I am currently analyzing a concatenated dataset of one mitochondrial gene (ND2) and three nuclear introns using BEAST 1.8.2. Prior to using BEAST I have analyzed my data in jModelTest, partitioned by gene for the introns, and by codon for the mitochondrial gene (the latter was performed by splitting the alignment in three separate alignments, one for 1st codon position, one for the 2nd position and so on).

For the mitochondrial gene, jModelTest (using BIC) suggests that for the 1st codon the best model is TrN+I, for the 2nd position it is HKY+I, and for the 3rd position it is TrN+I+G. Consequently, I would like to apply these different models to each codon partition in BEAST but I am a bit unsure how I should go about it.

Choosing the option to "Partition by codon position" in BEAUTi only ensures that each codon position will have a separate model, but not different kinds of models for each, corect?. Thus, for GTR fo eaxmple, each codon position will have a separate GTR model, but it does not let me apply different kinds of models to each codon partition.

The only option I have come up with so far is to split my mitochondrial alignment into three separate alignment files (as I did before running jModelTest) before concatenating my dataset and importing it into BEAUTi. Doing this, I am able to apply different models to each codon position. However, I am a bit unsure whether this is a valid approach? Any suggestions?

All the best,
Peter 

Andrew Rambaut

unread,
Nov 2, 2016, 5:17:36 AM11/2/16
to beast...@googlegroups.com
Dear Peter,

To do what you want you can either dig in to the XML generated by BEAUti and adjust things by hand or separate out the codon positions into different partitions (using other software) and then you can set different substitution models for each. I don’t have an immediate suggestion for the easiest software that can separate out codon positions (PAUP can do it but it is not very obvious). Perhaps others can suggest something.

Andrew

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Peter

unread,
Nov 2, 2016, 5:29:31 AM11/2/16
to beast-users
Dear Andrew,

Thanks for your reply. Yes, I used Split Codons (http://www.bioinformatics.org/sms2/split_codons.html) to generate three separate fasta files for each codon position. I then concatenated these three alignment files together with my three intron alignments and imported the resulting dataset into BEAUTi and unlinked all site models which allowed me to apply different substitution models to each gene and codon partition. Do you think that this is a good way to go about it, or am I overlooking something? 

Andrew Rambaut

unread,
Nov 2, 2016, 5:33:54 AM11/2/16
to beast...@googlegroups.com
Yes that is a reasonable way of doing it. You actually don’t need to concatenate the partitions before loading them into BEAUti - you can just load each of the individual files. I suggest using BEAST 1.8.3 because there were a couple of fixes in how the partition XML is set up. 

Andrew

Peter

unread,
Nov 2, 2016, 5:45:38 AM11/2/16
to beast-users
Thank you very much for your help! I'll make sure to use v1.8.3

Cheers,
Peter

Andrew Rambaut

unread,
Nov 2, 2016, 5:55:17 AM11/2/16
to beast...@googlegroups.com
Reply all
Reply to author
Forward
Message has been deleted
0 new messages