<p>There are models that take into account compositional heterogeneity both under the <a href="https://doi.org/10.1080/10635150600975218" rel="nofollow noreferrer">maximum likelihood</a> and <a href="https://doi.org/10.1093/molbev/msl091" rel="nofollow noreferrer">Bayesian</a> frameworks. Although the substitution process is not time-reversible, the computations are <a href="https://doi.org/10.1080/10635150490445779" rel="nofollow noreferrer">simplified by assuming</a> that the instantaneous rate matrix can be decomposed into an "equilibrium frequency vector" (non-homogeneous) and a symmetric, constant exchange rate matrix.</p>

<p>I guess all your suggestions are also valid, and I remember recoding being used successfully to reduce the GC-content bias (examples in the references above and <a href="https://doi.org/10.1093/molbev/msh137" rel="nofollow noreferrer">here</a>).  </p>

CC BY-SA 3.0
2017-05-18T22:38:52.100Z
2017-05-19T09:24:00.620Z
2017-05-19T09:24:00.620Z
Leo Martins
<p>The following 2004 paper describes a way to model compositional changes across the tree, in a Bayesian framework: <a href="https://doi.org/10.1080/10635150490445779" rel="nofollow noreferrer">https://doi.org/10.1080/10635150490445779</a></p>

<p>A python package implementing this ("p4"), and improvements added along the years, is available here: <a href="https://github.com/pgfoster/p4-phylogenetics" rel="nofollow noreferrer">https://github.com/pgfoster/p4-phylogenetics</a></p>

<p>To get started, you may find useful examples here: <a href="http://p4.nhm.ac.uk/scripts.html" rel="nofollow noreferrer">http://p4.nhm.ac.uk/scripts.html</a></p>

<p>This has been used in a few large-scale phylogenetic analyses.</p>

CC BY-SA 3.0
2017-05-19T09:18:45.637Z
2017-05-19T09:18:45.637Z
bli
<p>The answer is the logDet algorithm was constructed to overcome GC% clustering. </p>

<p>At the time it was devised only a distance method was available/implemented, so it wasn't very powerful. The posts here imply that a Bayesian or ML approach are available and these do tightly stick to the model.</p>

<p>Original publication <a href="https://academic.oup.com/mbe/article/13/10/1375/1020361" rel="nofollow noreferrer">here</a></p>

CC BY-SA 4.0
2019-04-09T09:54:35.997Z
Do you have a publication or webpage in mind? Can you link it?
nicolallias
CC BY-SA 4.0
2019-04-09T11:21:23.570Z
Link provided above. Goes back a long way ... to 1996
M__
CC BY-SA 4.0
2019-04-09T09:49:39.053Z
2019-04-09T11:20:50.910Z
2019-04-09T11:20:50.910Z
M__
<p>Let's say I want to construct a phylogenetic tree based on orthologous nucleotide sequences; I do not want to use protein sequences to have a better resolution. These species have different GC-content.</p>

<p>If we use a straightforward approach like maximum likelihood with JC69 or any other classical nucleotide model, conserved protein coding sequences of distant species with similar GC-content will artificially cluster together. This will happen because GC-content will mainly affect wobbling codon positions, and they will look similar on the nucleotide level.</p>

<p>What are possible ways to overcome this? I considered the following options so far:</p>

<ol>
<li><p>Using protein sequence. This is possible of course, but we lose a lot of information on the short distance. Not applicable to non-coding sequences. </p></li>
<li><p><a href="https://doi.org/10.1186/1471-2105-15-S2-S8" rel="noreferrer">Recoding</a>. In this approach C and T can be combined into a single pyrimidine state Y (G and A could be also combined in some implementations). This sounds interesting, but, first, we also lose some information here. Mathematical properties of the resulting process are not clear. As a result, this approach is not widely used.</p></li>
<li><p>Excluding third codon position from the analysis. Losing some short-distance information again. Also, not all synonymous substitution are specific to the third codon positions, so we still expect to have some bias. Not applicable to non-coding sequence.</p></li>
</ol>

<p>It should be possible in theory to have a model which allows shifts in GC-content. This will be a non time-reversible Markov process. As far as I understand there are some computational difficulties estimating likelihood for such models.</p>

