Skip to content
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

Support for petab v2 experiments #332

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Dec 5, 2024

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 simulationConditionIds (but does not do full validation yet)
  • extends PEtab v1 up-conversion to create a new experiment table.

@dweindl dweindl force-pushed the v2_experiments branch 2 times, most recently from d2715e9 to fae03d1 Compare December 16, 2024 21:39
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 72.61905% with 23 lines in your changes missing coverage. Please review.

Project coverage is 74.66%. Comparing base (1d3fda1) to head (fc31a50).

Files with missing lines Patch % Lines
petab/v2/lint.py 68.29% 6 Missing and 7 partials ⚠️
petab/v2/petab1to2.py 78.94% 5 Missing and 3 partials ⚠️
petab/v1/calculate.py 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #332      +/-   ##
===========================================
+ Coverage    74.56%   74.66%   +0.09%     
===========================================
  Files           56       56              
  Lines         5521     5573      +52     
  Branches       959      976      +17     
===========================================
+ Hits          4117     4161      +44     
- Misses        1039     1040       +1     
- Partials       365      372       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dweindl dweindl marked this pull request as ready for review December 17, 2024 14:44
@dweindl dweindl requested a review from a team as a code owner December 17, 2024 14:44
@dweindl dweindl force-pushed the v2_experiments branch 5 times, most recently from 8806a8e to a426ac8 Compare December 18, 2024 17:43
Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

petab/v2/petab1to2.py Outdated Show resolved Hide resolved
Comment on lines +110 to +114
if exp_id in experiments: # noqa: B023
i = 1
while f"{exp_id}_{i}" in experiments: # noqa: B023
i += 1
exp_id = f"{exp_id}_{i}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this occur? Ah, because no symbol is inserted between preeq_cond_id and sim_cond_id? Then maybe my suggestion with __ means you can remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be measurements for ('foo', 'bar') and (None, 'foo__bar') which would result in colliding experiment IDs. You never know...

{
v2.C.EXPERIMENT_ID: exp_id,
v2.C.CONDITION_ID: preeq_cond_id,
v2.C.TIME: float("-inf"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use -TIME_STEADY_STATE, or add some TIME_PREEQUILIBRATION

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added TIME_PREEQUILIBRATION

dweindl and others added 2 commits December 18, 2024 18:58
@dweindl dweindl merged commit 6a433e0 into PEtab-dev:develop Dec 18, 2024
7 checks passed
@dweindl dweindl deleted the v2_experiments branch December 18, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants