Export: Add safety checks for annotations and geo #211
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.
I was just starting on a tutorial for visualizing BEAST trees in auspice. You can see the tutorial here: https://github.com/nextstrain/mers-beast-tutorial. In putting this together I discovered an issue with
augur export
expectingannotations
andgeo
to be present. This PR corrects this.When exporting BEAST trees (or generally trees that haven't passed through augur geo traits and augur translate), we lack
annotations
orgeo
. This adds safety checks to only attempt to includeannotations
andgeo
when actually present.There should be nothing controversial here and no functionality has changed.