Skip to content

ENH: Make aa_muts optional for augur clades #1154

@corneliusroemer

Description

@corneliusroemer

Currently we seem to require aa_muts in augur clades despite them not being required if the clades.tsv doesn't contain any defining amino acid mutations.

Also, if no aa_muts node_json is passed, one gets a cryptic error. Usability could be improved there.

Example if not passing aa_muts:

Validating schema of 'results/nt_muts.json'...
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/nextstrain/lib/python3.10/site-packages/augur/__init__.py", line 67, in run
    return args.__command__.run(args)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/nextstrain/lib/python3.10/site-packages/augur/clades.py", line 282, in run
    clade_membership = assign_clades(clade_designations, all_muts, tree, ref)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/nextstrain/lib/python3.10/site-packages/augur/clades.py", line 192, in assign_clades
    tree.root.sequences.update({gene:{} for gene in all_muts[tree.root.name]['aa_muts']})
KeyError: 'aa_muts'


An error occurred (see above) that has not been properly handled by Augur.
To report this, please open a new issue including the original command and the error above:
    <https://github.com/nextstrain/augur/issues/new/choose>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions