I am trying to fetch genebank features, this code works for some GenbankIDs but not for this one as an example.
use strict;
use warnings;
use Bio::SeqIO;
use Bio:B::EUtilities;
my $gi="385220095";
my $factoryID = Bio:B::EUtilities->new(-eutil => 'efetch',
-db =>'protein',
-rettype=> 'gbwithparts',
-email=> '[email protected]',
-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;
}
}
use strict;
use warnings;
use Bio::SeqIO;
use Bio:B::EUtilities;
my $gi="385220095";
my $factoryID = Bio:B::EUtilities->new(-eutil => 'efetch',
-db =>'protein',
-rettype=> 'gbwithparts',
-email=> '[email protected]',
-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;
}
}
Comment