Skip to content

Unhelpful error message from treetime when augur ancestral fails to load translation alignment #1919

@misacodes

Description

@misacodes

Description

When augur ancestral fails to load a translation alignment file, the error message is not helpful in diagnosing the actual problem. The error simply states "loading alignment failed" without providing any details about why it failed. I couldn't find anything wrong with the translation at first glance.

Steps to reproduce

  1. Run the following command with the attached files:
augur ancestral \
  --tree results/refined_tree.nwk \
  --alignment results/filtered_sequences.fasta \
  --annotation defaults/reference.gb \
  --infer-ambiguous \
  --translations results/translations/%GENE.fasta \
  --genes BCRF1 \
  --output-node-data results/ancestral_node_data.json \
  --output-sequences results/ancestral_sequences.fasta \
  --validation-mode warn \
  --inference joint
  1. Observe the error output

Actual output

augur ancestral is using TreeTime version 0.11.4
Read in 2 features from reference sequence file
Processing gene: BCRF1
ERROR: SequenceData: loading alignment failed... results/translations/BCRF1.fasta


ERROR from TreeTime: This error is most likely due to a problem with your input data.
Please check your input data and try again. If you continue to have problems, please open a new issue including
the original command and the error above:  <https://github.com/nextstrain/augur/issues/new/choose>

Expected output

The error message should provide more specific information about why the alignment loading failed, such as:

  • Is the file format incorrect?
  • Are the sequence IDs mismatched with the tree?
  • Are the sequences the wrong length?
  • Is there a parsing error at a specific line?
  • Any other specific validation failures

Environment

  • augur version: 32.0.0 (using TreeTime version 0.11.4)
  • Python version: 3.13
  • Operating system: macOS

Additional context

The BCRF1.fasta file appears to be properly formatted (contains protein sequences in FASTA format), but the error message doesn't indicate what specifically is wrong. A more descriptive error message would help users quickly identify and fix the issue without having to debug the source code or create an issue.

Attached files

See ancestral_issue.zip containing:

  • results/refined_tree.nwk
  • results/filtered_sequences.fasta
  • defaults/reference.gb
  • results/translations/BCRF1.fasta

ancestral_issue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requesttreetimeUpstream issue with treetime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions