[BioPython] How to use Bio.Kegg.Compound Module
sudhir cr
sudhir.cr at gmail.com
Wed Dec 31 15:07:21 UTC 2008
Hello Peter,
Thanks for the quick reply. This code is working great.
P.S: The new KEGG format has changed to "Other DBs" from "DBLINKS"
Thanks a lot,
Have a great New Year - 2009
Sudhir
On Wed, Dec 31, 2008 at 9:43 AM, Peter <biopython at maubp.freeserve.co.uk>wrote:
> 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