List all KEGG reaction IDs for organism with Orange.bio.kegg module Python
1
0
Entering edit mode
9.0 years ago
jolespin ▴ 150

I'm following the documentation on http://pythonhosted.org/Orange-Bioinformatics/reference/kegg.html

I want to get an iterable for all the KEGG reaction IDs for a particular organism.

I chose my organism by:

#!/usr/bin/python
import Orange 
from Orange.bio.kegg import *

#Organism
genome = KEGGGenome()
genome_ids = genome.keys()
org_query = 'Escherichia coli K-12 MG1655'
org_id = None
for id in genome_ids:
    species = genome[id].definition
    if species == org_query:
        org_id = id
        break
organism = Organism(org_id) #T00007
org_code = organism.org_code #eco

I was able to get all the genes by:

#Genes
genes = organism.genes
gene_ids = genes.keys()
for id in gene_ids: 
    print id, genes[id].definition​

I got all of the pathway ids by:

#Pathways 1
pathways = organism.pathways()
for id in pathways:
    print id​

To get the pathway ids and names, I had to:

#Pathways 2
for path in Orange.bio.kegg.pathways(org_id):
    print path.entry_id, path.definition​

I'm trying to get the reaction ids and reaction names but I can't seem to get it to work. I started by creating the following object but I couldn't seem to get anything out of it.

#Reactions
reactions = Orange.bio.kegg.databases.Reaction()
orange python kegg reactions • 2.6k views
ADD COMMENT
1
Entering edit mode
9.0 years ago
jolespin ▴ 150
#Reactions Example for Glycolysis
cpd_db = Orange.bio.kegg.databases.Compound()
path_db = Orange.bio.kegg.databases.Pathway()
gly = 'eco00010'
for cpd_id in path_db.get_entry(gly).compound:
    print cpd_db.get_entry(cpd_id).reaction.replace('\n','').split(' ')
ADD COMMENT

Login before adding your answer.

Traffic: 2926 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6