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

augur ancestral - IndexError when using wrong (shorter) reference #1600

Open
ammaraziz opened this issue Aug 27, 2024 · 0 comments
Open

augur ancestral - IndexError when using wrong (shorter) reference #1600

ammaraziz opened this issue Aug 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ammaraziz
Copy link

Current Behavior

When performing augur ancestral step, if the input --root-sequence is shorter than the alignment, an error is produced:

IndexError: boolean index did not match indexed array along dimension 0; dimension is 1982 but corresponding boolean dimension is 1983

Note the dimension (1982) is smaller than the boolean dimension (1983).

Expected behavior

An error produced due to mismatch between alignment and reference is the correct behavior. To help the user, the error could be improved.

How to reproduce

Run a standard augur pipeline align -> tree -> ancestral but replace the --root-sequence sequence to one that is shorter than the alignment.

Possible solution

Catch the IndexError: and provide a more useful error for the user. for example:

Dimensions of input alignment and root sequence do not match (1982/1983). 
This can be caused when the alignment and the root sequence are different. 
Check the reference used for `augur align` is the same when performing `augur ancestral`

Your environment: if running Nextstrain locally

  • Operating system: macos/ubuntu
  • Version: augur 25.3.0

Some related discussion here: #108 (comment)

@ammaraziz ammaraziz added the bug Something isn't working label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant