[Biopython-dev] BioSQL documentation
Peter
biopython-dev at maubp.freeserve.co.uk
Thu Oct 18 20:06:10 UTC 2007
I was just having a look at:
http://biopython.org/DIST/docs/biosql/python_biosql_basic.html
The source for this HTML and PDF document lives here in the BioSQL CVS:
biosql-schema/doc/biopython/python_biosql_basic.tex
It would be nice to update the following section:
> 3.3 Loading a GenBank file into the database
>
> ...
>
> Now we want to do the loading of the file into the database. The
> Biopython implementation works by taking a standard Iterator object
> that returns Biopython SeqFeature objects and then doing the loading.
I think that should actually say "... that returns Biopython SeqRecord
objects containing SeqFeature objects ..."
> ... our GenBank file, which we can do with the following code:
>
>>>> from Bio import GenBank parser = GenBank.FeatureParser()
>>>> iterator = GenBank.Iterator(open("cor6_6.gb"), parser)
That can now be done with Bio.SeqIO which should be clearer, and
hopefully make it easier to see how to extend this to SwissProt etc:
from Bio import SeqIO
iterator = SeqIO.parse(open("cor6_6.gb"), "genbank")
I would do this myself, but I don't have a BioSQL database setup myself
right now. It would also be nice if the documentation didn't skip the
bit about setting up the database with the BioSQL schema, or at least
had links to the relevant BioSQL documentation.
Peter
More information about the Biopython-dev
mailing list