CC BY-SA 3.0
2017-05-19T07:24:29.097Z
I would just add that I think there's a key assumption in the setup here: "I do  not want to use protein sequences to have a better resolution". We can decompose 'better' here - it's likely to be more precise but also more biased, the latter for all the reasons you outline.
roblanf
CC BY-SA 3.0
2017-05-19T09:05:53.513Z
In case you might be interested, I tested some of the approaches you mention, plus a few other recoding schemes (http://dx.doi.org/10.6084/m9.figshare.732758) in the following papers: http://arxiv.org/abs/1307.1586 and http://dx.doi.org/10.1093/molbev/msu105
bli
<phylogenetics><phylogeny><nucleotide-models>
What is the best way to account for GC-content shift while constructing nucleotide-based phylogenetic tree?
# What is the best way to account for GC-content shift while constructing nucleotide-based phylogenetic tree?

(Asked by: username_0 on 2017-05-18)

Let's say I want to construct a phylogenetic tree based on orthologous nucleotide sequences; I do not want to use protein sequences to have a better resolution. These species have different GC-content.

If we use a straightforward approach like maximum likelihood with JC69 or any other classical nucleotide model, conserved protein coding sequences of distant species with similar GC-content will artificially cluster together. This will happen because GC-content will mainly affect wobbling codon positions, and they will look similar on the nucleotide level.

What are possible ways to overcome this? I considered the following options so far:

1. Using protein sequence. This is possible of course, but we lose a lot of information on the short distance. Not applicable to non-coding sequences.
2. [Recoding](https://doi.org/10.1186/1471-2105-15-S2-S8). In this approach C and T can be combined into a single pyrimidine state Y (G and A could be also combined in some implementations). This sounds interesting, but, first, we also lose some information here. Mathematical properties of the resulting process are not clear. As a result, this approach is not widely used.
3. Excluding third codon position from the analysis. Losing some short-distance information again. Also, not all synonymous substitution are specific to the third codon positions, so we still expect to have some bias. Not applicable to non-coding sequence.

It should be possible in theory to have a model which allows shifts in GC-content. This will be a non time-reversible Markov process. As far as I understand there are some computational difficulties estimating likelihood for such models.

**Tags:** phylogenetics, phylogeny, nucleotide-models
> **Comments:**
> **username_1**: I would just add that I think there's a key assumption in the setup here: "I do  not want to use protein sequences to have a better resolution". We can decompose 'better' here - it's likely to be more precise but also more biased, the latter for all the reasons you outline.  
> **username_2**: In case you might be interested, I tested some of the approaches you mention, plus a few other recoding schemes (http://dx.doi.org/10.6084/m9.figshare.732758) in the following papers: http://arxiv.org/abs/1307.1586 and http://dx.doi.org/10.1093/molbev/msu105  

---

## 3 answers

### Answer by username_3 on 2017-05-18. Score: 5 | Accepted answer

There are models that take into account compositional heterogeneity both under the [maximum likelihood](https://doi.org/10.1080/10635150600975218) and [Bayesian](https://doi.org/10.1093/molbev/msl091) frameworks. Although the substitution process is not time-reversible, the computations are [simplified by assuming](https://doi.org/10.1080/10635150490445779) that the instantaneous rate matrix can be decomposed into an "equilibrium frequency vector" (non-homogeneous) and a symmetric, constant exchange rate matrix.

I guess all your suggestions are also valid, and I remember recoding being used successfully to reduce the GC-content bias (examples in the references above and [here](https://doi.org/10.1093/molbev/msh137)).


---

### Answer by username_2 on 2017-05-19. Score: 3

The following 2004 paper describes a way to model compositional changes across the tree, in a Bayesian framework: <https://doi.org/10.1080/10635150490445779>

A python package implementing this ("p4"), and improvements added along the years, is available here: <https://github.com/pgfoster/p4-phylogenetics>

To get started, you may find useful examples here: <http://p4.nhm.ac.uk/scripts.html>

This has been used in a few large-scale phylogenetic analyses.


---

### Answer by username_4 on 2019-04-09. Score: 1

The answer is the logDet algorithm was constructed to overcome GC% clustering.

At the time it was devised only a distance method was available/implemented, so it wasn't very powerful. The posts here imply that a Bayesian or ML approach are available and these do tightly stick to the model.

Original publication [here](https://academic.oup.com/mbe/article/13/10/1375/1020361)

> **Comments:**
> **username_5**: Do you have a publication or webpage in mind? Can you link it?  
> **username_4**: Link provided above. Goes back a long way ... to 1996  

---

