Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read.names.sql for common names #48

Closed
meixilin opened this issue Sep 2, 2022 · 2 comments
Closed

read.names.sql for common names #48

meixilin opened this issue Sep 2, 2022 · 2 comments

Comments

@meixilin
Copy link

meixilin commented Sep 2, 2022

Hi,

Thanks for making this great package. I am wondering if there could be any SQL support for the common names? It will be nice if taxonomizr::getTaxonomy(ids = uids, sqlFile = mysql) could give an option for returning the common names in the NCBI taxonomy dump files, in addition/other than only scientific names.

Thank you!

@sherrillmix
Copy link
Owner

Hmm that's a good suggestion. We've got getId to go from common name to accession but not the inverse. I hadn't been keeping the name type column in the sqlite database so I'll have to add that back in so people can filter by "common name" or whatever name type they want.

I think I've got the rough framework set up. I'll take a poke at polishing it up this weekend and aim to get a version up on github soon.

@sherrillmix
Copy link
Owner

Got a bit sidetracked but this should be implemented in v0.9.4 now on github. For example:

getCommon(c(9913,9606),'accessionTaxa.sql')

## [[1]]
##                         name                type
## 1                  Bos bovis             synonym
## 2     Bos primigenius taurus             synonym
## 3  Bos taurus Linnaeus, 1758           authority
## 4                 Bos taurus     scientific name
## 5      Bovidae sp. Adi Nefas            includes
## 6                     bovine         common name
## 7                     cattle genbank common name
## 8                        cow         common name
## 9                  dairy cow         common name
## 10           domestic cattle         common name
## 11              domestic cow         common name
## 12                        ox         common name
## 13                      oxen         common name
## 
## [[2]]
##                          name                type
## 1 Homo sapiens Linnaeus, 1758           authority
## 2                Homo sapiens     scientific name
## 3                       human genbank common name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants