what is the problem with seqinr query function ?
1
1
Entering edit mode
8.4 years ago
Learner ▴ 280

I am trying to use seqnir to retrieve a sequence. Based on a tutorial , I should first open the data based then query and then close the data base

choosebank("genbank") 
naturepaper <- query('naturepaper', 'R=Nature/460/352')
closebank()

But i get this error ,

Error in query("naturepaper", "R=Nature/460/352") : 
  invalid request:"unknown reference at (^): \"R

I tried to understand the problem but I could not find it, ?query is this , so I am using the correct syntax as input

R=refcode

seqs from reference specified such as in jcode/volume/page (e.g., JMB/13/5432)

Any comment ?

r software error • 3.3k views
ADD COMMENT
0
Entering edit mode

It seems like I'm doing the same tutorial ... Little Book of R for Bioinformatics? Yea, I'm getting the same error.

Did you end up figuring this out?

ADD REPLY
2
Entering edit mode
6.3 years ago
Mark ★ 1.6k

This is actually an error from the server. Try this:

naturepaper <- query('naturepaper', 'r=JMB/13/5432', verbose = TRUE)

Output:

I'm checking the arguments...
... and everything is OK up to now.
I'm checking the status of the socket connection...
... and everything is OK up to now.
I'm sending query to server...
... answer from server is: code=7&message="unknown reference at (^): \"r=(^)JMB/13/5432\"" 
I'm trying to analyse answer from server...
... and I was able to detect an error.
Error in query("naturepaper", "r=JMB/13/5432", verbose = TRUE) : 
  invalid request:"unknown reference at (^): \"r
In addition: Warning message:
In while (codeCount + newLen > length(codeBuf)) { :
closing unused connection 3 (->pbil.univ-lyon1.fr:5558)

Digging a bit deeper, it looks like Sequin database is being phased out, and the SeqinR package was originally designed to be a CLI for Sequin.

My guess is that NCBI has updated it's API but seqinr has not followed, causing the error. I would suggest using a different package (and a different tutorial). I like the rentrez package.

Good tutorial here: https://cran.r-project.org/web/packages/rentrez/vignettes/rentrez_tutorial.html

Another one that's highly utitlised is Biomart: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5408848/

ADD COMMENT

Login before adding your answer.

Traffic: 1849 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6