Differences between revisions 1 and 2
Revision 1 as of 2012-09-16 10:31:53
Size: 120
Editor: mark
Comment:
Revision 2 as of 2012-10-08 10:58:50
Size: 5670
Editor: mark
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
=== Identifiers === The ScrumPy model description langauge is intended to be a simple, human read/writable, description of a metabolic network, using a syntax that can be readily understood, with a rudimentary knowledge of biochemistry or computing.

A model is defined as a list of statements, and these can be one of for distinct types:

 * Reactions

 * Initialisations

 * Comments

 * Directives

The most important of these is, of course, the reaction, and it is in fact possible to construct rather simple models using only reaction statements.Initialisations set the numerical value of kinetic parameters and initial values of internal concentrations. Comments are ignored by ScrumPy, but exist to inform the the human reader. Directives do not form part of the model description ''per se'', rather they serve as instructions to ScrumPy as to how the model should be interpreted.
Line 5: Line 18:
The reaction is the most fundemantal part of a descripton of metabolism, and is divided into three distinct components: the reaction name, the stoichiometry and a kinetic statement (strictly in that order):

{{{#!highlight python
Reac1:
   a -> b
   V1 * (a - b/keq1)
}}}
Here, line 1 defines the reaction name as Reac1, the colon (:) is not part of the name, but indicates that the text to the left is the name of the reaction.

Line 2 is the stoichiometry, in this case one mol of metabolite a is converted into one mol of b. The sperator ,->, indicates that the reaction is irreversible in the left-right direction. Stoichiometries can be constructed with two other separators, <>, indicating a reversible reaction, and <-, indicating an irreversible reaction in the right-left direction.

In the example above a and b were interconverted in unit ratio, other stoichiometric coefficients can be spicified in the obvious way, e.g:

{{{#!highlight python
Reac2:
   2 a -> 3 b
   V1 * (a - b/keq1)
}}}
Specifies that two molecules of a are converted into 3 of b. The coefficients can be represented as integers (as above), floating point values (e.g. 3.14 etc), or rational numbers (e.g 22/7). It is only in relatively special circumstances that such exotic coefficients are needed. See also the {{{ElType()}}} directive below.

Line 3 is the kinetic (or rate) law, here specifying simple mass action kinetics with a rate constant V1 and an equilibrium constant, keq1. Sharp eyed readers will notice that these two reactions contain an implicit contradiction, the stochiometry specifies that the reaction is irreversible, but the rate law is reversible. Surprisingly, such a state of afairs does not cause any problems to ScrumPy (because kinetic and structural functionality are separate from one another). However the user must keep this fact in mind when interpreting results generated from kinectic and structural anlysis on the same model.

More detail on kinetics to follow.

In instances where the modeller wishes to only cary out structural analysis on the model the kineticstatement can be replaced with a tilde (~):

{{{#!highlight python
Reac3:
   2 a -> 3 b
   ~
}}}
This in fact specifies a default rate law with mass action kinetics with rate and equilibrium constants of one. Thus it is permissible (if not very useful) to use this for kinetic models as well.See also the Structural() directive below.

