Sage-Bionetworks / porTools

This package helps maintain content in Sage portals.
0 stars 4 forks source link

Allow use of NCBI API key #12

Open lakikowolfe opened 2 years ago

lakikowolfe commented 2 years ago

To increase NCBI request rate of 3 requests / second to 10 request /second an API key needs to be created and provided.

Notes on NCBI API Keys from rentrez tutorial:

By default, the NCBI limits users to making only 3 requests per second (and rentrez enforces that limit). Users who register for an "API key" are able to make up to ten requests per second. Getting one of these keys is simple, you just need to register for "my ncbi" account then click on a button in the account settings page.

Once you have an API key, rentrez will allow you to take advantage of it. For one-off cases, this is as simple as adding the api_key argument to given function call.

If you use rentrez often you should edit your .Renviron file (see r help(Startup) for description of this file) to include your key. Doing so will mean all requests you send will take advantage of your API key. ENTREZ_KEY=ABCD123

Originally posted by @lakikowolfe in https://github.com/Sage-Bionetworks/porTools/issues/10#issuecomment-1082256331

milen-sage commented 2 years ago

@ychae this is related to pubcrawl+. Not sure if there is a label/milestone for this yet. Not urgent but we may want to revisit in a couple of months.

ychae commented 2 years ago

@milen-sage Added in a milestone and marked it for mid-August for notification purposes in a couple months.