Skip to content

Commit

Permalink
warn if exporting using a v6 translate file
Browse files Browse the repository at this point in the history
  • Loading branch information
emmahodcroft committed Oct 29, 2019
1 parent 5a3e6a1 commit 9f1c8f6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion augur/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,23 @@ def process_annotations(node_data):
# treetime adds "annotations" to node_data
if "annotations" not in node_data: # if haven't run tree through treetime
return None
return node_data["annotations"]
v6_type_file = False
annotations = {}
for name, info in node_data["annotations"].items():
if info['strand'] in ['+','-']:
v6_type_file = True
annotations[name] = {
"start": info["start"]-1,
"end": info["end"],
"strand": 0 if info["strand"] == "-" else 1
}
if v6_type_file:
print("\nWARNING - The supplied amino acid mutations file appears to have been made"
" in a NEWER version of augur. We have attempted to convert it, but recommend re-running"
" the 'translate' step with this augur version, then running 'export' again.")
return annotations
else:
return node_data["annotations"]

def process_panels(user_panels, meta_json, nextflu=False):
try:
Expand Down

0 comments on commit 9f1c8f6

Please sign in to comment.