Export ancestral AA sequences for tree's root node #1317
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
Fixes a bug in the new
augur ancestral
interface for amino acid sequences where the output JSON was missing an entry for "aa_sequences" for the root node that downstream tools likeaugur clades
relied on. Theaugur translate
output creates this entry [1], so workflows that use the nucleotideancestral
followed by thetranslate
command would not be affected. Workflows that use the newancestral
command would be affected in cases whereaugur clades
looks for amino acid mutations that only exist in the root node and not on any subsequent branches (e.g., for seasonal influenza B/Victoria's NA tree).[1]
augur/augur/translate.py
Lines 291 to 295 in b299059
Examples
Below is an example of a broken subclade annotation for a B/Vic NA tree when the MRCA doesn't date back far enough for subclade amino acid substitutions to occur on branches descending from the root.
In contrast, a recent public Vic NA tree has older sequences, so the MRCA dates back farther and subclades appear as expected.
Re-running
augur ancestral
andaugur clades
on the first Vic NA tree above from the code in this PR produces this tree with the expected subclades.Related issue(s)
Related to #1258
Checklist