neherlab / treetime

Maximum likelihood inference of time stamped phylogenies and ancestral reconstruction
MIT License
223 stars 55 forks source link

tt.optimize_tree throws `IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed` #222

Closed corneliusroemer closed 1 year ago

corneliusroemer commented 1 year ago

From Dan Lu over at: https://discussion.nextstrain.org/t/indexerror-too-many-indices-for-array-array-is-1-dimensional-but-2-were-indexed/1294

Has anyone seen this error before? I don’t have enough Treetime or Python knowledge to dig it TnT This is a build with randomly selected mpox sequences. I’ve seen the same error in step refine instead of fix_tree for other sets of randomly selected sequences.

I’m trying to understand on a high level what may be the cause. For example, are the samples too diverse, or have too many mutations, or mutations that don’t agree with each other that led to this error? I’m not trying to understand for this specific set of samples which sample broke the run.

Input data can be downloaded here: debug_data/treetime at main · danrlu/debug_data · GitHub

image

Version: treetime 0.9.4 monkeypox/fix_tree.py at 644d07ebe3fa5ded64d27d0964064fb722797c5d · nextstrain/monkeypox · GitHub (current master branch)

danrlu commented 1 year ago

Thanks Cornelius! I think it's a problem from my aligned sequences, not Treetime. Thanks for creating a issue, someone with the same problem can find it easily in the future.

image