Status 429 with message "Too Many Requests" in response to NCBI URL

7 ビュー (過去 30 日間)
Sobhana Sripada
Sobhana Sripada 2021 年 7 月 29 日
回答済み: Arthur Goldsipe 2021 年 7 月 29 日
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:

回答 (1 件)

Arthur Goldsipe
Arthur Goldsipe 2021 年 7 月 29 日
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)

カテゴリ

Help Center および File ExchangeProtein and Amino Acid Sequence Analysis についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by