traits icon indicating copy to clipboard operation
traits copied to clipboard

odd errors with sequence length queries at ncbi_byname

Open kdlafferty opened this issue 4 years ago • 8 comments

"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

kdlafferty avatar Jan 03 '22 02:01 kdlafferty

👋🏽 previous maintainer here. this pkg is no longer maintained. you can still use it of course

sckott avatar Jan 03 '22 14:01 sckott

thanks. Will use Rentrez instead.

kdlafferty avatar Jan 03 '22 21:01 kdlafferty

This repository is about to be archived.

maelle avatar Sep 09 '22 12:09 maelle

👋🏻 new maintainer here: package is now unarchived

dlebauer avatar Sep 13 '22 01:09 dlebauer

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?

dlebauer avatar Sep 13 '22 01:09 dlebauer

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?

boopsboops avatar Oct 07 '22 10:10 boopsboops

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 avatar May 18 '24 05:05 dlebauer

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

dlebauer avatar May 18 '24 05:05 dlebauer