[Biopython-dev] [Bug 2390] Error importing Swiss Prot in BioSQL

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Nov 19 15:54:32 UTC 2007


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


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

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




------- Comment #18 from biopython-bugzilla at maubp.freeserve.co.uk  2007-11-19 10:54 EST -------
Marking as fixed - using CVS this now works for me with MySQL (subject to
manually doing a commit as per bug 2396).

P.S. There was a cut and past error in my sample code in comment 15, note that
Bio.SeqIO just wraps the Bio.SwissProt parser so this is pretty much equivalent
to Jon's original example.

#Run this in the Biopython/Tests/SwissProt directory
from BioSQL import BioSeqDatabase
from Bio import SeqIO
import os

server = BioSeqDatabase.open_database(driver='MySQLdb', user='root', passwd='',
host='localhost', db='bioseqdb')
db = server.new_database('bug2390')
for filename in os.listdir(".") :
    if filename[:2]=="sp" :
        print "Loading %s" % filename
        db.load(SeqIO.parse(open(filename), "swiss"))

print "Committing..."
server.adaptor.commit()


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