This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Entrez progammaticly: Direct efetch or epost + efetch

Hi all,

I developed a tool in Perl to download an mount of data given entries list.

The tool are working nicely at the moment.

My script receive a large list of accession number and mount URL directly to efetch. Like above:

    my $base = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?';
    my %p = (
            'db' => $db,
            'id' => join(",", @$ids),
            'retmode' => 'text',
            'rettype' => 'fasta', #$format,
    );
    my $url = $base . join("&", map {$_ . "=" . $p{$_}} keys %p);

Each request has no more then 500 entries. 3 request followed by 1sec of sleep.

Entrez NCBI recommend use epost and history => https://www.ncbi.nlm.nih.gov/books/NBK25497/

My question is: Do I really need use EPost to send the ids for latter efetch or can I follow using direct efetch as I'm doing?

Tnks in advance

entrez epost efetch

Follow NCBI's recommendation even if your solution works. You way will be noticed by NCBI sooner or later and then may get your IP banned for a period time, if you are causing problems on their end.

If you are just retrieving fasta sequences, using blastdbcmd from blast+ and local blast database indexes works much faster.

0 answers

No answers yet.

Log in to answer this question.