[Biopython-dev] [Bug 2838] If a SeqRecord containing Genbank information is read from BioSQL, it cannot be written to another BioSQL database

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat May 23 11:49:18 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2838


biopython-bugzilla at maubp.freeserve.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #4 from biopython-bugzilla at maubp.freeserve.co.uk  2009-05-23 07:49 EST -------
(In reply to comment #3)
> Thank you!
> 
> Unfortunately I'm not sure it's fixed, or maybe there is another problem:
> ...
> Now when I re-run dbtestcase.py (attached previously) I get a different error
> message.
> ...
> Traceback (most recent call last):
> ...
>   File "/usr/local/lib/python2.6/dist-packages/Bio/SeqRecord.py", line 489, in
> __str__
>     if self.letter_annotations :
>   File "/usr/local/lib/python2.6/dist-packages/Bio/SeqRecord.py", line 165, in
> <lambda>
>     fget=lambda self : self._per_letter_annotations,
> AttributeError: 'DBSeqRecord' object has no attribute '_per_letter_annotations'
> dwyllie at dwyllie:~/programs/CheckleyProject/src$ 
> 
> 
> Have I failed to install something?

No - everything looks OK, and the deprecation warnings are known about and not
in Biopython anyway.

> Unfortunately, I wasn't running off CVS before your change.

The original problem is fixed. However, you've found a new bug in the __str__
method for the DBSeqRecord related to the fact there is no
per-letter-annotation (this would have been introduced in Biopython 1.50 when I
added the letter_annotations dictionary to the SeqRecord class). I'm a little
surprised that our unit tests didn't catch this - but its fixed now:

Tests/test_BioSQL.py CVS revision 1.37
BioSQL/BioSeq.py CVS revision 1.36

Note BioSQL doesn't yet support recording anything more complicated than
strings, although we've started talking about using XML or JSON for this. As a
result, Biopython does not attempt to record any per-letter-annotation in the
BioSQL database. With the fix the DBSeqRecord now has an empty
per-letter-annotation dictionary. Before it didn't, hense the AttributeError.

Hopefully you won't find any more issues, but if you do, please file another
bug - I'm marking this one as fixed.

Thanks for your report and time David,

Peter


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list