Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on PhyloXML documents with multiple phylogenies #460

Open
miguel76 opened this issue Apr 4, 2024 · 0 comments
Open

Error on PhyloXML documents with multiple phylogenies #460

miguel76 opened this issue Apr 4, 2024 · 0 comments

Comments

@miguel76
Copy link

miguel76 commented Apr 4, 2024

As of version 1.20 (https://www.phyloxml.org/documentation/version_1.20/phyloxml.html) PhyloXML supports multiple phylogenies in the same file.
When a PhyloXML with multiple phylogenies is parsed at the following line tree_json becomes undefined because xml.phyloxml.phylogeny is an array rather than an object:

tree_json = xml.phyloxml.phylogeny.clade;

That leads to an error at the following line:

tree_json.name = "root";

This case should be managed in a clear way, either throwing an error stating that multiple phylogenies are not supported or choosing one of the phylogenies (e.g., the first) and giving a warning.

Ideally, it would be nice to load multi-phylogenies files as a set of Phylotree objects, but that would be an improvement rather than just fixing the bug, which is the priority in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant