[Biopython-dev] [Bug 3109] New: Record class in Bio.SCOP.Cla has hierarchy member as list instead of dictionary

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Jul 7 21:45:33 EDT 2010


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

           Summary: Record class in Bio.SCOP.Cla has hierarchy member as
                    list instead of dictionary
           Product: Biopython
           Version: 1.54b
          Platform: PC
               URL: http://github.com/jfinkels/biopython/commit/6d2257dd0c46
                    abdf1ecd14b8bc660e32a205630a
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: jeffrey.finkelstein at gmail.com


The Record class in the Bio.SCOP.Cla module has the hierarchy member as a list
of key-value 2-tuples, but it should be a dictionary of key-value pairs. The
SCOP Classification file format,
http://scop.mrc-lmb.cam.ac.uk/scop/release-notes.html#scop-parseable-files ,
states that the order of the hierarchy key-value pairs in each record is
unordered. This also allows easier access to the key-value pairs in a way that
corresponds with the semantics of the file format specification.

I have provided a fix at my own GitHub fork of Biopython.

http://github.com/jfinkels/biopython/commit/6d2257dd0c46abdf1ecd14b8bc660e32a205630a

In fixing this bug and the associated unit tests, I also changed the
Record.__str__ method to output a string WITHOUT a trailing newline (which
matches Python convention anyway).


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