[Biopython-dev] [BioPython] BioSQL documentation for Biopython

Sebastian Bassi sbassi at gmail.com
Sat Feb 23 14:50:50 EST 2008


On Sat, Feb 23, 2008 at 5:20 PM, Hilmar Lapp <hlapp at gmx.net> wrote:
>  I.e., there is no error from the db.load() command, just no data?

Yes, there was no error, the only response was "6".

>  Does the Biopython binding enable or disable auto-commit? If the
>  latter (which would be the Right Thing(tm) to do), you will have to

Yes, when working with MySQLdb, it does not auto-commit. You have to
do DB_HANDLE.commit().
There is no commit method in db:
>>> dir(db)
['__doc__', '__getitem__', '__init__', '__module__', '__repr__',
'adaptor', 'dbid', 'get_PrimarySeq_stream', 'get_Seq_by_acc',
'get_Seq_by_id', 'get_Seq_by_primary_id', 'get_Seq_by_ver',
'get_Seqs_by_acc', 'get_all_primary_ids', 'items', 'keys', 'load',
'lookup', 'name', 'values']

>  BioSQL uses InnoDB on MySQL, and hence will be transactional unless
>  you make the language's db driver to auto-commit.

I am looking at the DatabaseLoader class (in loader.py) but I don't
see any commit statement, anyway, I don't understand this class, so I
may be missing something.


-- 
Curso Biologia Molecular para programadores: http://tinyurl.com/2vv8w6
Bioinformatics news: http://www.bioinformatica.info
Tutorial libre de Python: http://tinyurl.com/2az5d5


More information about the Biopython-dev mailing list