Commit df000ad
authored
feat(taxonomy): Indexed, case-insensitive scientific_name queries of NCBI taxonomy DB (#6170)
Updating the index on scientific_name in the NCBI taxonomy database to
allow for indexed, case-insensitive queries using user-supplied
scientific host names. This will be a slightly nicer user-experience
once we implement host name validation in prepro.
Current implementation:
-> user gives us `hostNameScientific: aedes aegypti`
-> DB stores `scientific_name: Aesdes aegypti`
-> error: hostNameScienitific not found
New implementation allows for:
-> user gives us `hostNameScientific: aedes aegypti`
-> DB stores `scientific_name: Aesdes aegypti`
-> {"tax_id":7159,"common_name":"yellow fever
mosquito","scientific_name":"Aedes
aegypti","parent_id":53541,"depth":28}
## Manual tests:
I reran the DB creation script, connected using `sqlite3`, and ran:
```sql
sqlite> SELECT * FROM taxonomy WHERE scientific_name = 'aedes aegypti' COLLATE NOCASE;
tax_id|common_name|scientific_name|parent_id|depth
7159|yellow fever mosquito|Aedes aegypti|53541|28
```
### PR Checklist
- [x] All necessary documentation has been adapted.
- [x] The implemented feature is covered by appropriate, automated
tests.
- [x] Any manual testing that has been done is documented (i.e. what
exactly was tested?)
🚀 Preview: Add `preview` label to enable1 parent 1a5aca3 commit df000ad
3 files changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
0 commit comments