[Bioperl-l] swissprot giving no id exception

Jason Stajich jason@cgt.mc.duke.edu
Mon, 15 Apr 2002 10:13:04 -0400 (EDT)


You're missing a comma or something in your object initialization- if you
read the error message you see that you are telling it you want the format
to be verbose - this is improper.

You are going to have to provide us with code and exact accession numbers
that are causing your problems so we can duplicate the problem.

The stream part does work as we have tests in the test suite for this
(DB.t)  so I would suggest running
% perl -I. -w t/DB.t

to make sure all is working for you - look at that code to be sure you are
using things properly.

If you can provide a code snippet that duplicates your problem we'll have
an easier time tracking down any problems.



On Mon, 15 Apr 2002, Guoneng Zhong
wrote:

> Yup, my version was like 0.7.  So I downloaded the tar ball from bioperl
> site and installed it.
>
> However, the problem persists (with the exception thrown).  I tried
> adding a verbose flag as you recommended, and this is what I got:
>
> -------------------- WARNING ---------------------
> MSG: Requested Format verbose is ignored because only SwissProt and
> Fasta formats are currently supported
> ---------------------------------------------------
> ------------- EXCEPTION  -------------
> MSG: Must specify a known host, not 1, possible values (uk)
> STACK Bio::DB::SwissProt::hostlocation
> /Library/Perl/Bio/DB/SwissProt.pm:375
> STACK Bio::DB::SwissProt::new /Library/Perl/Bio/DB/SwissProt.pm:166
> STACK HypotheticalProteinSearch::retrieveSequences
> HypotheticalProteinSearch.pm:35
> STACK main::retrieveList retrieve_gpi.pl:56
> STACK toplevel retrieve_gpi.pl:15
>
> --------------------------------------
>
>
> I will now try using just one accession number at a time.  Strange how
> the stream didn't work...
>
> G
>
> On Saturday, April 13, 2002, at 12:11 AM, Jason Stajich wrote:
>
> > 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
> >
> >
> >
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

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