[BioPython] BioSQL problems

Sameet Mehta sameet at nccs.res.in
Sat Aug 28 12:59:24 EDT 2004


Hi,
I had the following problems when trying to populate a MySQL database with
information from a GenBank file.  I am giving what i have done, and the trace
that i got below

>>> from BioSQL import BioSeqDatabase
>>> server = BioSeqDatabase.open_database(driver="MySQLdb", user='root', 
...                      passwd='mysql1', host='localhost', db='bioseqdb')
>>> db = server.new_database("promoter")
>>> from Bio import GenBank
>>> parser = GenBank.FeatureParser()
>>> iterator =
GenBank.Iterator(open("/home/sameet/Desktop/GenBankData/promotergb.gb"), parser)
>>> db.load(iterator)

I had already prepared the database with all the tables from the biosql.sql
for MySQL.

The file contains about 1800 entries but i am getting this error, where the
program just exits!
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/root/Desktop/biopython-1.30/build/lib.linux-i686-2.2/BioSQL/BioSeqDatabase.py",
line 414, in load
  File
"/root/Desktop/biopython-1.30/build/lib.linux-i686-2.2/BioSQL/Loader.py", line
43, in load_seqrecord
  File
"/root/Desktop/biopython-1.30/build/lib.linux-i686-2.2/BioSQL/Loader.py", line
322, in _load_reference
  File
"/root/Desktop/biopython-1.30/build/lib.linux-i686-2.2/BioSQL/BioSeqDatabase.py",
line 287, in execute_and_fetch_col0
  File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 95, in execute
    return self._execute(query, args)
  File "/usr/lib/python2.2/site-packages/MySQLdb/cursors.py", line 114, in
_execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.2/site-packages/MySQLdb/connections.py", line 33, in
defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL
syntax near 'USING (dbxref_id) WHERE dbname = 'PUBMED' AND accession =
'10570245'' at line 1")

am i doing something wrong, using something i am not supposed to use

I am using python2.2 and the MySQLdb module is working fine.  I am using
RHL9.0, and MySQL version 3.23.54

thanks for the help in advance, 
regards
Sameet



--
National Centre for Cell Science, Pune



More information about the BioPython mailing list