pwAddY


 pwAddY(m, rhs, ID, scalingParameter, errorModelRhs, noiseType, unit, name,
        description, alternativeIDs, designerProps, classname)

 Adds an observable to a model which connects a model to an
 experimental measurement.

 

Arguments for pwAddY

 rhs               string  Right hand side of the observation
                           May include x, k, a, s IDs.
 ID                ID
 scalingParameter  ID
 errorModelRhs     string  Default: 'y * 0.1 + max(y) * 0.05'
 noiseType         string  Currently only 'Gaussian' supported.
 unit              string
 name              string  descriptive name
 description       string  Description of the observation
 alternativeIDs    cell array  Alternative IDs which will be used for
                            automatic mapping when adding external data.
 designerProps     only internal use
 classname         string

 

Description

 Observables Y are functions of dynamical variables X, dynamical parameters K,
 algebraic assignments A, and scaling factors S. They correspond to measurable
 quantities in an experiment. The right hand side of the observation function
 is specified as a mathematical expression of the IDs belonging X, K, and S.
 Please note that one scaling parameter is already implicitely set as
 discussed below. If you don't need a scaling factor, please use the
 following approach:

  m = pwAddY(m, rhs, ID, 'one');
  m = pwAddS(m, 'one', 1, 'fix');

 

Scaling parameters

 Example:

 Experimentally measured is the total amount of phosphorylated Stat, i.e. pS + 2 * pS_pS.
 Then the corresponding observable reads:

  pwAddY(m, 'pS + 2 * pStat_pS', 'pS_obs');

 PottersWheel automatically assumes the existence of a scaling parameter
 between model observable and experimental measurements:

  yMeasured       = scalingFactor * yModel (general)
  pS_obs_Measured = scale_pS_obs  * pS_obs (example)

 The name of the scaling factor is either set automatically to the observation
 name with prefix 'scale_' or is specified by the user in the
 scalingParameter argument:

  pwAddY(m, 'pS + 2 * pStat_pS', 'pS_obs', 'scale_pS_obs');

 Due to this behavior, it is usually not required to insert a scaling parameter into the
 right hand side. In fact, if your measurments do not require a scaling parameter,
 please fix the scaling to a value of 1 using pwAddS:

  m = pwAddS(m, 'scale_pS_obs', 1, 'fix');

 Additional scaling parameters can be used to fit unknown parameters which
 only occur within the observation function. Therefore, scaling parameters
 should rather be considered as 'observational parameters'.

 

Error model

 Each data point will be weighted during model fitting depending on
 its error bar, i.e. standard deviation. The standard deviation is
 either calculated using an error model, estimated on a spline-based
 approximation or given explicitly by the user in the data file (see pwAddData).

 A default error model is always required, e.g. in order to simulate
 synthetic data. To specify Gaussian noise with a standard deviation
 of 10% relative to y plus 5% absolute (relative to max(y) over all y):

  m = pwAddY(m, 'pS + 2 * pS_pS', 'pS_obs', 'scale_pS_obs', '0.1*y + 0.05*max(y)');

 When using max(yAllStimuli)instead of max(y), the maximum of all
 y values of all stimuli will be calculated.

 

Keywords

 The keywords 'any_', 'only_', '_withAny_', and '_withOnly_' can
 be used in the right hand side to automatically create observation functions.
 The PottersWheel naming convention has to be used during modeling
 (basic species start with a capital letter, modifications are lowercase
 prefixes, complexes are bound using the underscore '_' character).

 For example the expression 'any_S' will be replaced by a sum of all species
 containing S, independent of their current modification state. Species with
 two or more molecules of S get a multiplier, like 2 * pS_pS. Hence, in a
 model comprising only S, pS and pS_pS, the following observation functions
 are equivalent:

  m = pwAddY(m, 'S + pS + 2 * pS_pS');
  m = pwAddY(m, 'any_S');

 If only a subset of species is required, make use of the only_pS or only_S
 syntax. The first will be replace by the sum over all species containing pS, the
 second by the sum over all species containing S (ignoring pS).
 Equivalent are:

  m = pwAddY(m, 'pS + 2 * pS_pS');
  m = pwAddY(m, 'only_pS');

 and

  m = pwAddY(m, 'S');
  m = pwAddY(m, 'only_S');

 Finally, one is sometimes interested in species that are within a complex with other
 species. You can control this using _withAny_ or _withOnly_. The expression
 only_A_withAny_B will be replaced by the sum over all species with a B independent of
 its modification and one or more unmodified A's. Similarly, any_A_withOnly_pB matches
 all species containing pB and any modification of A. The multiplier is based in both
 cases on A, i.e. the species A_A_pB enters the sum as 2 * A_A_pB.

 When loading a model, the applied replacements are shown in the command window
 and can be validated.

 The approach is applicable also for derived variables.


See also

pwAddS
pwAddZ
pwAddR