<p>The method you are proposing is called a distance method, because you are constructing a distance matrix and then using a clustering algorithm to make a tree. The things to watch out for are:</p>
<ul>
<li>Multiple substitutions, traditionally this is take care of using a Jukes-Cantor correction. You could argue this is less of a concern because this is a 64 substition matrix model rather than just 4 or 20 substition matrix for nucleotides or amino acids.</li>
<li>Use the neighbour-joining clustering algorithm. Do not use a standard hierarchical clustering algorithm such as UPGMA. I'm sure R must have the nj in something like R's ape, pretty sure scipy will have something like that</li>
<li>Code for bootstrap resampling. That is a method for measuring robustness</li>
</ul>
<p>The codon model for phylogenetic trees has been implemented in MrBayes, I suspect it will be in phyloBayes. This method will be Bayesian and you should run this is parallel with your own solution.</p>
<p><em>Concerns</em>
Codon models are very prone to mutation saturation (which is complicated) so you must only use it for closely related sequences. If e.g. 3rd codon distances start exceeding 70% codon models go kaput, because it will select a different codon, which is a completely separate part of the matrix - completely by chance. So whilst mutation saturation in a nucleotide model (4 substitution matrix) would invalidate the tree in theory, they would be sufficient 'good' signal for key phylogenetic signals to be identified, this wouldn't happen for a codon model.</p>
<p>I recognise the 'concerns' might sound a bit confusing at present, but just to reiterate, codon models need sequence data that is really closely related. For this data they excel and give excellent bootstrap support.</p>

CC BY-SA 4.0
2020-08-20T10:54:48.190Z
Very good points. So a whole organism nucleotide content approach would be misleading? My idea was to analyse a set of parasites to get their nucleotide content (vector of 61 sense codons) and to apply the neighbour-joining algorithm. Maybe a k-mean approach would be better for my intentions ?(it, naturally would imply a different approach to analyse data not distance based of course)
Spartan 117
CC BY-SA 4.0
2020-08-20T11:43:51.553Z
Hi @Firingam It doesn't matter what method you use, the same theory will apply. Codon-models are particularly bad however. So really it depends on the genetic distance between the genomes. If its 61 Drosophila melanogaster genomes ... codon models will work well. It is split between hemimetabolous and homometabolous insects its a total disaster. Alternative methods allow you to 'ditch' the saturated mutations which you can't do with codons (otherwise you have no codons). I'm away for a few days.
M__
CC BY-SA 4.0
2020-08-20T12:35:49.583Z
When you will newly available maybe we can chat privately. Best regards!
Spartan 117
CC BY-SA 4.0
2020-08-26T18:46:55.270Z
Hi, @Firingam, thanks for your enthusiasm but ... whilst your supervisor probably knows some stuff I've done, its ages since I've worked in insects. So I've no problem answering site questions but I'm a rusty on developments in entomology now.. Hope thats ok.
M__
CC BY-SA 4.0
2020-08-15T21:37:16.163Z
2020-08-15T21:37:16.163Z
M__
<p>I have several organisms and I want to calculate for each one of these their codon composition implementing a pairwise distance matrix between these codon vectors to build a phylogenetic tree. Therefore, the matrix  will have on the principal diagonal  0 values (since each organism will have a distance of zero from itself) and the other matrix members will represent the euclidean distance among one organism and another one. Thus we will have a square matrix.  To assess to robustness of the various phylogenetic relationships I would bootstrap this matrix building the tree on these data.
Is this a good strategy?</p>

CC BY-SA 4.0
2020-08-11T13:23:40.353Z
Are you looking to build a codon phylogeny? The method you specified is a distance method, which lacks bootstrapping. There are alternative methods
M__
CC BY-SA 4.0
2020-08-11T16:39:18.317Z
Thank You!May You indicate to me some work to have a reference?I Would like to explore the theory before starting the work.
Spartan 117
CC BY-SA 4.0
2020-08-12T21:44:48.313Z
Hi @Firingam I will respond in full over the weekend
M__
CC BY-SA 4.0
2020-08-13T18:23:45.863Z
Thank you! Best regards!
Spartan 117
<phylogenetics><phylogeny><matlab><matrix>
How to assess if this strategy is good to have some phylogenetic information?
# How to assess if this strategy is good to have some phylogenetic information?

