evolbioinfo / gotree

Gotree is a set of command line tools and an API to manipulate phylogenetic trees. It is implemented in Go language.
GNU General Public License v2.0
118 stars 15 forks source link

About negative branches on NJ tree #26

Open xiekunwhy opened 2 weeks ago

xiekunwhy commented 2 weeks ago

Hi,

My question is not really aboat gotree, just want to know do you have any idea to deal with those negative distance branches on NJ tree?

Replace all negative value using 0, or all branches plus the smallest distances ?

Best, Kun

fredericlemoine commented 1 week ago

Hi,

If it is required by your downstream analysis, you can replace negative branch lengths with 0:

gotree brlen setmin -l 0

However, it will potentially bias the distances between tips.