Russell Smithies | 21 Jul 22:03 2013
Picon

Re: MSG: Response Error STACK: Error::throw when trying to download genbank files using GI

I think you'll only get the sequence back from the CDS feature so that may be the source of one of your first
error, try adding a test:

                if ( $feat_object->primary_tag eq "CDS" ) {
                        my $sequence_string  = $feat_object->spliced_seq->seq;
                }

The second one is probably NCBI timing out. It's generally better to do a bulk download then post-process
with BioPerl to avoid this problem.

--Russell

-----Original Message-----
From: bioperl-l-bounces <at> lists.open-bio.org [mailto:bioperl-l-bounces <at> lists.open-bio.org] On
Behalf Of Shaghayegh Hosseini
Sent: Saturday, 20 July 2013 1:29 a.m.
To: bioperl-l <at> bioperl.org
Subject: [Bioperl-l] MSG: Response Error STACK: Error::throw when trying to download genbank files
using GI

Hi,

I am trying to fetch genebank features,here is the script

use strict;

use warnings;

use Bio::SeqIO;

use Bio::DB::EUtilities;

my $gi="385220095";

my  $factoryID = Bio::DB::EUtilities->new(-eutil => 'efetch',

                                          -db =>'protein',

                                          -rettype=> 'gbwithparts',

                                          -email=> 'x <at> y.com',

                                          -id=>$gi) ;

my $gbfile="$gi.gbk";

$factoryID->get_Response(-file =>$gbfile);

my $seqio_object = Bio::SeqIO->new(-file =>"$gbfile",'protein');

while ( my $seq_object=$seqio_object->next_seq){

    for my $feat_object ($seq_object->get_SeqFeatures) {

        my $sequence_string = $feat_object->spliced_seq->seq;

    }

}

I have got 2 problems

1. For some GIs I am getting (MSG: seq doesn' t validate, mismatch or MSG:
Got a sequence with no letters in it cannot guess alphabet )which is  annoying since I have about 2000 GIs  and
for half of them this warnings are there BUT  it  does the job.

2. After  downloading lets say 1000 file I am getting Error (MSG: Response Error STACK: Error::throw or Bad Gateway)

Please let me know what I have done wrong

This  is the ERROR for First problem

--------------------- WARNING ---------------------

MSG: seq doesn't validate, mismatch is 266299291214720428459636348159

---------------------------------------------------

------------- EXCEPTION: Bio::Root::Exception -------------

MSG: Attempting to set the sequence to [266299291214720428459636348159] which does not look healthy

STACK: Error::throw

STACK: Bio::Root::Root::throw /Bioperl/1.6.1/lib/perl5/Bio/Root/Root.pm:368

STACK: Bio::PrimarySeq::seq /Bioperl/1.6.1/lib/perl5/Bio/PrimarySeq.pm:283

STACK: Bio::PrimarySeq::new Bioperl/1.6.1/lib/perl5/Bio/PrimarySeq.pm:234

STACK: Bio::Seq::new /Bioperl/1.6.1/lib/perl5/Bio/Seq.pm:497

STACK: Bio::SeqFeatureI::spliced_seq
/Bioperl/1.6.1/lib/perl5/Bio/SeqFeatureI.pm:618

-----------------------------------------------------------
_______________________________________________
Bioperl-l mailing list
Bioperl-l <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l

=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================

Gmane