[Biopython] problem with KEGG.REST.kegg_conv
Felix Heeger
fheeger at mi.fu-berlin.de
Tue Dec 15 10:34:03 UTC 2015
Hi,
first of all thanks for the awesome library.
Here is my problem: I am trying to to use the KEGG.REST.kegg_conv
function to translate NCBI GIs to kegg gene names.
For example I think this should work:
> kegg_conv("genes","ncbi-gi:16130957")
But I get an error from Biopython:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.7/dist-packages/Bio/KEGG/REST.py", line 252, in kegg_conv
> raise Exception("Bad argument target_db or source_db for kegg conv request.")
> Exception: Bad argument target_db or source_db for kegg conv request.
Looking at the code, I think the only accepted input for the function
would look something like this:
> kegg_conv("genes","ncbi-gi")
This does indeed not cause a error from Biopython, but is clearly
missing the information *which* GI I want to convert and also gives my
a HTTP Error because Kegg does not accept the resulting URL
(http://rest.kegg.jp/conv/genes/ncbi-gi).
Is this a problem with the kegg_conv function or am I missing something?
Cheers,
felix
More information about the Biopython
mailing list