retrieving only one result using entrez direct
2
0
Entering edit mode
5.6 years ago
Lille My ▴ 30

Hi all, I'm retrieving proteins using entrez direct esearch. My search words retrieve many proteins, and I only need the first few results. I could do this with bash, but it takes time to retrieve all the results and I would like to know if there is a way to do it with esearch.

 esearch -db protein -query rubisco | efetch -format fasta
edirect ncbi • 2.0k views
ADD COMMENT
2
Entering edit mode
5.6 years ago
vkkodali_ncbi ★ 3.8k

Add -stop 5 to your efetch to limit to 5 hits.

ADD COMMENT
0
Entering edit mode
ADD COMMENT
0
Entering edit mode

This:

esearch -db protein -query rubisco | efetch -retmax 5 -format fasta

doesn't work. I get the efetch error message saying that retmax is an unknown option. Thanks!

ADD REPLY
0
Entering edit mode

it's a param for esearch

ADD REPLY
0
Entering edit mode

Thanks, but I get a similar error message saying that this is not a valid parameter for esearch.

ADD REPLY

Login before adding your answer.

Traffic: 2026 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