Skip to content

Commit

Permalink
cram: Add filter-query-and-exclude-ambiguous-dates-by test
Browse files Browse the repository at this point in the history
Shows the interaction between the query and exclude-ambiguous-dates-by
options. This test currently passes on master (as of 1d92f6d)
but fails on the victorlin/revert-pandas-query-variable-extraction branch
(as of 5907992).
  • Loading branch information
joverlee521 committed Aug 11, 2023
1 parent 5907992 commit 92c2500
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Setup

$ source "$TESTDIR"/_setup.sh

Create metadata TSV file for testing.

$ cat >metadata.tsv <<~~
> strain date region
> SEQ_1 2020 Asia
> SEQ_2 2020 Asia
> SEQ_3 2020 Asia
> SEQ_4 2020 North America
> ~~

Confirm that `--exclude-ambiguous-dates-by` works for all year only ambiguous dates.

$ ${AUGUR} filter \
> --metadata metadata.tsv \
> --query 'region=="Asia"' \
> --exclude-ambiguous-dates-by any \
> --empty-output-reporting silent \
> --output-strains filtered_strains.txt
4 strains were dropped during filtering
\t1 of these were filtered out by the query: "region=="Asia"" (esc)
\t3 of these were dropped because of their ambiguous date in any (esc)
0 strains passed all filters

0 comments on commit 92c2500

Please sign in to comment.