[Biopython-dev] [Bug 1667] New: PUBMED key collision in dbxref table

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Jul 14 00:35:46 EDT 2004


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

           Summary: PUBMED key collision in dbxref table
           Product: Biopython
           Version: Not Applicable
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: BioSQL
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: open-bio at zesty.ca


I am using BioPython 1.30.

While loading records from the human genome into a MySQL database, BioSQL
causes the error: "Duplicate entry PUBMED-0 for key 2".

PUBMED appears in the dbxref table.  I looked at the code that inserts entries
into the dbxref table: the method _add_dbxref at line 97 of BioSQL/Loader.py.

_add_dbxref is called twice, at lines 333 and 336.  I believe the second call
has a bug, since both calls supply "reference.medline_id" as an argument.

            if reference.medline_id:
                dbxref_id = self._add_dbxref("MEDLINE",
                                             reference.medline_id, 0)
            elif reference.pubmed_id:
                dbxref_id = self._add_dbxref("PUBMED",
                                             reference.medline_id, 0)

It seems clear to me that the last line above should say "reference.pubmed_id".

If i make this change in my local copy of BioSQL/Loader.py, the MySQL error
about the duplicate key value indeed goes away.



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