veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
200 stars 68 forks source link

How does hyphy deal with branch lengths? #1637

Closed siribi closed 11 months ago

siribi commented 11 months ago

Hi,

I'm slightly confused about how hyphy treat branch lengths when running aBSREL and RELAX:

1) Are the branch lengths in the tree file used, or are new branch lengths calculated based on the alignment? (I'm used to running codeml in PAML, and there you have the option to ignore branch lengths in the given tree and recalculate them from the data).

2) If the branch lengths from the tree are used , should they be defined as the expected number of nucleotide substitutions per nucleotide site, or as the expected number of nucleotide substitutions per codon?

The reason why I'm asking is because I'm interested in using a species tree from timetree.org, but the branch lengths are given in million years.

Thank you!

spond commented 11 months ago

Der @siribi,

  1. If branch lengths are provided, HyPhy will use them as starting guesses for optimization. In every common analysis, including aBSREL and RELAX, branch lengths are re-estimated, usually progressively: first with a simple nucleotide model, then a simple codon model, then a more complex codon model, then the final model for the analysis.

  2. HyPhy expects branch lengths to be specified as expected subs/nucleotide site.

If branch lengths are given in millions of years, then all that is likely to happen is that the initial optimization will start in a bad spot (since the guesses are in wrong units), and might take longer to complete.

Best, Sergei

siribi commented 11 months ago

Dear Sergei, Thank you so much for your quick answer! That made things much clearer. Good to know that it should be possible to use the species tree from timetree.org even if the units of the branch lengths are wrong. Best, Siri

Buckaroo1 commented 1 month ago

Dear @siribi

Consider delecting the branch length while using a tree from timetree.org. See If the branch lenghth in species tree are necessary in my analysis using hyphy?

Sincerely, Buckaroo