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

No taxon_rank information when parsing from NCBI taxonomy #203

Open
janstrauss1 opened this issue Dec 6, 2019 · 1 comment
Open

No taxon_rank information when parsing from NCBI taxonomy #203

janstrauss1 opened this issue Dec 6, 2019 · 1 comment

Comments

@janstrauss1
Copy link

Hi there,

I'm looking up taxonomic data from NCBI taxon IDs that I would like to subsequently filter using taxon_ranks == "species".

Unfortunately, it seems that NCBI taxon rank information is not parsed when using lookup_tax_data?!

Below a reproducible example:

tax_ids <- data.frame(ID = c("9606","10090","4932"))

taxmap <- lookup_tax_data(
  tax_data = tax_ids,
  type = "taxon_id",
  column = 1,
  datasets = list(),
  mappings = c(),
  database = "ncbi",
  include_tax_data = TRUE,
  use_database_ids = TRUE,
  ask = TRUE
)

Calling taxon_ranks(taxmap) returns

> taxon_ranks(taxmap)
 131567    2759   33154   33208    4751    6072  451864   33213    4890   33511  716545    7711  147537   89593    4891    7742    4892    7776 
     NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA 
   4893  117570    4930  117571    4932    8287 1338369   32523   32524   40674   32525    9347 1437010  314146    9443  314147  376913    9989 
     NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA 
 314293 1963758    9526  337687  314295   10066    9604   39107  207598   10088    9605  862507    9606   10090 
     NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA      NA 

How could I get the taxon rank information from NCBI?
Many thanks in advance for your help!

@zachary-foster
Copy link
Collaborator

Hello @janstrauss1,

Thanks for the note, I just added that functionality. Try it with the dev version:

devtools::install_github("ropensci/taxa")

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