Question: Efetch from nuccore db using URL / Perl fails with Bad Gateway error for GenBank, but succeeds for FASTA.
0
gravatar for senthil.ramamurthy
14 months ago by
senthil.ramamurthy0 wrote:

Hello all,

My previously working perl script to fetch a given region suddenly has failed. I use the Bio::DB::EUtilities library as shown below.

    use strict;
    use warnings;
    use Bio::DB::EUtilities;

    my $result = Bio::DB::EUtilities->new(                  -eutil => 'efetch',
                                            -db => 'nucleotide',
                                            -rettype => 'gb',
                                            -email => 'validemail@gmail.com'
                                            );

    $result->set_parameters(     -id => '568815579',
                             -seq_start => '1',
                             -seq_stop => '100',
                             -strand => '2'
                            );

    $result->get_Response(-file => 'result.gb');

However, the above code works if I change the "rettype" parameter from gb to fasta. I tried the web (URL) version to debug and I noticed similar behavior. The same URL with FASTA as rettype worked, but if the rettype was changed to gb it failed with a bad gateway error.

This URL below works for the FASTA format

    https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=568815579&strand=2&seq_start=1&seq_stop=100&rettype=fasta&retmode=text

This URL for GB format fails with a Bad Gateway error after a few minutes

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=568815579&strand=2&seq_start=1&seq_stop=100&rettype=gb&retmode=text

Can some one please advice on what I'm doing wrong, or if anything has changed recently in efetch usage?

Thank you

Senthil

nucelotide nuccore eftech • 523 views
ADD COMMENTlink written 14 months ago by senthil.ramamurthy0
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: 760 users visited in the last hour