ropensci / traits

R package for accessing species trait data from multiple databases
Other
41 stars 13 forks source link

odd errors with sequence length queries at ncbi_byname #126

Open kdlafferty opened 2 years ago

kdlafferty commented 2 years ago

"ncbi_byname" works great most of the time (thanks!), but with limited testing fails about 5%. Which makes searching long lists of species cumbersome. It seems like there are some sequences in ncbii that lead to glitches, and these can be avoided by limiting the length ranges. But it is otherwise unclear why some of these queries fail consistently and other succeed or how to add options to get around it.

I should specify that my goal is to get a longish sequence by gene/species combination. across many species and many genes (for metabarcoding primer selection).

In Rstudio. ncbi_byname(taxa="Coryphaena hippurus", gene = c("Coi"), seqrange = "1:2000")#fails ncbi_byname(taxa="Coryphaena hippurus", gene = c("Coi"), seqrange = "500:750")#fails ncbi_byname(taxa="Coryphaena hippurus", gene = c("Coi"), seqrange = "600:2000")#works ncbi_byname(taxa="Sardinops melanostictus", gene = c("12s"), seqrange = "1:2000")#fails ncbi_byname(taxa="Sardinops melanostictus", gene = c("12s"), seqrange = "1:1000")#works ncbi_byname(taxa="Sardinops melanostictus", gene = c("12s"), seqrange = "170:1000")#works ncbi_byname(taxa="Sardinops melanostictus", gene = c("12s"), seqrange = "170:2000")#fails

sckott commented 2 years ago

šŸ‘‹šŸ½ previous maintainer here. this pkg is no longer maintained. you can still use it of course

kdlafferty commented 2 years ago

thanks. Will use Rentrez instead.

maelle commented 2 years ago

This repository is about to be archived.

dlebauer commented 2 years ago

šŸ‘‹šŸ» new maintainer here: package is now unarchived

dlebauer commented 2 years ago

This error still appears to occur in all of the examples above.

Is this worth resolving? e.g. do the ncbi* functions still provide a value, or does the rentrez package provide the needed functionality, such that the ncbi* functions in this package could be deprecated?

boopsboops commented 2 years ago

Is this worth resolving? e.g. do the ncbi* functions still provide a value, or does the rentrez package provide the needed functionality, such that the ncbi* functions in this package could be deprecated?

For what it's worth, I use ncbi_byid() function a lot because it returns a nice table. In fact I just noticed this thread when I came here to ask about how to best to fix the http version in the function because it now gives intermittent "Error in the HTTP2 framing layer" errors.

Might be related to OP's problem? Is it worth posting an issue about this?

dlebauer commented 5 months ago

Sorry this took so long. This should be resolved in PR #132

To test it out while the PR is still open:

install.packages("remotes")
remotes::install_github("ropensci/traits@129_ncbi_byname_error") 

If someone checks that this works, that would be much appreciated.

And double points if you are able to provide feedback on the PR!

dlebauer commented 5 months ago

@boopsboops if you found an error with ncbi_byid to report, please do! It would be good to have it documented.