Open corneliusroemer opened 1 year ago
Thanks for flagging this! It seems to be a general bug that if a node sequence is not in the alignment treetime will print a warning and then crash instead of throwing an exception.
I ran into this error today (I think?) using augur version 17.1.0 (TreeTime version 0.9.2).
In my case, the input tree (created using augur tree
) had changed taxa names from (e.g.) Coted'Ivoire/IPCI-DVE-GR1822/2022
to Coted_Ivoire/IPCI-DVE-GR1642/2022
, thus falling out of sync with the metadata & alignnment. A more helpful error message would be great here 🙏
Full error in my case:
27.09 ***WARNING: TreeAnc._check_alignment_tree_gtr_consistency: NO SEQUENCE FOR
LEAF: 'Coted_Ivoire/IPCI-DVE-GR1822/2022'
27.11 ***WARNING: TreeAnc._check_alignment_tree_gtr_consistency: NO SEQUENCE FOR
LEAF: 'Coted_Ivoire/IPCI-DVE-GR1901/2022'
27.14 ***WARNING: TreeAnc._check_alignment_tree_gtr_consistency: NO SEQUENCE FOR
LEAF: 'Coted_Ivoire/IPCI-DVE-GR1642/2022'
27.17 ***WARNING: TreeAnc._check_alignment_tree_gtr_consistency: NO SEQUENCE FOR
LEAF: 'Coted_Ivoire/IPCI-DVE-GR2193/2022'
27.21 ***WARNING: TreeAnc: 4 nodes don't have a matching sequence in the
alignment. POSSIBLE ERROR.
29.88 WARNING: Previous versions of TreeTime (<0.7.0) RECONSTRUCTED sequences of
tips at positions with AMBIGUOUS bases. This resulted in unexpected
behavior is some cases and is no longer done by default. If you want to
replace those ambiguous sites with their most likely state, rerun with
`reconstruct_tip_states=True` or `--reconstruct-tip-states`.
ERROR: Was unable to refine time trees:
'NoneType' object has no attribute 'shape'
Hi, @jameshadfield - so I think this error should be solved by the merged PR above: https://github.com/neherlab/treetime/pull/213 - in the augur and TreeTime master
, or TreeTime version 0.9.4. But would be great to know which data you used and the full command in augur refine
so I can check for sure :-)
Current Behavior
Augur refine throws
ERROR: 'NoneType' object has no attribute 'shape'
when running the monkeypox buildExpected behavior
A more useful error is thrown if there's a data problem, or no error is thrown if this is a bug
How to reproduce
Full log:
@anna-parker