treeio icon indicating copy to clipboard operation
treeio copied to clipboard

Issue with function write.beast: not writing multiple BEAST trees

Open tiagorsimoes opened this issue 5 years ago • 2 comments

Hello Dr. Yu,

Thanks for this incredible package! The function read.beast allows me to read either single (class: treedata) or multiple BEAST trees (treedata list). However, the function write.beast only allows me to export a single BEAST tree, and not multiple BEAST trees. When I try to export an object with multiple BEAST trees, I get the following error:

Error in UseMethod("Ntip") : no applicable method for 'Ntip' applied to an object of class "treedataList"

The write.nexus from ape allows me to export either a single or multiple standard formatted trees. As the write.beast is based on the latter, I believe this may be possible to fix, but I wanted to reach out to you to ask how to modify the function.

Best regards,

Tiago

tiagorsimoes avatar Sep 06 '20 16:09 tiagorsimoes

not supported yet.

GuangchuangYu avatar Sep 07 '20 01:09 GuangchuangYu

Thanks for the feedback. Is it possible to request its inclusion?

ghost avatar Sep 07 '20 14:09 ghost

Three years later and this seems still not implemented. It would be an extremely useful feature! Please consider adding this :-)

sanderdebacker avatar Oct 05 '23 08:10 sanderdebacker

supported now.

For Ntip method of treedataList object, you can use Ntip(x[[1]]), and will be supported to directly use Ntip(x) in the future release version of the tidytree.

GuangchuangYu avatar Apr 08 '24 04:04 GuangchuangYu