Introduction to {{{ScrumPy}}}

This is a very brief introduction to ScrumPy, with emphasis on structural analysis. A more complete documentation can be found here.

Loading and defining models

A pre-existing model is loaded by creating an instance of ScrumPy.Model(model) with model being the name of the model file (string-type ending with the ScrumPy file extension, .spy), provided that the model file is stored in the directory from where the ScrumPy shell was launched. If no name is provided, a GUI for selecting a model to open, is launched.

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

Where toy_model.spy is a small structural model:

   1 Structural()
   2 
   3 A_tx:
   4     x_A -> A
   5     ~
   6 
   7 R_1:
   8     A -> B
   9     ~
  10 
  11 R_2:
  12     B -> C
  13     ~
  14 
  15 R_3:
  16     C -> E
  17     ~
  18 
  19 R_4:
  20     B -> D
  21     ~
  22 
  23 R_5:
  24     D -> E
  25     ~
  26 
  27 R_6:
  28     D -> F
  29     ~
  30 
  31 E_tx:
  32     E -> x_E
  33     ~

The reactions with the suffix "_tx" are transporters, i.e. they convert external metabolites (with prefix "x_") to internal metabolites.

The class Model has a range of methods, of which some are only useful for kinetic models (which are also structural models, but the oposite is not true). Among the structurally relevant methods we find ConsMoieties() - which prints a list of conserved moieties; DeadReactions() - which returns a list of reactions that cannot carry steady state flux; FindIsoforms() - which identifies reactions from the model that are redundant, i.e. a set of reactions have identical stoichiometry; ElModes() - which returns an elementary modes object; Externals() - which returns a list of external metabolites.

The fields Model.sm and Model.smexterns are the two stoichiometry matrices assocciated with a model - the former is the internal matrix, the latter the external. The external matrix contains infomation about external metabolites, whereas the internal does not. All instances of ScrumPy matrices (subclasses of DynMatrix) have the fields cnames - column names and rnames - row names.

   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.smexterns.rnames will be longer
   4 ['A', 'B', 'C', 'E', 'D', 'F']