[BioPython] BioSQL documentation for Biopython

Sebastian Bassi sbassi at gmail.com
Sat Feb 23 20:58:03 UTC 2008


On Sat, Feb 23, 2008 at 5:50 PM, Sebastian Bassi <sbassi at gmail.com> wrote:
>  >  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.

I've just found the answer. Here is what was missing:
server.adaptor.commit()
I found it here: http://www.biopython.org/wiki/BioSQL

So the document IMHO should be changed, for example:

">>> db.load(iterator)
6

And the GenBank file is loaded into the database. Notice that the load
function returns the number of records loaded (6 in this case). This
is useful for sanity checking to make sure that you didn't try to load
a massive file and end up with a result like 3."

To:

">>> db.load(iterator)
6
>>> server.adaptor.commit()

And the GenBank file is loaded into the database. Notice that the load
function returns the number of records loaded (6 in this case). This
is useful for sanity checking to make sure that you didn't try to load
a massive file and end up with a result like 3."

A link to http://www.biopython.org/wiki/BioSQL could be added.


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