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')

Structural()

A_tx:
    x_A -> A
    ~

R_1:
    A -> B
    ~

R_2:
    B -> C
    ~

R_3:
    C -> E
    ~

R_4:
    B -> D
    ~

R_5:
    D -> E
    ~

R_6:
    D -> F
    ~

E_tx:
    E -> x_E
    ~

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 ['A', 'B', 'C', 'E', 'D', 'F']

   1 >>> print m.sm.ReacToStr('R_2')
   2 R_2:
   3         1/1 B -> 1/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 >>> k
   3     c_0 c_1
   4 
   5  R_1 -1/1  0/1
   6  R_2 -1/1  1/1
   7  R_3 -1/1  1/1
   8  R_4 0/1  -1/1
   9  R_5 0/1  -1/1
  10  R_6 0/1  0/1
  11  E_tx -1/1  0/1
  12  A_tx -1/1  0/1

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

Enzyme subsets

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

Elementary modes

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

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

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

Further Properties of the Stoichiometry Matrix and Null-space

Further information

None: Meetings/Nepal2018/Prac3 (last edited 2018-06-29 09:08:33 by mark)