Status 429 with message "Too Many Requests" in response to NCBI URL
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to access protein information from NCBI using the 'getgenpept' command but I get this error and my computer crashes after. I'm wondering if I could get some assistance with fixing this issue.
Code:
s = getgenpept('C4QWH2');
seqviewer(s)
Error:

0 commentaires
Réponses (1)
Arthur Goldsipe
le 29 Juil 2021
As described here, you are seeing the error because NCBI limits the number of queries from a particular IP address to 3 per second, unless you use an API key. We plan to update the Bioinformatics Toolbox functions to support the use of API keys in a future release.
In this paticular case, the problem is that multiple queries happen as getgenpept tries different query options. I can think of a few ways to work around this. One solution would be to put a small pause between queries. If you have permission to edit the files in your installation, you could edit getncbidata.m (located in folder <matlabroot>\toolbox\bioinfo\bioinfo\private) and insert something like pause(0.5) just before the end of the for loop that includes a call to webread. If you don't have permission to edit this file, you could also manually pause by setting a breakpoint at a similar location and wait a second before continuing whenever you hit the breakpoint.
-Arthur (he/him)
0 commentaires
Voir également
Catégories
En savoir plus sur Data Import and Export dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!