-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long formats for conditions and experiments (timecourses) #586
Comments
Thanks a lot Dilan for accommodation the suggestions from #585 .🙏 Looks good to me for the most part, but I have two questions
Can you give examples for the use of these? Cause to me, only the
Do you mean "is activated" instead of "is active"? |
Sure! Thanks for the feedback.
Given an
Given an original assignment rule for
I was trying to capture all possibilities, include the "relative" and "isDelta" changes discussed in #564 and #585, and the "bolus" vs. "infusion" that you implemented in PumasQSP [1] via the
I agree, I'm not sure how to resolve this best. This is one reason why I limited
For the [1] https://help.juliahub.com/pumasqsp/stable/tutorials/petabimport_tutorial/#Detailed-field-description |
If
Then I'd leave them out for now.
Related to previous discussions, we could introduce a
This could be clarified by replacing
I'd go for specifying some priority as suggested for the conditions table.
|
Related to PEtab-dev/PEtab#586 * constants for new yaml fields / table columns / ... * read/write experiment table * add experiments table to Problem, and populate from yaml * add first validation functions * include missing modules in API docs To be complemented by separate pull requests.
Add basic support for PEtab version 2 experiments (see also PEtab-dev/PEtab#586, and PEtab-dev/PEtab#581). Follow-up to #334. Partially supersedes #263, which was started before petab.v1/petab.v2 were introduced and before PEtab-dev/PEtab#586. * updates the required fields in the measurement table * updates some validation functions to not expect the old `simulationConditionId`s (but does not do full validation yet) * extends PEtab v1 up-conversion to create a new experiment table. --------- Co-authored-by: Dilan Pathirana <[email protected]>
Brief update from some further discussions with @dilpath: For the condition table, more appropriate column names might be
I would suggest to consolidate Another issue was: If I want to have pre-equilibration with the default model parameters and then switch to some other condition - how could I specify that? Previously, this could have been implemented by an all-NaN condition in the conditions table. This is no longer possible. After considering a couple of alternatives (e.g., empty conditionId in the experiment table; some conditionId in the experiment table that does not occur in the conditions table) , the most reasonable one seemed to be introducing some kind of no-op Feedback is welcome. |
Fully agreed.
Yes.
For me, the most natural thing would be the described alternative of conditionId that appears in the experiment table but not the conditions table. I see how this could make linting/validation more difficult and typos are more dangerous, but wouldn't making sure that all conditions in the condition table appear in the experiments table be enough to catch the worst errors? |
That typo issue seemed relevant to me and I thought the proposed no-op makes the intent more explicit. I'd have some preference for explicitness, but I could live with either. Whether unused conditionIds should be considered illegal, or just optionally trigger some warning is another question that should be clarified (same as, for example, unused observables -- I don't think there is anything in the specs). But even if we consider it illegal, we still wouldn't know if some conditionId in the experiment table was left undefined on purpose or not. Maybe that argument is isn't that strong, given that we have a number optional fields, and allow empty experimentIds in the measurement table for trivial timecourses... |
Fair point
Also good point, I generally would prefer warnings only as it makes it a bit easier to reuse tables across problems. |
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
constant
ORinitial
OR ...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
[constant
ORinitial
OR ..., REQUIRED]How the value
inputValue
changes the entityinputId
.constant
The entity
inputId
is fixed to the valueinputValue
. The entity must be static in time while the condition is active, e.g. a model parameter.initial
The entity
inputId
is 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 SBML
rateRule
orassignmentRule
for the entity.relative
indicates 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.rate
can only apply to entities that already have a rate rule in the original model.assignment
/relativeAssignment
can only apply to entities that already have an assignment rule in the original model.relativeRate
can 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 entity
inputId
. 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-varyinginputType
s likerate
), as defined in the experiments table.Experiments table
-inf
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.
-inf
indicates pre-equilibration (e.g. for drug treatments, the model would be pre-equilibrated with the no-drug condition).conditionId
[conditionId, REQUIRED]A
conditionId
from 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).inf
Detailed field description
observableId
andmeasurement
are unchanged.experimentId
[experimentId, OPTIONAL]An
experimentId
from the experiments table. This replaces thepreequilibrationConditionId
andsimulationConditionId
in 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 finitetime
in the experiments table.Example
Conditions table
Experiments table
timecourse1
has a PEtab v1preequilibrationConditionId
(preeq_cond1
), a PEtab v1simulationConditionId
(cond1
), and then a 3rd timecourse period att=10
with conditioncond2
.experiment1
is not a timecourse, rather a single-condition simulation starting att=-5
where two conditions are applied simultaneously.switch_sequence
is a repeating timecourse, equivalent to a nested timecourse (see #585).Open points
inputType=constant
, but then an SBML event affects the same parameter? We could simply disallow this for now.experiment1
in the example). We could decide that they are only allowed if they change different entities. Otherwise we would need to care about some ordering.inputId
->targetId
, orexperimentId
->timecourseId
. Let me know what you prefer.experimentId
was chosen because most users won't care about timecourses, but then would still need to use that table for their single-condition "timecourses".The text was updated successfully, but these errors were encountered: