Beispiel #1
0
#add the metabolites to the reaction:
reaction.add_metabolites({malACP_c: -1.0,
                          h_c: -1.0,
                          ddcaACP_c: -1.0,
                          co2_c: 1.0,
                          ACP_c: 1.0,
                          omrsACP_c: 1.0})

#Print the reaction to make sure it worked:
print reaction.reaction

reaction.gene_reaction_rule = '( STM2378  or  STM1197 )'
#The next step will create cobra.Gene objects from the gene reaction rule, which will
#be used later by the cobra.Model to modulate reaction bounds after deleting genes.
reaction.parse_gene_association()

#The model's initially empty:
print '%i reactions in model'%len(cobra_model.reactions)
print '%i metabolites in model'%len(cobra_model.metabolites)
print '%i genes in model'%len(cobra_model.genes)


#Add the reaction to the model
cobra_model.add_reactions(reaction)

#Now there are things in the model
print '%i reaction in model'%len(cobra_model.reactions)
print '%i metabolites in model'%len(cobra_model.metabolites)
print '%i genes in model'%len(cobra_model.genes)