[Bioperl-l] Re: [Bioperl-guts-l] Notification: incoming/930

Jason Stajich jason@chg.mc.duke.edu
Wed, 21 Mar 2001 13:47:33 -0500 (EST)


if you want to see all the messages pass in -verbose=>1 to your
Bio::SeqIO object .. ie
my $seqio = new Bio:SeqIO(-verbose => 1, -format => 'genbank', -file =>
'file');

This probably won't help except give you an idea of where it was last
since the error is killing the script not throwing an exception (it
is trying to dereference a null seq feature object).

I really want to rework the SeqIO parsing modules/Feature table parsing
stuff to do a better job (with some eval's to protect us from these
uninformative errors), but until that time you're going to have to get
nasty... sorry.  I'm happy to lend a hand if you can give me some
offending sequence files.  If you can afford to work on the main branch
try that as well but I wouldn't use it for a production environment.

-jason

On Wed, 21 Mar 2001, gert thijs wrote:

> The problem with this error is that I do not know where in my scripts things
> are going wrong, since there is no trace given like in other errors.
> I go several times through the same genbank file in several consecutive
> scripts, so maybe I am doing something wrong in my scripts. I will have to
> print more debugging messages on screen to see when this error is produced.
> I will keep you informed.
>
> Gert
>
>
> Jason Stajich wrote:
> >
> > Hmm, I am pretty sure this behaviour was fixed already -- but of course
> > not in the 0.7 release and and I have not propigated fix to 07 branch yet
> > because I wanted to test it some more.  I probably need to get moving on
> > putting it on the branch....
> >
> > I run the following code on the live branch and do not get any errors.
> > #!/usr/local/bin/perl -w
> > use strict;
> >
> > use Bio::SeqIO;
> >
> > my $seqio = new Bio::SeqIO(-format => 'genbank',
> >                            -file => 'AP000413.gb');
> >
> > while( my $seq = $seqio->next_seq ) {
> >     print "name is ", $seq->display_id(), "\n";
> >     foreach my $feature ( $seq->top_SeqFeatures ) {
> >         print "feature=", $feature->primary_tag, ",",
> >         $feature->start, "..", $feature->end, "\n";
> >     }
> > }
> >
> > % perl test.pl
> > name is AP000413
> > feature=source,1..65047
> > feature=CDS,963..1631
> > feature=CDS,6390..11243
> > feature=CDS,13262..13496
> > feature=CDS,14090..15288
> > feature=CDS,15962..16674
> > feature=CDS,18333..19733
> > feature=CDS,20115..20747
> > feature=CDS,23635..24161
> > feature=CDS,24545..26104
> > feature=CDS,27042..27701
> > feature=CDS,31773..33020
> > feature=CDS,33699..34562
> > feature=CDS,38249..39115
> > feature=CDS,39507..41796
> > feature=CDS,46741..48373
> > feature=CDS,48818..51971
> > feature=CDS,54094..54909
> > feature=CDS,56217..57022
> > feature=CDS,57696..58130
> > feature=CDS,59757..59981
> > feature=CDS,60316..60816
> > feature=exon,63349..63420
> > feature=exon,63938..64093
> > feature=exon,64184..64939
> > feature=exon,65025..65047
> >
> > -Jason
> >
> > On Wed, 21 Mar 2001 bioperl-bugs@bioperl.org wrote:
> >
> > > JitterBug notification
> > >
> > > new message incoming/930
> > >
> > > Message summary for PR#930
> > >       From: gert.thijs@esat.kuleuven.ac.be
> > >       Subject: calling location on undefined object
> > >       Date: Wed, 21 Mar 2001 06:17:46 -0500
> > >       0 replies       0 followups
> > >
> > > ====> ORIGINAL MESSAGE FOLLOWS <====
> > >
> > > >From gert.thijs@esat.kuleuven.ac.be Wed Mar 21 06:17:46 2001
> > > Received: from localhost (localhost [127.0.0.1])
> > >       by pw600a.bioperl.org (8.11.2/8.11.2) with ESMTP id f2LBHj223188
> > >       for <bioperl-bugs@pw600a.bioperl.org>; Wed, 21 Mar 2001 06:17:46 -0500
> > > Date: Wed, 21 Mar 2001 06:17:46 -0500
> > > Message-Id: <200103211117.f2LBHj223188@pw600a.bioperl.org>
> > > From: gert.thijs@esat.kuleuven.ac.be
> > > To: bioperl-bugs@bioperl.org
> > > Subject: calling location on undefined object
> > >
> > > Full_Name: Gert Thijs
> > > Module: SeqIO::FTHelper
> > > Version: 0.7
> > > PerlVer: 5.6.0
> > > OS: Linux RedHat 6.2
> > > Submission from: cisco-cache-1.kuleuven.ac.be (134.58.253.113)
> > >
> > >
> > > While parsing a genbank file, I got the following error:
> > >
> > > Can't call method "location" on an undefined value at
> > > /users/sista/thijs/perl/lib/site_perl/5.6.0/Bio/SeqIO/FTHelper.pm line 136,
> > > <GEN0> line 228.
> > > The code at line 136 in FTHelper.pm there is
> > > $sf->location($splitlocation);
> > >
> > > The problem occurs when there is a problem parsing the location line. The else
> > > part in the preceding block returns undef for $sf.
> > >
> > > adding an extra check seems to solve the problem:
> > > $sf->location($splitlocation) if defined($sf);
> > >
> > >
> > >
> > > _______________________________________________
> > > Bioperl-guts-l mailing list
> > > Bioperl-guts-l@bioperl.org
> > > http://bioperl.org/mailman/listinfo/bioperl-guts-l
> > >
> >
> > Jason Stajich
> > jason@chg.mc.duke.edu
> > Center for Human Genetics
> > Duke University Medical Center
> > http://www.chg.duke.edu/
>
> --
> + Gert Thijs
> +
> + email: gert.thijs@esat.kuleuven.ac.be
> + homepage: http://www.esat.kuleuven.ac.be/~thijs
> +
> + K.U.Leuven
> + ESAT-SISTA
> + Kasteelpark Arenberg 10
> + B-3001 Leuven-Heverlee
> + Belgium
> + Tel : +32 16 32 18 84
> + Fax : +32 16 32 19 70
>

Jason Stajich
jason@chg.mc.duke.edu
Center for Human Genetics
Duke University Medical Center
http://www.chg.duke.edu/