Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve error handling with hint #816

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion augur/refine.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ def run(args):
elif args.root in ['least-squares', 'min_dev', 'oldest']:
raise TypeError("The rooting option '%s' is only available when inferring a timetree. Please specify an explicit outgroup."%args.root)
else:
T.root_with_outgroup(args.root)
try:
T.root_with_outgroup(args.root)
except ValueError as err:
raise ValueError(f"HINT: This error may be because your specified root with name '{args.root}' was not found in your alignment file") from err

tt = TreeAnc(tree=T, aln=aln, ref=ref, gtr='JC69', verbose=1)

Expand Down