(Asked by: username_0 on 2020-08-11)

I have several organisms and I want to calculate for each one of these their codon composition implementing a pairwise distance matrix between these codon vectors to build a phylogenetic tree. Therefore, the matrix will have on the principal diagonal 0 values (since each organism will have a distance of zero from itself) and the other matrix members will represent the euclidean distance among one organism and another one. Thus we will have a square matrix. To assess to robustness of the various phylogenetic relationships I would bootstrap this matrix building the tree on these data.
Is this a good strategy?

**Tags:** phylogenetics, phylogeny, matlab, matrix
> **Comments:**
> **username_1**: Are you looking to build a codon phylogeny? The method you specified is a distance method, which lacks bootstrapping. There are alternative methods  
> **username_0**: Thank You!May You indicate to me some work to have a reference?I Would like to explore the theory before starting the work.  
> **username_1**: Hi @Firingam I will respond in full over the weekend  
> **username_0**: Thank you! Best regards!  

---

## 1 answers

### Answer by username_1 on 2020-08-15. Score: 2 | Accepted answer

The method you are proposing is called a distance method, because you are constructing a distance matrix and then using a clustering algorithm to make a tree. The things to watch out for are:

* Multiple substitutions, traditionally this is take care of using a Jukes-Cantor correction. You could argue this is less of a concern because this is a 64 substition matrix model rather than just 4 or 20 substition matrix for nucleotides or amino acids.
* Use the neighbour-joining clustering algorithm. Do not use a standard hierarchical clustering algorithm such as UPGMA. I'm sure R must have the nj in something like R's ape, pretty sure scipy will have something like that
* Code for bootstrap resampling. That is a method for measuring robustness

The codon model for phylogenetic trees has been implemented in MrBayes, I suspect it will be in phyloBayes. This method will be Bayesian and you should run this is parallel with your own solution.

*Concerns*
Codon models are very prone to mutation saturation (which is complicated) so you must only use it for closely related sequences. If e.g. 3rd codon distances start exceeding 70% codon models go kaput, because it will select a different codon, which is a completely separate part of the matrix - completely by chance. So whilst mutation saturation in a nucleotide model (4 substitution matrix) would invalidate the tree in theory, they would be sufficient 'good' signal for key phylogenetic signals to be identified, this wouldn't happen for a codon model.

I recognise the 'concerns' might sound a bit confusing at present, but just to reiterate, codon models need sequence data that is really closely related. For this data they excel and give excellent bootstrap support.

> **Comments:**
> **username_0**: Very good points. So a whole organism nucleotide content approach would be misleading? My idea was to analyse a set of parasites to get their nucleotide content (vector of 61 sense codons) and to apply the neighbour-joining algorithm. Maybe a k-mean approach would be better for my intentions ?(it, naturally would imply a different approach to analyse data not distance based of course)  
> **username_1**: Hi @Firingam It doesn't matter what method you use, the same theory will apply. Codon-models are particularly bad however. So really it depends on the genetic distance between the genomes. If its 61 Drosophila melanogaster genomes ... codon models will work well. It is split between hemimetabolous and homometabolous insects its a total disaster. Alternative methods allow you to 'ditch' the saturated mutations which you can't do with codons (otherwise you have no codons). I'm away for a few days.  
> **username_0**: When you will newly available maybe we can chat privately. Best regards!  
> **username_1**: Hi, @Firingam, thanks for your enthusiasm but ... whilst your supervisor probably knows some stuff I've done, its ages since I've worked in insects. So I've no problem answering site questions but I'm a rusty on developments in entomology now.. Hope thats ok.  

---

