[Bioperl-l] swissprot giving no id exception

Jason Stajich jason@cgt.mc.duke.edu
Sat, 13 Apr 2002 00:11:40 -0400 (EDT)


We make sure the VERSION is Bio::Seq module reflects the version number
of the package.

% perl -MBio::Seq -e 'print "Version is ", $Bio::Seq::VERSION, "\n";'

As to your problem - stream mode should be working - we have a test for
this in the DB.t test so it may be something specific about the accession
numbers - I would first try and retrieve the seqs by doing

my @seqs;
foreach my $acc ( @accs ) {
  my $seq = $db->get_Seq_by_acc($acc);
  push @seqs, $seq;
}

FYI - you can try and debug code yourself by turning on the debug flag

my $sp = new Bio::DB::SwissProt(-verbose => 1);

See Bio::Root::Root /Bio::Root::RootI for more information about how the
verbose flag works (setting it to 1 will print out the debug statements
in the SwissProt module).


-j
On Fri, 12 Apr 2002, Guoneng Zhong wrote:

> I thought I have BioPerl 1.0.  How do I find out?  I thought I installed
> Bundle::BioPerl from CPAN, does that not work?  Actually, all it said,
> after installing the necessary modules, was that the modules all check
> out ok....
>
> Is there a version or some trick I can use to find out which version is
> on the system?
>
> G
>
> On Friday, April 12, 2002, at 09:26  PM, Jason Stajich wrote:
>
> > Which version of bioperl?
> >
> > On Fri, 12 Apr 2002, Guoneng Zhong wrote:
> >
> >> Hi,
> >> I am wondering if others have this problem.  Here's my code, followed
> >> by
> >> the exception thrown.  I get the same exception when I try to do a
> >> next_seq on the sequenceIO object.  The array of ids I send is verified
> >> to contain non-empty ids.  Now, I can't guarantee tht those ids are
> >> valid, but if they are not, must an exception be thrown to ruin the
> >> whole process?  I tried to "catch" the exception using "eval" but
> >> stranger things happen, like next_seq would give me the same sequence
> >> again!
> >>
> >> Thanks in advance!
> >> G
> >>
> >> 		my $sp = new Bio::DB::SwissProt;
> >> 		my $sequenceIO = $sp->get_Stream_by_acc(\@ids);
> >> 		my $fh = $sequenceIO->fh;
> >> 		my $tmp = <$fh>;
> >>
> >>
> >> -------------------- EXCEPTION --------------------
> >> MSG: swissprot stream with no ID. Not swissprot in my book
> >> STACK Bio::SeqIO::swiss::next_seq /Library/Perl/Bio/SeqIO/swiss.pm:155
> >> STACK Bio::SeqIO::READLINE /Library/Perl/Bio/SeqIO.pm:570
> >> STACK HypotheticalProteinSearch::retrieveSequences
> >> HypotheticalProteinSearch.pm:37
> >> STACK main::retrieveList retrieve_gpi.pl:54
> >> STACK toplevel retrieve_gpi.pl:14
> >> -------------------------------------------
> >>
> >> _______________________________________________
> >> Bioperl-l mailing list
> >> Bioperl-l@bioperl.org
> >> http://bioperl.org/mailman/listinfo/bioperl-l
> >>
> >
> > --
> > Jason Stajich
> > Duke University
> > jason@cgt.mc.duke.edu
> >
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason@cgt.mc.duke.edu