[BioPython] How to use Bio.Kegg.Compound Module
Peter
biopython at maubp.freeserve.co.uk
Wed Dec 31 14:43:39 UTC 2008
On Wed, Dec 31, 2008 at 7:49 AM, sudhir cr <sudhir.cr at gmail.com> wrote:
> Hello,
>
> I am a newbie to python.
>
> Can anyone please tell me how to use the Bio.Kegg.Compound Module to get the
> DBLinks from a KEGG Compound file?
>
> Thanks in advance
> Sudhir
Looking at the code, we do need to add some more to the KEGG
docstrings. However, I think you want to do something like this:
from Bio.KEGG import Compound
handle = open("my_kegg_file.txt")
for record in Compound.parse(handle) :
print record.entry
for database, links in record.dblinks :
print database, links
handle.close()
Peter
More information about the Biopython
mailing list