<p>Calculating a consensus is easy, <code>RAxML</code> has a tree consensus module, however calculating it according to weights is a rare procedure. <code>ETE3</code> (Python) will have a consensus library and I assume in R it will be <code>ape</code></p>
<p>The only way I can see this being done is to use the relative BIC as a duplicate factor of the number of trees of a given model and then perform a global tree consensus on the resulting treefile. Thus if Bayes Information Criterion top value is twice the size as the lower value the number of 'top value BIC trees' is double that of the lower value. That could be coded up to be cleaner. . Alternatively a multiplication factor could be introduced to ensure the number of duplicated trees within a scale of 100 - to give a cleaner more interpretable 'bootstrap' (but its not a bootstrap) score for each branch.</p>
<p>Here the consensus frequency is a direct function of BIC, essentially you just have an alternative measure to the &quot;non-parametric bootstraps&quot;.</p>
<hr />
<p>I better finish this question. The solution to the problem is to produce separate trees for each model, provide a method of robustness, e.g. bootstrapping and then produce a single tree with all the bootstraps for each model along the branches. That is the formal approach if you're not going to simply select the model with highest probability, highest BIC in this case. This however is not the question.</p>
<p>The problem with the solution above the line ... is the question. I was sort of being polite when I said 'rare procedure'. Weighting a consensus tree is not done in this context, weighting a locus or specific site - alignment position - can be done with good justification within the tree building method. The problems sort of multiple when it is weighted according to exact difference in BIC because the probability of a given branch being robust - which does use consensus is calculated differently. What you are doing is assigning shifts in the BIC/maximum likelihood not to the global topology but to specific incongruent branches. Thats not how it works. The BIC/maximum likelihood - whatever - is for the whole tree. The difference between models is the whole tree - every single branch change - not just a branch here and a branch there because its the score (probability ML) of a singular hypothesis. So a branch change here or there is a different hypothesis - for which you might not have generated a BIC score. The branch here and a branch there is MCMCMC consensus or bootstrap resampling consensus not precise shifts in BIC/maximum likelihood. You would need to dedicate the entire project to this specific method and even then it might be not accepted ... its not as a passing calculation.</p>
<p>There could be biological situations where weighting a consensus tree is doable in the way described here. If a specialist reviewer saw the calculation they would refuse to permit publication because it violates the foundations of tree building theory. What you may not be aware is the long historic that has led to the current acceptance of modern methods and what you are proposing is dismantling that theory.</p>

CC BY-SA 4.0
2022-11-07T17:27:44.733Z
I think I can make something similar work. Weights are not linearly related to IC or to IC ratios. They are proportional to exp(-delta/2), where delta is the difference between the individual IC and the lowest IC. Thus, the lowest IC automatically has a weight of 1, and each successive IC has a lower weight, therefrom. But I can make that work.
Bryan
CC BY-SA 4.0
2022-11-07T00:24:24.637Z
2022-11-09T13:50:23.733Z
2022-11-09T13:50:23.733Z
M__
<p>While I am familiar with calculating information criteria for various ml models of a multiple sequence alignment, I am not aware of how to use the derived weights to create a tree that combines multiple models weighted accordingly.</p>
<p>Thus, I have X trees, computed by multiple different models on the same alignment. Each has an associated BIC. BICs can be converted to weights. I wish to average the trees according to the BIC derived weights.</p>
<p>I would prefer to be able to do this with R.</p>

<phylogenetics><phylogeny>
Using information criteria weights to create consensus tree
# Using information criteria weights to create consensus tree

(Asked by: username_0 on 2022-11-06)

While I am familiar with calculating information criteria for various ml models of a multiple sequence alignment, I am not aware of how to use the derived weights to create a tree that combines multiple models weighted accordingly.

Thus, I have X trees, computed by multiple different models on the same alignment. Each has an associated BIC. BICs can be converted to weights. I wish to average the trees according to the BIC derived weights.

I would prefer to be able to do this with R.

**Tags:** phylogenetics, phylogeny

---

## 1 answers

### Answer by username_1 on 2022-11-07. Score: 0

Calculating a consensus is easy, `RAxML` has a tree consensus module, however calculating it according to weights is a rare procedure. `ETE3` (Python) will have a consensus library and I assume in R it will be `ape`

The only way I can see this being done is to use the relative BIC as a duplicate factor of the number of trees of a given model and then perform a global tree consensus on the resulting treefile. Thus if Bayes Information Criterion top value is twice the size as the lower value the number of 'top value BIC trees' is double that of the lower value. That could be coded up to be cleaner. . Alternatively a multiplication factor could be introduced to ensure the number of duplicated trees within a scale of 100 - to give a cleaner more interpretable 'bootstrap' (but its not a bootstrap) score for each branch.

Here the consensus frequency is a direct function of BIC, essentially you just have an alternative measure to the "non-parametric bootstraps".

---

I better finish this question. The solution to the problem is to produce separate trees for each model, provide a method of robustness, e.g. bootstrapping and then produce a single tree with all the bootstraps for each model along the branches. That is the formal approach if you're not going to simply select the model with highest probability, highest BIC in this case. This however is not the question.

The problem with the solution above the line ... is the question. I was sort of being polite when I said 'rare procedure'. Weighting a consensus tree is not done in this context, weighting a locus or specific site - alignment position - can be done with good justification within the tree building method. The problems sort of multiple when it is weighted according to exact difference in BIC because the probability of a given branch being robust - which does use consensus is calculated differently. What you are doing is assigning shifts in the BIC/maximum likelihood not to the global topology but to specific incongruent branches. Thats not how it works. The BIC/maximum likelihood - whatever - is for the whole tree. The difference between models is the whole tree - every single branch change - not just a branch here and a branch there because its the score (probability ML) of a singular hypothesis. So a branch change here or there is a different hypothesis - for which you might not have generated a BIC score. The branch here and a branch there is MCMCMC consensus or bootstrap resampling consensus not precise shifts in BIC/maximum likelihood. You would need to dedicate the entire project to this specific method and even then it might be not accepted ... its not as a passing calculation.

There could be biological situations where weighting a consensus tree is doable in the way described here. If a specialist reviewer saw the calculation they would refuse to permit publication because it violates the foundations of tree building theory. What you may not be aware is the long historic that has led to the current acceptance of modern methods and what you are proposing is dismantling that theory.

> **Comments:**
> **username_0**: I think I can make something similar work. Weights are not linearly related to IC or to IC ratios. They are proportional to exp(-delta/2), where delta is the difference between the individual IC and the lowest IC. Thus, the lowest IC automatically has a weight of 1, and each successive IC has a lower weight, therefrom. But I can make that work.  

---

