[Biopython-dev] KEGG API Wrapper
Peter Cock
p.j.a.cock at googlemail.com
Wed Oct 17 11:09:07 UTC 2012
On Wed, Oct 17, 2012 at 12:55 AM, Zachary Charlop-Powers
<zcharlop at mail.rockefeller.edu> wrote:
> Kevin,
> Michiel,
>
> I just tested Kevin's code for a few simple queries and it worked great. I
> have always liked KEGG's organization of data and really appreciate this
> RESTful interface to their data; in some ways I think it easier to use the
> web interfaces for KEGG than it is for NCBI. Plus the KEGG coverage of
> metabolic networks is awesome. I found the examples in Kevin's test script
> to be fairly self-explanatory but a simple-spelled out example in the
> Tutorial would be nice.
>
> One thought, though, is that you can retrieve MANY different types of data
> from the KEGG Rest API - which means that the user will probably have to
> parse the data his/herself. Data retrieved with "list" can return lists of
> genes or compounds or organism and after a cursory look these are each
> formatted differently. Also true with the 'find' command. So I think you
> were right to leave out parsers because i think they will be a moving target
> highly dependent on the query.
>
> Thank You Kevin,
> zach cp
Good point about decoupling the web API wrapper and the parsers -
how the Bio.Entrez module and Bio.TogoWS handle this is to return
handles for web results, which you can then parse with an appropriate
parser (e.g. SeqIO for GenBank files, Medline parser, etc).
Note that this is a little more fiddly under Python 3 due to the text
mode distinction between unicode and binary... just something to
keep in the back of your mind.
Peter
More information about the Biopython-dev
mailing list