Hi, the Newick format allows trees without any data (such as branch-lengths) attached to the edges. However, your Newick parser complains that something is wrong with the tree if not all branches have a ':' attached to it. This is because n_branches is only increased when a colon is found.
I suppose there are 3 possibilities. Either
- you really need branch-lengths in the input to process the species tree, in which case the user should be properly informed of this fact, (keeping in mind that each branch having a ':' doesn't guarantee that there is a number following the colon and that this number represents a branch-length)
- the simulation algorithm really needs branch-lengths, but they could be derived from the species tree by assuming that it's ultrametric and then evenly distributing branch-lengths depending on the lengths of the paths to the leaves.
- the simulation doesn't need branch-lengths, in which case it's a bug in the Newick parser preventing the parsing of valid Newick without branch-lengths.
PS: forgot to mention, I'm trying to generate gene-trees for a given species tree that I'm trying to pass to simphy.
Hi, the Newick format allows trees without any data (such as branch-lengths) attached to the edges. However, your Newick parser complains that something is wrong with the tree if not all branches have a ':' attached to it. This is because
n_branchesis only increased when a colon is found.I suppose there are 3 possibilities. Either
PS: forgot to mention, I'm trying to generate gene-trees for a given species tree that I'm trying to pass to simphy.