==== Identifiers ====
The named components of of a reaction (rection name, metabolites and parameters) are collectively refered to as ''identifiers''. Identifiers can be of two types - unquoted and quoted. Unquoted identifiers (used in the examples above must start with a letter be followed by zero or more letters, digits and underscore (_).

If a model is only going to be subject to structural analysis, then it may be more convenient, or indeed essential, to use ''quoted ''identifiers. A quoted identifier may contain any sequence of characters, except new line, delimited by double quotes (ie the ''single'' " character) e.g:

{{{#!highlight python
"P-PANTOCYSLIG-RXN":
        "CYS" + "CTP" + "4-P-PANTOTHENATE" ->"PPI" + "CMP" + "PHOSPHOPANTOTHENOYL-L-CYSTEINE"
        ~
}}}
See also the Structural() and {{{Dequote()}}} directives below.

=== Initialisations ===
Parameters and concentrations can be assigned a value either as a literal number, or in terms od some other defined values:

{{{#!highlight python

V1 = 42

V2 = V1 * 5}}}

Values will be treated as a concentration if, and only if, they have appeared in the stoichiometry of at least one reaction. Any other value will be assumed to be a parameter, even if it has not been used elsewhere.

It is permissable to leave both concentrations and prmeters uninitialised, but ScrumPy will generate separate warnings for unitialised parameters and concnetrations. A parameter left uninitialised will be set to the internl value of 'NaN' (not a number) and no valid kinetic analysis can be performed until it is set via the ScrumPy interface.

Concentrations left uninitialised will be set to a default value of zero. However this is generally not reccomended as it can lead to rather sever problems in networks containing cycles.

=== Comments ===
Comments are defined as starting with a hash (#) character and continue to the end of the line, as with Python. They are completely disregrded by ScrumPy.

{{{#!highlight python
Reac3: # A comment about reaction 3
   2 a -> 3 b
   ~

# This coments out the entire line, useful for temporarily removing a reaction

#Reac4: # A comment about reaction 3
# a -> 3 b
# ~
}}}

ScrumPy Model Description Language

Overview

The ScrumPy model description langauge is intended to be a simple, human read/writable, description of a metabolic network, using a syntax that can be readily understood, with a rudimentary knowledge of biochemistry or computing.

A model is defined as a list of statements, and these can be one of for distinct types:

  • Reactions
  • Initialisations
  • Comments
  • Directives

The most important of these is, of course, the reaction, and it is in fact possible to construct rather simple models using only reaction statements.Initialisations set the numerical value of kinetic parameters and initial values of internal concentrations. Comments are ignored by ScrumPy, but exist to inform the the human reader. Directives do not form part of the model description per se, rather they serve as instructions to ScrumPy as to how the model should be interpreted.

Reactions

The reaction is the most fundemantal part of a descripton of metabolism, and is divided into three distinct components: the reaction name, the stoichiometry and a kinetic statement (strictly in that order):

   1 Reac1:
   2    a -> b
   3    V1 * (a - b/keq1)

Here, line 1 defines the reaction name as Reac1, the colon (:) is not part of the name, but indicates that the text to the left is the name of the reaction.

Line 2 is the stoichiometry, in this case one mol of metabolite a is converted into one mol of b. The sperator ,->, indicates that the reaction is irreversible in the left-right direction. Stoichiometries can be constructed with two other separators, <>, indicating a reversible reaction, and <-, indicating an irreversible reaction in the right-left direction.

In the example above a and b were interconverted in unit ratio, other stoichiometric coefficients can be spicified in the obvious way, e.g:

   1 Reac2:
   2    2 a -> 3 b
   3    V1 * (a - b/keq1)

Specifies that two molecules of a are converted into 3 of b. The coefficients can be represented as integers (as above), floating point values (e.g. 3.14 etc), or rational numbers (e.g 22/7). It is only in relatively special circumstances that such exotic coefficients are needed. See also the ElType() directive below.

Line 3 is the kinetic (or rate) law, here specifying simple mass action kinetics with a rate constant V1 and an equilibrium constant, keq1. Sharp eyed readers will notice that these two reactions contain an implicit contradiction, the stochiometry specifies that the reaction is irreversible, but the rate law is reversible. Surprisingly, such a state of afairs does not cause any problems to ScrumPy (because kinetic and structural functionality are separate from one another). However the user must keep this fact in mind when interpreting results generated from kinectic and structural anlysis on the same model.

More detail on kinetics to follow.

In instances where the modeller wishes to only cary out structural analysis on the model the kineticstatement can be replaced with a tilde (~):

   1 Reac3:
   2    2 a -> 3 b
   3    ~

This in fact specifies a default rate law with mass action kinetics with rate and equilibrium constants of one. Thus it is permissible (if not very useful) to use this for kinetic models as well.See also the Structural() directive below.

Identifiers

The named components of of a reaction (rection name, metabolites and parameters) are collectively refered to as identifiers. Identifiers can be of two types - unquoted and quoted. Unquoted identifiers (used in the examples above must start with a letter be followed by zero or more letters, digits and underscore (_).

If a model is only going to be subject to structural analysis, then it may be more convenient, or indeed essential, to use quoted identifiers. A quoted identifier may contain any sequence of characters, except new line, delimited by double quotes (ie the single " character) e.g:

   1 "P-PANTOCYSLIG-RXN":
   2         "CYS" + "CTP" + "4-P-PANTOTHENATE" ->"PPI" + "CMP" + "PHOSPHOPANTOTHENOYL-L-CYSTEINE"
   3         ~

See also the Structural() and Dequote() directives below.

Initialisations

Parameters and concentrations can be assigned a value either as a literal number, or in terms od some other defined values:

   1 V1 = 42
   2 
   3 V2 = V1 * 5

Values will be treated as a concentration if, and only if, they have appeared in the stoichiometry of at least one reaction. Any other value will be assumed to be a parameter, even if it has not been used elsewhere.

It is permissable to leave both concentrations and prmeters uninitialised, but ScrumPy will generate separate warnings for unitialised parameters and concnetrations. A parameter left uninitialised will be set to the internl value of 'NaN' (not a number) and no valid kinetic analysis can be performed until it is set via the ScrumPy interface.

Concentrations left uninitialised will be set to a default value of zero. However this is generally not reccomended as it can lead to rather sever problems in networks containing cycles.

Comments

Comments are defined as starting with a hash (#) character and continue to the end of the line, as with Python. They are completely disregrded by ScrumPy.

   1 Reac3:    # A comment about reaction 3
   2    2 a -> 3 b
   3    ~
   4 
   5 # This coments out the entire line, useful for temporarily removing a reaction
   6 
   7 #Reac4:    # A comment about reaction 3
   8 #   a -> 3 b
   9 #   ~

Directives

None: SpyMDL (last edited 2012-10-23 16:46:24 by mark)