-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[utils] lift error handling to load_features
Both functions which call this would check for a return value of None (indicating that the file didn't exist) and cause the augur function to exit. It's cleaner to lift this into `load_features` and this makes it easier for that function to raise errors in the future (e.g. on malformed/empty reference files).
- Loading branch information
1 parent
912a91b
commit d03ce41
Showing
4 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Setup | ||
|
||
$ export AUGUR="${AUGUR:-$TESTDIR/../../../../bin/augur}" | ||
$ export SCRIPTS="$TESTDIR/../../../../scripts" | ||
$ export ANC_DATA="$TESTDIR/../../ancestral/data/simple-genome" | ||
$ export DATA="$TESTDIR/../data/simple-genome" | ||
|
||
Missing reference file | ||
|
||
$ ${AUGUR} translate \ | ||
> --tree $ANC_DATA/tree.nwk \ | ||
> --ancestral-sequences $ANC_DATA/nt_muts.ref-seq.json \ | ||
> --reference-sequence $DATA/reference.doesnt-exist.gff \ | ||
> --output-node-data "aa_muts.json" > /dev/null | ||
ERROR: reference sequence file '.+/reference.doesnt-exist.gff' not found (re) | ||
[2] |