Question: retrieving only one result using entrez direct
0
gravatar for Lille My
4 weeks 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 • 172 views
ADD COMMENTlink modified 4 weeks ago by vkkodali1.1k • written 4 weeks ago by Lille My30
2
gravatar for vkkodali
4 weeks ago by
vkkodali1.1k
United States
vkkodali1.1k wrote:

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

ADD COMMENTlink written 4 weeks ago by vkkodali1.1k
0
gravatar for Pierre Lindenbaum
4 weeks ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

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

-retmax 1
ADD COMMENTlink written 4 weeks ago by Pierre Lindenbaum120k

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 4 weeks ago by Lille My30

it's a param for esearch

ADD REPLYlink written 4 weeks ago by Pierre Lindenbaum120k

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

ADD REPLYlink written 4 weeks 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: 906 users visited in the last hour