[Bioperl-l] Bio::Annotation::Reference

Jason Stajich jason at cgt.duhs.duke.edu
Tue Mar 9 13:39:59 EST 2004


I think I may have already fixed this since the 1.4 release.  I'll test it
out when I get a chance or you can test on the CVS version of the code.  I
don't remember if I migrated the fix to the 1.4 branch yet though.

-jason

On Tue, 9 Mar 2004, Barry Moore wrote:

> The value for the PUBMED line of a GenBank file seems to be ending up in
> the wrong place.  When I call  $ref->location on a
> Bio::Annotation::Reference object, I get a line such as, "Mol. Biol.
> Cell 12 (12), 3839-3851 (2001) PUBMED   11739784".  When I call
> $ref->pubmed on the same object it returns undefined.  It seems to me
> that $ref->location should return "Mol. Biol. Cell 12 (12), 3839-3851
> (2001)" and $ref->pubmed should return "11739784".  Is this a bug or is
> this the intended behaviour?  I didn't put this in Bugzilla since I
> wasn't entirely sure it was really a bug, should it go there?
>
> Here's a bit of code that should repeat this situation.  It does the
> same thing for me on half a dozen different RefSeq accessions that I
> have tried.
>
> use Bio::DB::GenBank;
> use Bio::SeqIO;
>
> my @ids = (NM_013366);
> my $gb = new Bio::DB::GenBank();
> my $seqio = $gb->get_Stream_by_id(@ids);
>
> while (my $seq = $seqio->next_seq) {
>   my $ann = $seq->annotation();
>   my @refs = ($ann->get_Annotations('reference'));
>   my $ref = shift @refs;
>   print "LOCATION:\t",$ref->location, "\n";
>   print "PUBMED:\t", $ref->pubmed, "\n";
> }
>
> I am running BioPerl 1.4 and ActiveState Perl 5.8 on Windows XP.
>
> Barry
>
>

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


More information about the Bioperl-l mailing list