Ideas
This page is for collecting ideas for future developments of the transsys framework.
Introduce Variables
Purpose
transsys programs contain numerical values which may be set by numerical optimisation. In many use cases, it is desirable to constrain the optimiser so that only some values are optimised. Currently, the optimisation framework provides parameter transformers which can differentiate between numerical values based on their context within a transsys program, and SimGenex provides a whitelisting mechanism that selects values for optimisation based on the factors or genes which they are part of.
However, these mechanisms are limited and they can be cumbersome to use. Parameterising optimsers via whitelists is not really a job for SimGenex, and transformer configuration files can be difficult to maintain. Perhaps more importantly, it is not possible to instruct optimisers to operate on two (or more) values, but to keep them identical. As an example, consider a transsys program which contains two factors representing a wildtype and a mutant form of a protein:
factor f_wt { decay: 0.1; } factor f_mut { decay: 0.1; }
Now, assume we don't have data to set the decay rate, but we know that the mutation makes no difference to that, so the two factors should always have the same decay rate.
Proposal
The transsys language could be extended to support variable declarations. The example above might then be expressed as:
var d = 0.1; factor f_wt { decay: d; } factor f_mut { decay: d; }
Now an optimiser could straightforwardly be instructed to operate on the variable d
, and the factors f_wt
and f_mut
always decay with the same rate.
Open Issues
The use case of optimising all values in a transsys program would be encumbered to some extent, as the transsys program would have to be rewritten to contain a lot of variables, each of which would occur only once in the program.
Perhaps more seriously, it would not be possible anymore to define constraints based on the context of a value, as the TranssysTypedParameterTransformer
currently does.
This could be addressed by organising variables hierarchically, e.g. as in
var d.f1 = 0.1; var d.f2 = 0.2; factor f1_wt { decay: d.f1; } factor f1_mut { decay: d.f1; } factor f2 { decay: d.f2; }
On this basis, transformer constraints could be specified for all values in the d
group, and by creating groups for decay, diffusibility, constitutive, aspec, amax, rspec and rmax, the functionality of the
TranssysTypedParameterTransformer
could be pretty much achieved.
One problem with the above is that the group name (d
) has to be typed multiple times, and mistyping it won't trigger an error, it would result in the inadvertent creation of another group. An alternative syntax can resolve this:
var d { f1 = 0.1; f2 = 0.2; }