[Biopython-dev] [Bug 2883] Errors after unpickling of 1.49 seqrecords

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Jul 22 16:52:14 UTC 2009


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





------- Comment #3 from andrea at biodec.com  2009-07-22 12:52 EST -------
(In reply to comment #2)
> It sounds like pickling and unpickling worked for you on Biopython 1.49, but I
> am not 100% sure that is what you meant.

Yes, that's true. it worked.
> 
> The good news is I can pickle/unpickle a new SeqRecord object:
> 
yes this i know, and it works also for me and also with cPickle.


> I would expect you to be able to pickle/unpickle new objects on your system
> too.
sure
> 
> However, I can confirm trying to unpickle the example you attached to this bug
> also fails for me (using the latest Biopython from CVS). 
> 
> As you may be aware, per-letter-annotation support was added in Biopython 1.50
> which is stored internally by a private property of the SeqRecord,
> _per_letter_annotations. The seq property is also now stored internally by a
> private property of the SeqRecord, _seq. This means if you unpickle a
> pre-Biopython 1.50 SeqRecord on Biopython 1.50 or later, the
> _per_letter_annotations and _seq properties never gets initialised. This causes
> the two errors you saw.

This is the problem. i've many example of seqrecord dump (that i use as a test)
that due to the seqrecord modifications i cannot use anymore.
 - I've to convert in the new type.
 - or i've to design fully new tests that permit me to 
   manage changing in the SeqRecord structure.

> 
> I don't think there is much we can do about this... not without making the
> SeqRecord even more complicated, e.g.
> http://code.activestate.com/recipes/521901/

I understand. I thought SeqRecod was structurally stable.
But it isn't. In this sense i can only pickle strings, lists and
dictionaries... so i will redraw my tests to manage only SeqRecord
stored data (representing it as a dictionary of dictionaries it would
be a good solution).

> 
> 
> P.S. Bug 2838 was a problem in the DBSeqRecord (used for BioSQL), and shouldn't
> be relevant to the underlying SeqRecord object, or this issue.
> 
yes, but in the last part of the bug there was a similar error
AttributeError: 'DBSeqRecord' object has no attribute '_per_letter_annotations'
and i thought it was due to the fact that DBSeqRecord didn't have that
attribute and it was out of sync with respect to the new 1.50 seqrecord...

Thanks

Andrea

PS: i think you could close the bug.


-- 
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