bio-phylo
bio-phylo copied to clipboard
`set_root_below` leaves extraneous internal nodes behind
Hi,
I think I found an issue with the method set_root_below
in the last version of Bio::Phylo
available on CPAN. I attach a minimal working example that illustrates my point: root-bug-bio-phylo.tar.gz.
Basically, when repeatedly re-rooting a tree, old roots remain available through both get_entities
and get_internals
, which prevents proper analysis of the rooted tree.
I did try to debug it myself for a couple of hours, but the whole point of using Bio::Phylo
is to avoid worrying about the nitty-gritty details of its internal representations. :-)
Moreover, if you look at the rooted trees written on the disk, you will notice that some existing node names (and I guess attributes if any) are not transferred after rooting as one would expect when rerooting trees in a visual way.
Please get in touch if you need more information.
Best, Denis
Hi Denis,
I'll try to have a look at this. Rerooting is kind of tricky, it turns out, especially when carrying around the attached metadata. Hopefully I can fix this :)
Rutger
Thank you for fast feedback, Rutger!
Indeed, the apparently (?) fundamentally rooted tree structure of Bio::Phylo makes this very complicated, I think.
I wonder if such issues also happen in the Java implementation you get inspiration from.
Best, Denis
At Wed, 22 Apr 2020 04:46:42 -0700, [email protected] wrote:
Hi Denis,
I'll try to have a look at this. Rerooting is kind of tricky, it turns out, especially when carrying around the attached metadata. Hopefully I can fix this :)
Rutger
-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
It kinda does but maybe they are a bit more disciplined? I know that in Mesquite they periodically recompute the integer vectors that represent the trees, and they have a flag (isDirty, or something) to record that a tree representation has become volatile.
On Wed, Apr 22, 2020 at 1:56 PM dbaurain [email protected] wrote:
Thank you for fast feedback, Rutger!
Indeed, the apparently (?) fundamentally rooted tree structure of Bio::Phylo makes this very complicated, I think.
I wonder if such issues also happen in the Java implementation you get inspiration from.
Best, Denis
At Wed, 22 Apr 2020 04:46:42 -0700, [email protected] wrote:
Hi Denis,
I'll try to have a look at this. Rerooting is kind of tricky, it turns out, especially when carrying around the attached metadata. Hopefully I can fix this :)
Rutger
-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rvosa/bio-phylo/issues/45#issuecomment-617732613, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZ76WO2B6NMRRZZDXMFOTRN3LOFANCNFSM4MOB6C3Q .