Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1418: filter: Read all metadata columns when quer…
…y parsing fails
- Loading branch information
Showing
4 changed files
with
59 additions
and
2 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
32 changes: 32 additions & 0 deletions
32
tests/functional/filter/cram/filter-query-backtick-quoting.t
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,32 @@ | ||
Setup | ||
|
||
$ source "$TESTDIR"/_setup.sh | ||
|
||
Create metadata file for testing. | ||
|
||
$ cat >metadata.tsv <<~~ | ||
> strain region name | ||
> SEQ_1 A | ||
> SEQ_2 A | ||
> SEQ_3 B | ||
> SEQ_4 | ||
> ~~ | ||
The 'region name' column is query-able by backtick quoting. | ||
$ ${AUGUR} filter \ | ||
> --metadata metadata.tsv \ | ||
> --query '(`region name` == "A")' \ | ||
> --output-strains filtered_strains.txt > /dev/null | ||
WARNING: Could not infer columns from the pandas query. Reading all metadata columns, | ||
which may impact execution time. If the query is valid, please open a new issue: | ||
<https://github.com/nextstrain/augur/issues/new/choose> | ||
and add the query to the description: | ||
(`region name` == "A") | ||
$ sort filtered_strains.txt | ||
SEQ_1 | ||
SEQ_2 |
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