KlausVigo / phangorn

Phylogenetic analysis in R
http://klausvigo.github.io/phangorn/
203 stars 38 forks source link

error in networx #130

Closed basic99 closed 2 years ago

basic99 commented 2 years ago

version 2.9.0 gives the wrong results for read.nexus.networx("splitstree.nxs")

The input file has BEGIN Network; DIMENSIONS ntax=86 nvertices=805 nedges=1475;

version 2.8.1 gives the correct numbers

splitstree.nxs.txt .

KlausVigo commented 2 years ago

Dear @basic99, phangorn assumes that edges leading to a label (trivial splits) always exist. In your dataset SplitsTree assign to some internal nodes several labels. Currently phangorn adds edges leading to the labels (with length 0) if these edges do not exist. The number edges and vertices is increased, but the number of taxa stays constant. The plot should look the same as the additional edges have zero edge weight. Regards, Klaus

basic99 commented 2 years ago

Yes. However, when I examine this object it seems to show different lengths for edges and lengths.

object_view

KlausVigo commented 2 years ago

Hi @basic99, I also saw this yesterday and the commit 4b0a7a3f21b3239e291ac926137ad80710408584 should fix this. Thanks for the bug reports. Regards, Klaus