Self

Practical 3: Models and their Structural Analysis

Once again, start ScrumPy as described in the installation instructions.

Loading and defining models

   1 >>> m = ScrumPy.Model('toy_model.spy')

   1 Structural() # tells ScrumPy not to bother with kinetics
   2 ElType(Int) #  tells ScrumPy to use integers in the stoichiometry matrix
   3 
   4 A_tx:
   5     x_A -> A
   6     ~
   7 
   8 R_1:
   9     A -> B
  10     ~
  11 
  12 R_2:
  13     B -> C
  14     ~
  15 
  16 R_3:
  17     C -> E
  18     ~
  19 
  20 R_4:
  21     B -> D
  22     ~
  23 
  24 R_5:
  25     D -> E
  26     ~
  27 
  28 R_6:
  29     D -> F
  30     ~
  31 
  32 E_tx:
  33     E -> x_E
  34     ~

Properties of structural models

The stoichiometry matrix

   1 >>> m.sm.cnames
   2 ['R_1', 'R_2', 'R_3', 'R_4', 'R_5', 'R_6', 'E_tx', 'A_tx']
   3 >>> m.sm.rnames                #but m.smx.rnames will be longer
   4 ['D', 'E', 'A', 'F', 'C', 'B']

   1 >>> print (m.sm.ReacToStr('R_2'))
   2 R_2:
   3         1 B -> 1 C
   4         ~

   1 >>> m.sm.InvolvedWith('R_2')
   2 {'C': mpq(1,1), 'B': mpq(-1,1)}
   3 >>> m.sm.InvolvedWith('C')
   4 {'R_2': mpq(1,1), 'R_3': mpq(-1,1)}

Nullspace analysis

   1 >>> k = m.sm.NullSpace()
   2 >>> print (k)
   3      c_0 c_1
   4 A_tx  -1   0
   5  R_1  -1   0
   6  R_2  -1   1
   7  R_3  -1   1
   8  R_4   0  -1
   9  R_5   0  -1
  10  R_6   0   0
  11 E_tx  -1   0

   1 >>> m.DeadReactions()
   2 ['R_6']

Enzyme subsets

   1 >>> ess=m.EnzSubsets()
   2 >>> ess
   3 {'DeadReacs': {'R_6': mpq(1,1)}, 'Ess_1': {'A_tx': mpq(1,1), 'R_1': mpq(1,1), 'E_tx': mpq(1,1)}, 'Ess_2': {'R_2': mpq(1,1), 'R_3': mpq(1,1)}, 'Ess_3': {'R_4': mpq(1,1), 'R_5': mpq(1,1)}}

Elementary modes

   1 >>> elmo = m.ElModes()
   2 >>> print (elmo.mo)
   3 
   4      ElMo_0 ElMo_1
   5 A_tx      1      1
   6  R_1      1      1
   7  R_2      0      1
   8  R_3      0      1
   9  R_4      1      0
  10  R_5      1      0
  11  R_6      0      0
  12 E_tx      1      1

   1 >>> print (elmo.sto)
   2     ElMo_0 ElMo_1
   3   D      0      0
   4   E      0      0
   5   A      0      0
   6   F      0      0
   7   C      0      0
   8   B      0      0
   9 x_E      1      1
  10 x_A     -1     -1

   1 >>> print (elmo.Modes())
   2 ElMo_0, 1 A_tx, 1 R_1, 1 R_4, 1 R_5, 1 E_tx
   3 
   4 ElMo_1, 1 A_tx, 1 R_1, 1 R_2, 1 R_3, 1 E_tx
   5 
   6 >>> print (elmo.Stos())
   7 ElMo_0:
   8         1 x_A -> 1 x_E
   9         ~
  10 ElMo_1:
  11         1 x_A -> 1 x_E
  12         ~

Further Properties of the Stoichiometry Matrix and Null-space

Further information

None: Meetings/Nottingham2022/Prac3 (last edited 2022-05-04 11:42:09 by david)