Exemple #1
0
 def test_metnet_parse_with_numeric_id(self):
     r = misc.parse_metnet_reaction('[c] : 3pg + atp <==> 13dpg + adp')
     self.assertEqual(r, Reaction(Reaction.Bidir,
                                   [(Compound('3pg', 'c'), 1), (Compound('atp', 'c'), 1)],
                                   [(Compound('13dpg', 'c'), 1), (Compound('adp', 'c'), 1)]))
Exemple #2
0
 def test_metnet_parse_local_with_colon_in_name(self):
     r = misc.parse_metnet_reaction('fdxr-4:2[c] + h[c] + nadp[c] <==> fdxo-4:2[c] + nadph[c]')
     self.assertEqual(r, Reaction(Reaction.Bidir,
                                     [(Compound('fdxr-4:2', 'c'), 1), (Compound('h', 'c'), 1),
                                      (Compound('nadp', 'c'), 1)],
                                     [(Compound('fdxo-4:2', 'c'), 1), (Compound('nadph', 'c'), 1)]))
Exemple #3
0
 def test_metnet_parse_with_local_compartment(self):
     r =  misc.parse_metnet_reaction('(2) ficytcc553[c] + so3[c] + h2o[c] --> (2) focytcc553[c] + so4[c] + (2) h[e]')
     self.assertEqual(r, Reaction(Reaction.Right, [(Compound('ficytcc553', 'c'), 2), (Compound('so3', 'c'), 1),
                                                    (Compound('h2o', 'c'), 1)],
                                   [(Compound('focytcc553', 'c'), 2), (Compound('so4', 'c'), 1),
                                    (Compound('h', 'e'), 2)]))
Exemple #4
0
 def test_metnet_parse_global_with_colon_in_name(self):
     r = misc.parse_metnet_reaction('[c] : fdxr-4:2 + h + nadp <==> fdxo-4:2 + nadph')
     self.assertEqual(r, Reaction(Reaction.Bidir,
                                     [(Compound('fdxr-4:2', 'c'), 1), (Compound('h', 'c'), 1),
                                      (Compound('nadp', 'c'), 1)],
                                     [(Compound('fdxo-4:2', 'c'), 1), (Compound('nadph', 'c'), 1)]))
Exemple #5
0
 def test_metnet_parse_with_global_compartment(self):
     r = misc.parse_metnet_reaction('[c] : akg + ala-L <==> glu-L + pyr')
     self.assertEqual(r, Reaction(Reaction.Bidir, [(Compound('akg', 'c'), 1), (Compound('ala-L', 'c'), 1)],
                                   [(Compound('glu-L', 'c'), 1), (Compound('pyr', 'c'), 1)]))