Comments (6)
You may want to take a look at the gene2pubmed.gz
file to see if you can use data from there. For a given list of taxids, you can get a list of all PMIDs associated with each GeneID. From there, you can probably join the PDAT for each PMID.
from edirectcookbook.
Hi
I have gotten this far. For an example gene id (816394) in taxon Arabidopsis thaliana (txid3702) I can get the count of all the pubmed articles related to this gene
esearch -db gene -query "txid3702[Organism:exp] AND 816394[UID]" | elink -target pubmed
After this the next step is to download in xml or docsum format the articles and filter the articles by date [PDAT] of publication. This is the strategy I am using. I used this next command but the error was "Too many requests"
esearch -db gene -query "txid3702[Organism:exp] AND 816394[UID]" | elink -target pubmed | efetch -format xml | xtract -pattern PubmedArticle -element PubDate
I don't know how to get around this. Thanks for the help
from edirectcookbook.
the error was "Too many requests"
Are you using the eUtils API keys?
from edirectcookbook.
Hi vkkodali
The initial part of the error looks like below
429 Too Many Requests
No do_post output returned from 'https://eutils.be-md.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&query_key=3&WebEnv=NCID_1_19870438_130.14.18.97_9001_1553967351_471391598_0MetA0_S_MegaStore&rettype=text&retmode=text&retstart=0&retmax=100&edirect=7.40&tool=edirect&email=sanyalab@lxjh218'
Result of do_post http request is
$VAR1 = bless( {
'_protocol' => 'HTTP/1.1',
'_content' => '{"error":"API rate limit exceeded","api-key":"170.54.61.190","count":"4","limit":"3"}',
'_rc' => 429,
'_headers' => bless( {
'connection' => 'close',
'x-ratelimit-limit' => '3',
'date' => 'Sat, 30 Mar 2019 17:35:51 GMT',
'vary' => 'Accept-Encoding',
'client-peer' => '130.14.29.110:443',
In the latter part I get a truncated output. The query should yield me 154 articles. I get 54. Thanks for the help.
from edirectcookbook.
You need to create an API key as mentioned in the 'How do I get a key?' section here. After that, you need to either run the following command before executing esearch
, or for a moe permanent fix, add it to your .bashrc
file:
export NCBI_API_KEY='abcdef1234567890'
from edirectcookbook.
It worked!!! Thanks a bunch vkkodali.
One unrelated comment. I download specific EST, cDNA datasets from NCBI every quarter. I use a combination of epost and efetch. There too I face this issue sometimes, and I rerun after a gap of 250 seconds. exporting the API_KEY should take care of this too right?
Thanks for your help
from edirectcookbook.
Related Issues (20)
- How to use xtract to get <name value> pairs of all the attributes?
- The “-if” and “-unless” statements in xtract did not seem to work for me when extracting Attributes in BioSample HOT 3
- The efetch command reported BioSamples’ Attributes completely different from those displayed at the NCBI website HOT 2
- Get entries that have specific keyword in the tag "Isolation source"
- get nucleotide sequence by gene ID HOT 12
- Get Transcription Factors ChiP-seq experiments
- The importance of adding < /dev/null with while loops
- Retrieve Bioproject IDs and related SRAs within given timerange HOT 2
- curl: (60) SSL certificate problem: unable to get local issuer certificate
- Citation List
- Overall design
- Retrieve bioproject IDs and SRA IDs from PMIDs? HOT 3
- getting the fastq reads from accession ids HOT 1
- Download 1,000 Random Human RefSeq Transcripts HOT 2
- Downloading FASTA Records with GI Number via efetch? HOT 2
- Download Symbol via EFetch HOT 9
- Retrieve all metadata from edirect that is accessible from SRArunTable
- Get coding sequences for a gene id HOT 2
- How to merge data from two different databases into one output file? HOT 3
- How to print an empty field if no data is found?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edirectcookbook.