You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the following error when reading in a tree:
Traceback (most recent call last):
File "./bin/scripts/treeRenameNodes.py", line 45, in <module>
main(args)
File "./bin/scripts/treeRenameNodes.py", line 39, in main
tree = load_tree(args.tree)
File "./bin/scripts/treeRenameNodes.py", line 31, in load_tree
for i,node in enumerate(tree.ageorder_node_iter(include_leaves=False)):
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/phylo/lib/python3.7/site-packages/dendropy/datamodel/treemodel.py", line 4310, in ageorder_node_iter
self.calc_node_ages()
File "/ebio/abt3_projects/software/dev/miniconda3_dev/envs/phylo/lib/python3.7/site-packages/dendropy/datamodel/treemodel.py", line 5666, in calc_node_ages
subtree=subtree,
dendropy.utility.error.UltrametricityError: Tree is not ultrametric within threshold of 1e-05: 0.024889999999999995.
Encountered in subtree of node <Node object at 0x7f7cd923ec18: 'NODE 0000005' (None)> (edge length of 0.03805):
(JJOOJKAF:0.1839,BMGJBFJO:0.15901)NODE_0000005:0.03805
Age of children:
- <Node object at 0x7f7cdb1eca90: 'None' (<Taxon 0x7f7cd92b3710 'JJOOJKAF'>)>: has age of 0.0 and edge length of 0.1839, resulting in parent node age of 0.1839
- <Node object at 0x7f7cd923e1d0: 'None' (<Taxon 0x7f7cd923ec88 'BMGJBFJO'>)>: has age of 0.0 and edge length of 0.15901, resulting in parent node age of 0.15901
I can't tell from the documentation on how to read in a non-ultrametric tree.
The text was updated successfully, but these errors were encountered:
Is it actually possible to read in a non-ultrametric tree and then convert it to ultrametric? The package docs make a lot of statements about how ultrametric trees are needed for most (all?) functions, but I couldn't find any info on how to convert a tree to ultrametric.
Sure. There's an entire body of theory, divergence time estimation, devoted to inferring ultrametric trees (or "converting" non-ultrametric trees to ultrametric ones). You need a model of evolution that decouples time and substitution rate (which would typically be of the strict or relaxed molecular clock variety) and probably some additional data (for calibration points, though you can calibrate the root to some arbitrary value if you don't care about absolute time).
I'm getting the following error when reading in a tree:
I can't tell from the documentation on how to read in a non-ultrametric tree.
The text was updated successfully, but these errors were encountered: