[BioPython] Help getting GenBank data into Database
Andreas Kuntzagk
andreas.kuntzagk@mdc-berlin.de
Mon, 27 May 2002 13:21:42 +0200
Hello,
i'm trying to get the Data from a GenBank flatfile into the mySql
database. I've got biopython from cvs. I created all the tables
whith the bioSQL schema and created an new biodatabase.
Then I try the following:
----
from Bio import GenBank
from BioSQL import BioSeqDatabase
database = BioSeqDatabase.open_database(db="test")
f=open("/home/kuntzagk/gb_1.dat","r")
parser = GenBank.RecordParser()
it = GenBank.Iterator(f,parser)
biodata = BioSeqDatabase.BioSeqDatabase(database.adaptor, "test")
biodata.load(it)
---
the last Command gives me an Error:
Traceback (most recent call last):
File "load_database.py", line 9, in ?
biodata.load(it)
File
"/home/kuntzagk/lib/python2.2/site-packages/BioSQL/BioSeqDatabase.py",
line 276, in load
db_loader.load_seqrecord(cur_record)
File "/home/kuntzagk/lib/python2.2/site-packages/BioSQL/Loader.py",
line 28, in load_seqrecord
bioentry_id = self._load_bioentry_table(record)
File "/home/kuntzagk/lib/python2.2/site-packages/BioSQL/Loader.py",
line 68, in _load_bioentry_table
accession, version = record.id.split('.')
What is wrong ?
Thanx, Murple