Question: retrieving only one result using entrez direct
0
gravatar for Lille My
12 months ago by
Lille My30
Lille My30 wrote:

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 • 397 views
ADD COMMENTlink modified 5 months ago by visesay6520 • written 12 months ago by Lille My30
2
gravatar for vkkodali
12 months ago by
vkkodali2.0k
United States
vkkodali2.0k wrote:

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

ADD COMMENTlink written 12 months ago by vkkodali2.0k
0
gravatar for Pierre Lindenbaum
12 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum128k wrote:

https://www.ncbi.nlm.nih.gov/books/NBK179288/

-retmax 1
ADD COMMENTlink written 12 months ago by Pierre Lindenbaum128k

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 REPLYlink written 12 months ago by Lille My30

it's a param for esearch

ADD REPLYlink written 12 months ago by Pierre Lindenbaum128k

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

ADD REPLYlink written 12 months ago by Lille My30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1011 users visited in the last hour