text: user1670: I am trying to collect the ec-code (and gene) of a reaction. I have tried the following:
  import pythoncyc
  pgdb = pythoncyc.PGDB("sco")
  r = "RXN1A0-6128"
  gene = "SCP1.233B"
  enzyme = pgdb.enzymes_of_reaction(r)
  enzyme = pgdb.enzymes_of_gene(gene)
  pgdb.full_enzyme_name(enzyme)
  
  However, I only get an enzyme id, and not the ec-code, which is visible on biocyc.
  
  user1670: BioGeek is correct, however I will post a full answer.
  import pythoncyc
  # To get ec-code
  db = pythoncyc.select_organism('sco')
  reaction = db["RXN1A0-6128"]
  ec_code = reaction["ec_number"]
  
  # To get genes
  pgdb = pythoncyc.PGDB("sco")
  genes = pgdb.genes_of_reaction("RXN1A0-6128")
  
  
original_text: 1670: <p>I am trying to collect the ec-code (and gene) of a reaction. I have tried the following:</p>
  
  <pre><code>import pythoncyc
  pgdb = pythoncyc.PGDB("sco")
  r = "RXN1A0-6128"
  gene = "SCP1.233B"
  enzyme = pgdb.enzymes_of_reaction(r)
  enzyme = pgdb.enzymes_of_gene(gene)
  pgdb.full_enzyme_name(enzyme)
  </code></pre>
  
  <p>However, I only get an enzyme id, and not the ec-code, which is visible on <a href="https://biocyc.org/SCO/NEW-IMAGE?type=REACTION&amp;object=RXN1A0-6128" rel="nofollow noreferrer">biocyc</a>.</p>
   1670: <p>BioGeek is correct, however I will post a full answer.</p>
  
  <pre><code>import pythoncyc
  # To get ec-code
  db = pythoncyc.select_organism('sco')
  reaction = db["RXN1A0-6128"]
  ec_code = reaction["ec_number"]
  
  # To get genes
  pgdb = pythoncyc.PGDB("sco")
  genes = pgdb.genes_of_reaction("RXN1A0-6128")
  </code></pre>
  