Skip to content

Commit

Permalink
Add apply-geolocation-rules test
Browse files Browse the repository at this point in the history
  • Loading branch information
joverlee521 committed Jun 26, 2024
1 parent 81af0aa commit b80bc4e
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Setup

$ export AUGUR="${AUGUR:-$TESTDIR/../../../../../bin/augur}"

Test an exact rule with duplicate raw entries applies the last matching annotation.
Verifies that we can override "default" rules by appending custom rules.

$ cat >rules.tsv <<~~
> r_raw/c_raw/d_raw/l_raw r_annotated/c_annotated/d_annotated/l_annotated
> r_raw/c_raw/d_raw/l_raw r_annotated_custom/c_annotated_custom/d_annotated_custom/l_annotated_custom
> ~~

It applies the last rules that matched.

$ echo '{"region": "r_raw", "country": "c_raw", "division": "d_raw", "location": "l_raw"}' \
> | ${AUGUR} curate apply-geolocation-rules \
> --geolocation-rules rules.tsv
{"region": "r_annotated_custom", "country": "c_annotated_custom", "division": "d_annotated_custom", "location": "l_annotated_custom"}

0 comments on commit b80bc4e

Please sign in to comment.