-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Follow-up to #585 (no need to read that).
Here are specs for long formats of the conditions and experiments (timecourses) tables. Additional feedback is very welcome!
Conditions table
| conditionId | inputId | inputType | inputValue |
|---|---|---|---|
| PETAB_ID | NON_ESTIMATED_ENTITY_ID | constant OR initial OR ... |
PETAB_MATH |
| e.g. | |||
| cond1 | rate1 | constant | 1 |
| cond2 | species1 | initial | species1 + 5 |
Row and column ordering are arbitrary, although using the above column ordering may improve human readability.
Additional columns are allowed, for example, to specify a human-friendly name for the condition.
Other optional columns we could officially support include conditionName, but this might mean duplicated the same condition name to all rows with that condition ID...
Detailed field description
conditionId[PETAB_ID, REQUIRED]
Unique identifier for the simulation/experimental condition, to be used in the experiments table.inputId[NON_ESTIMATED_ENTITY_ID, REQUIRED]
An entity that will be changed in this condition.inputType[constantORinitialOR ..., REQUIRED]
How the valueinputValuechanges the entityinputId.constant
The entityinputIdis fixed to the valueinputValue. The entity must be static in time while the condition is active, e.g. a model parameter.initial
The entityinputIdis initialized to the valueinputValue. The entity must be dynamic and defined in terms of time-derivative information, e.g. a model species involved in some reaction or specified by an ordinary differential equation.rate/assignment/relativeRate/relativeAssignment
These are currently not supported, until a tool implements them. However, they are reserved to mean changes equivalent to setting a new SBMLrateRuleorassignmentRulefor the entity.relativeindicates relative changes to pre-existing rates or assignments. edit: These can only be applied to entities (inputId) that are already governed by these kinds of dynamics. i.e.ratecan only apply to entities that already have a rate rule in the original model.assignment/relativeAssignmentcan only apply to entities that already have an assignment rule in the original model.relativeRatecan only apply to entities that already have either a rate rule or reactions.
inputValue[PETAB_MATH, REQUIRED]
The value that will be used to change the entityinputId. If a PEtab math expression involves time-dependent entities, then they represent their values at the simulation time when the condition is activated (edit: or active, for time-varyinginputTypes likerate), as defined in the experiments table.
Experiments table
| experimentId | time | conditionId |
|---|---|---|
| PETAB_ID | NUMERIC OR -inf |
conditionId |
| e.g. | ||
| timecourse1 | -inf | cond1 |
| timecourse1 | 0 | cond2 |
Row and column ordering are arbitrary, although using the above column ordering may improve human readability.
Additional columns are allowed, for example, to specify a human-friendly name for the experiment.
Detailed field description
experimentId[PETAB_ID, REQUIRED]
Unique identifier for the experiment, to be used in the measurements table.time[NUMERIC OR-inf, REQUIRED]
The time when the condition will become active, in the time unit specified in the model.-infindicates pre-equilibration (e.g. for drug treatments, the model would be pre-equilibrated with the no-drug condition).conditionId[conditionId, REQUIRED]
AconditionIdfrom the conditions table.
Measurements table
Only the required or changed columns are included here (other optional columns, e.g. noiseFormula, are still supported by irrelevant to this discussion).
| observableId | [experimentId] | time | measurement |
|---|---|---|---|
| observableId | [experimentId] | NUMERIC OR inf |
NUMERIC |
| e.g. | |||
| obs1 | experiment1 | 5 | 2 |
Detailed field description
observableId and measurement are unchanged.
experimentId[experimentId, OPTIONAL]
AnexperimentIdfrom the experiments table. This replaces thepreequilibrationConditionIdandsimulationConditionIdin PEtab v1. If unspecified, then the simulation will be performed with the default parameters in the model.time[NUMERIC ORinf, REQUIRED]
Time point of the measurement in the time unit specified in the SBML model.inf(lower-case) indicates steady-state measurements. Cannot be lower than the lowest finitetimein the experiments table.
Example
Conditions table
| conditionId | inputId | inputValue | inputType | units |
|---|---|---|---|---|
| cond1 | rate1 | 0 | constant | mg/s |
| cond1 | rate2 | 1 | constant | m/s |
| cond2 | species1 | 0 | initial | mol |
| preeq_cond1 | rate1 | 1 | constant | g/s |
| switch_on | switch | 1 | constant | dimensionless |
| switch_off | switch | 0 | constant | dimensionless |
Experiments table
| experimentId | time | conditionId |
|---|---|---|
| timecourse1 | -inf | preeq_cond1 |
| timecourse1 | 0 | cond1 |
| timecourse1 | 10 | cond2 |
| experiment1 | -5 | cond1 |
| experiment1 | -5 | cond2 |
| switch_sequence | 0 | switch_on |
| switch_sequence | 1 | switch_off |
| switch_sequence | 2 | switch_on |
| switch_sequence | 3 | switch_off |
| switch_sequence | 4 | switch_on |
| switch_sequence | 5 | switch_off |
timecourse1 has a PEtab v1 preequilibrationConditionId (preeq_cond1), a PEtab v1 simulationConditionId (cond1), and then a 3rd timecourse period at t=10 with condition cond2.
experiment1 is not a timecourse, rather a single-condition simulation starting at t=-5 where two conditions are applied simultaneously.
switch_sequence is a repeating timecourse, equivalent to a nested timecourse (see #585).
Open points
- There is currently some undefined behavior in the conditions table -- do we clarify that now or in a future PEtab v2.1 when the use cases are clearer? For example, what happens when a user specifies a parameter in the conditions table with
inputType=constant, but then an SBML event affects the same parameter? We could simply disallow this for now. - How are simultaneous conditions handled (e.g.
experiment1in the example). We could decide that they are only allowed if they change different entities. Otherwise we would need to care about some ordering. - I'm happy to change naming, e.g.
inputId->targetId, orexperimentId->timecourseId. Let me know what you prefer.experimentIdwas chosen because most users won't care about timecourses, but then would still need to use that table for their single-condition "timecourses".