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

Resetting initial concentrations in the simulation and is not propagated to BB after commit #2255

Closed
Yuri05 opened this issue Jul 5, 2022 · 16 comments

Comments

@Yuri05
Copy link
Member

Yuri05 commented Jul 5, 2022

In the example from #2253 I click on the Reset button in the initial concentration in the simulation

Then I commit the Individual from the simulation back to the BB.

  • In the Individual-BB the value is correctly resetted to 0 (btw, suddenly I see an entry for Endosome initial concentration which was not shown before. Why?)
    grafik
  • But in the Protein-Expression-BB the value is still 1. Closing/Reopening the Protein-Expression-BB does not help, so it's not a refresh progress. And also here I suddenly get the entry for Endosome...
    grafik
@msevestre
Copy link
Member

@Yuri05
I don't understand what you mean with Endosome
image

it's always their as soon as you show initial concentration in expression profile

@msevestre
Copy link
Member

msevestre commented Jul 29, 2022

@Yuri05
I do not have a reset button in the simulation
image

it is now a constant with value 1. Probably because of the fix in #2253

@msevestre
Copy link
Member

and in fact I would expect this behavior

@msevestre
Copy link
Member

So as far as I am concerned, this is fixed. Closing. Please reopen if this is not the case

@msevestre msevestre moved this to Done in V11 - Update 1 Jul 29, 2022
@msevestre msevestre self-assigned this Jul 29, 2022
@Yuri05
Copy link
Member Author

Yuri05 commented Aug 1, 2022

OK, Endosome is always shown now. Pretty sure it was not the case before - anyway, now it's consistent, so all good.

Regarding the rest of the issue: now the behaviour is different. There is no reset button in the simulation indeed.
But what happens after committing changed initial conc value from simulation to individual - not sure if it is correct.

E.g. in the project attached P1_2.zip:

  • I have set Bone|Intracellular|CYP|Initial Concentration = 2 in the Protein Expression BB, then created an Individual and a simulation with it
  • In the simulation I have ovewritten this initial concetration with 20 and commited the individual into the BB
  • After that I have the following situation
    • In the Expression Profile BB, the value is 2 and the Reset button is active. If I click on it: the value is resetted back to NaN and the button disappears (correct bahaviour I guess)
      grafik
    • In the individual BB, the value is 20 (correct) and the Reset button is active. If I click on it: nothing happens (value remains =20, Reset button remains active)
      grafik
    • OK, just noticed: the situation with non-working Reset button in individual is already after adding the enzyme to it. So if create another individual and add my enzyme: the value of the initial concentration is the one from the expression profile BB (correct) and the Reset button is active without any effect. I have created another issues for this: When overwriting initial protein concentration in Expression Profile BB: Reset button is active in Individual with no effect #2270

@msevestre
Copy link
Member

I can't reproduce your other issue.
On a NEW Simulation (so that the formula is not taken but a constant as implemented)

  • If I am setting a value in the simulation (say 10)
    image
  • Commit to bb
    image
    In individual I have
    image

and in expression profile I have
image

This will only work with new simulations but I think the behavior is correct

@msevestre
Copy link
Member

Please reopen and explain if this is not desired

@PavelBal
Copy link
Member

PavelBal commented Sep 8, 2022

@Yuri05 so you do not miss it.

@Yuri05
Copy link
Member Author

Yuri05 commented Dec 27, 2022

At the moment (PK-Sim 11.1.110) the behaviour is different from described here(#2255 (comment))

E.g. in this project P10_IC.zip I set all relExp=1 in the protein-expressions-BB (thus the initial concentrations in all intracellular compartments have some non-zero values), then added the enzyme to an individual nad created a simulation:

grafik

After this, I have overwritten some intracellular initial concentrations in the simulation with the value 10 and commited the individual from the simulation back to the building block (the result is in this project: P10_IC_changed_in_Sim.zip

grafik

This changed the values to 10 in the individual:

grafik

But not in the expression profile used:
grafik

P.S. If after that I change any value in my expression profile: all intracellular initial concentrations in the individual jump from 10 to another values.

@msevestre @PavelBal

@Yuri05 Yuri05 reopened this Dec 27, 2022
@Yuri05 Yuri05 moved this from Done to In Progress in V11 - Update 1 Dec 27, 2022
@PavelBal
Copy link
Member

PavelBal commented Jan 9, 2023

This changed the values to 10 in the individual:
But not in the expression profile used:

I would say this is the correct behavior.

P.S. If after that I change any value in my expression profile: all intracellular initial concentrations in the individual jump from 10 to another values.

This I consider as a bug. The values in the individuals should only jump when explicitely updating from Expressions BB.

@msevestre
Copy link
Member

@Yuri05 I have tried yesterday and today to reproduce the issue but I can't
Can you show me how to reproduce? I don't even see a refresh problem

So I am not sure with which version you tried. But I can't reproduce and I have spent just too much time trying lol.

@Yuri05
Copy link
Member Author

Yuri05 commented Jan 13, 2023

Tricky indeed :) I could finally reproduce with the latest nightly 11.1.126. Below the steps to reproduce.

The interesting part: if I save the project after step 5 ("Create simulation"), reopen it and continue with the step 6 - everything works fine. Thus I could not reproduce the problem with the project which I attached above as well :)
But if you create everything from scratch as described below - here we go :)

  1. Add enzyme CYP and set all relative expressions = 1
Screen

grafik

  1. Add Individual and add CYP to individual

  2. Add arbitrary compound

  3. Add arbitrary application

  4. Create simulation

  5. In the simulation: set intracellular initial concentration of all tissue organs = 10

Screen

grafik

  1. Commit Individual from the simulation to BB

  2. Go to the Expression profile and check intracellular initial concentrations: they are not set

Screen

grafik

If I save the project NOW and reopen it: initial concentrations in the expression profile are still not set, so it's not just a refresh issue.

@msevestre
Copy link
Member

I spent so much time on this....
Ok doest not feel like such a bad bug after all

@Yuri05
Copy link
Member Author

Yuri05 commented Jan 13, 2023

doest not feel like such a bad bug after all

Not sure about this. Seems we create some corrupted state here - no idea what other side effects this could have.
For example, if I save the project at the end of the whole workflow above, reopen it and change anything in my expression profile: all initial concentrations in the individual become resetted etc.

Can you reproduce with the steps above?

@msevestre
Copy link
Member

I'll try in the afternoon today. It's good to have at least a way to reproduce
And I didn't read that the state was corrupted when the project was saved to I might be able to see what's missing

@msevestre
Copy link
Member

@Yuri05 This with saving project was key to understand what's going on. this had to be a registration issues
After good 5 hours of debugging in two days, I think I understand. Even debugging visually because it was so hard to understand lol

image

@Yuri05 Yuri05 closed this as completed in 6157015 Jan 16, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in V11 - Update 1 Jan 16, 2023
@Yuri05 Yuri05 moved this from Done to Verified in V11 - Update 1 Jan 19, 2023
msevestre added a commit that referenced this issue Mar 20, 2023
* Fixes #2439 Misleading info in global POP PK Analysis if no parameter… (#2459)

* Fixes #2439 Misleading info in global POP PK Analysis if no parameters can be calculated

* PR feedback

* Fixes #2469 show hidden entities (#2488)

* Fixes buil failing (#2489)

* Fixes #2495 failing tests (#2499)

* Fixes #2485 observed added mobi (#2500)

* Fixes #2484 bug when exporting pop simulation (#2503)

* Fixes #2275 #2279 #2277 by updating OSPSuite.Core (#2506)

* Fixes #2405 mapping lost after configure (#2507)

* Fixes #2255 resetting concentration issue (#2512)

* Fixes #2255 resetting concentration issue

* Small update to stay symetrical

* Update MoleculeExpressionTask.cs

* Modify the comment to reflect population

Co-authored-by: Robert McIntosh <[email protected]>

* update core (#2514)

* Prepare for v11_1 (#2515)

* Fixes #2516 Cannot run population simulations imported from pkml (#2517)

* Fixes #2516 Cannot run population simulations imported from pkml

* PR feedback

* Fixes #2518 11.1 Cannot show PK-Analysis in a population simulations … (#2520)

* Fixes #2518 11.1 Cannot show PK-Analysis in a population simulations imported from pkml

* PR feedback

* PR feedback

* Updated OSPSuite.Core and OSPSuite.BuildingBlockTemplates (#2524)

* Updated OSPSuite.Core and OSPSuite.BuildingBlockTemplates

* Updated OSPSuite.Core again

Co-authored-by: Yuri05 <[email protected]>

* Update documentation v11.1

* Fixes #2553 pksim changes molecule name (#2561)

* Fixes #2536 loading project from snapshot observed data (#2560)

* Fixes #2536 loading project from snapshot observed data

* Fixes #2536 loading project from snapshot observed data

* Fixes #2536 loading project from snapshot observed data

* Fixes #2558 project created with v10< do not export properly (#2559)

* Fixes #2563 notification weird column no image data (#2564)

* Try update core

* Update to latest core

* More work to make sure we can still load indiviudals

* Remove creation of PSV for simulation

* Fixes test project"

* Fixes test project"

* No more psv

---------

Co-authored-by: Robert McIntosh <[email protected]>
Co-authored-by: Juri Solodenko <[email protected]>
Co-authored-by: Yuri05 <[email protected]>
rwmcintosh added a commit that referenced this issue Apr 3, 2023
* Fixes #2439 Misleading info in global POP PK Analysis if no parameter… (#2459)

* Fixes #2439 Misleading info in global POP PK Analysis if no parameters can be calculated

* PR feedback

* Fixes #2469 show hidden entities (#2488)

* Fixes buil failing (#2489)

* Fixes #2495 failing tests (#2499)

* Fixes #2485 observed added mobi (#2500)

* Fixes #2484 bug when exporting pop simulation (#2503)

* Fixes #2275 #2279 #2277 by updating OSPSuite.Core (#2506)

* Fixes #2405 mapping lost after configure (#2507)

* Fixes #2255 resetting concentration issue (#2512)

* Fixes #2255 resetting concentration issue

* Small update to stay symetrical

* Update MoleculeExpressionTask.cs

* Modify the comment to reflect population

Co-authored-by: Robert McIntosh <[email protected]>

* update core (#2514)

* Prepare for v11_1 (#2515)

* Fixes #2516 Cannot run population simulations imported from pkml (#2517)

* Fixes #2516 Cannot run population simulations imported from pkml

* PR feedback

* Fixes #2518 11.1 Cannot show PK-Analysis in a population simulations … (#2520)

* Fixes #2518 11.1 Cannot show PK-Analysis in a population simulations imported from pkml

* PR feedback

* PR feedback

* Updated OSPSuite.Core and OSPSuite.BuildingBlockTemplates (#2524)

* Updated OSPSuite.Core and OSPSuite.BuildingBlockTemplates

* Updated OSPSuite.Core again

Co-authored-by: Yuri05 <[email protected]>

* Update documentation v11.1

* Fixes #2553 pksim changes molecule name (#2561)

* Fixes #2536 loading project from snapshot observed data (#2560)

* Fixes #2536 loading project from snapshot observed data

* Fixes #2536 loading project from snapshot observed data

* Fixes #2536 loading project from snapshot observed data

* Fixes #2558 project created with v10< do not export properly (#2559)

* Fixes #2563 notification weird column no image data (#2564)

* Try update core

* Update to latest core

* More work to make sure we can still load indiviudals

* Remove creation of PSV for simulation

* Fixes test project"

* Fixes test project"

* No more psv

---------

Co-authored-by: Robert McIntosh <[email protected]>
Co-authored-by: Juri Solodenko <[email protected]>
Co-authored-by: Yuri05 <[email protected]>
msevestre added a commit that referenced this issue Jun 23, 2023
* Fixes #2344 Implement "Parameter Value Export" for Expression Profiles BB in PK-Sim (#2442)

* use GetAllChildren of Individual (#2445)

* 2438 outptu mappings not cleared (#2444)

* waiting for Core PR to be accepted

* nugets updated

* updating nuget

* 2364 export expression profile domain object  (#2461)

* initial try

* temp nuget update

* adjusting mapper

* Fixes #2344 Implement "Parameter Value Export" for Expression Profiles BB in PK-Sim (#2442)

* use GetAllChildren of Individual (#2445)

* 2438 outptu mappings not cleared (#2444)

* waiting for Core PR to be accepted

* nugets updated

* updating nuget

* temp nuget update

* working export

* spacing

* updating packages

* do not map object path for  'ROOT'

* do not repeat formulae in the formula cache

* adding tests

* fixing test

* correction

* consolidate assets

* correcting nugets

* code review changes

* code review

* PR feedback

* update core version

* Appveyor builds turned on

* PR feedback

* pr feedback

Co-authored-by: Robert McIntosh <[email protected]>

* Fixes #2470 Refactor StartValues vs PathWithValueEntity (#2473)

* 2475 expression profile from pksim (#2476)

* #784_expression_profile_from_pksim

* updating with mapper

* Fixes #2475 Create expression profile from PK-sim

* add dimensions as resource for tests

* Add pkparameters for test project

* add sqlite db

* PR feedback

* Fixes #2480 individual serialization (#2494)

* work in progress

* work in progress

* Revise to map origin data as strings instead of keeping a common OriginData class

* Update core and mapping of origin data

* Testing the mapper

* testing the mapper

* revert an unintentional change

* PR Feedback

* Update core (#2502)

* Fixes #2508 Do not export calculation methods with Individual when there is only one possible value (#2510)

* Fixes #2508 Do not export calculation methods with Individual when there is only one possible value

* PR feedback

* PR feedback and update core

* update core

* update core osmoses (#2513)

* update core (#2528)

* Fixes update latest core (#2541)

* 2525 creating individual from MoBi (PK-Sim code changes) (#2526)



---------

Co-authored-by: Robert McIntosh <[email protected]>

* Fixes #2534 Imported expression profile is not populated from the PKS… (#2548)

* Fixes #2534 Imported expression profile is not populated from the PKSim Database

* PR Changes

* PR feedback

* update core

* Fixes #2552 Export of Expression profile to PKML - include initial conditions (#2554)

* Update PKSIm with latest changes (#2555)

* Fixes #2551 Use DevExpress skin to color grid cells (#2556)

* No more psv (#2567)

* Fixes #2439 Misleading info in global POP PK Analysis if no parameter… (#2459)

* Fixes #2439 Misleading info in global POP PK Analysis if no parameters can be calculated

* PR feedback

* Fixes #2469 show hidden entities (#2488)

* Fixes buil failing (#2489)

* Fixes #2495 failing tests (#2499)

* Fixes #2485 observed added mobi (#2500)

* Fixes #2484 bug when exporting pop simulation (#2503)

* Fixes #2275 #2279 #2277 by updating OSPSuite.Core (#2506)

* Fixes #2405 mapping lost after configure (#2507)

* Fixes #2255 resetting concentration issue (#2512)

* Fixes #2255 resetting concentration issue

* Small update to stay symetrical

* Update MoleculeExpressionTask.cs

* Modify the comment to reflect population

Co-authored-by: Robert McIntosh <[email protected]>

* update core (#2514)

* Prepare for v11_1 (#2515)

* Fixes #2516 Cannot run population simulations imported from pkml (#2517)

* Fixes #2516 Cannot run population simulations imported from pkml

* PR feedback

* Fixes #2518 11.1 Cannot show PK-Analysis in a population simulations … (#2520)

* Fixes #2518 11.1 Cannot show PK-Analysis in a population simulations imported from pkml

* PR feedback

* PR feedback

* Updated OSPSuite.Core and OSPSuite.BuildingBlockTemplates (#2524)

* Updated OSPSuite.Core and OSPSuite.BuildingBlockTemplates

* Updated OSPSuite.Core again

Co-authored-by: Yuri05 <[email protected]>

* Update documentation v11.1

* Fixes #2553 pksim changes molecule name (#2561)

* Fixes #2536 loading project from snapshot observed data (#2560)

* Fixes #2536 loading project from snapshot observed data

* Fixes #2536 loading project from snapshot observed data

* Fixes #2536 loading project from snapshot observed data

* Fixes #2558 project created with v10< do not export properly (#2559)

* Fixes #2563 notification weird column no image data (#2564)

* Try update core

* Update to latest core

* More work to make sure we can still load indiviudals

* Remove creation of PSV for simulation

* Fixes test project"

* Fixes test project"

* No more psv

---------

Co-authored-by: Robert McIntosh <[email protected]>
Co-authored-by: Juri Solodenko <[email protected]>
Co-authored-by: Yuri05 <[email protected]>

* Fixes #2570 Move IndividualToIndividualBuildingBlockMapper from presentation to core (#2572)

* 2569 use individualbuildingblock and module from core (#2571)

* WIP #2569 use Individual Building block and module from core

* Some local variable rename. Build configuration not used anymore

* Map also indiviudal and expression building block. Needs #2570 to compile

* More work on #2569 to make test pass again:

* Fixes #2569 use of individual building blocks

* Fixes #2569 use individual building block and module from core

* Fixes #2577 Exported expression profiles contains duplicate formulae (#2578)

* 2584 update to support moduleconfiguration (#2585)

* Fixes #2584 update to support module configuration

* Fixes #2584 update to support module configuration

* Make test pass again

* 2586 parameters not common for all species (#2587)

* Added views to DB

* DB - adjusted naming of view and columns

* Fixes #2586 Provide info which parameters are not common for all species

* Fixes #2586 Provide info which parameters are not common for all species

* review comments

* Add serializer for the new dummy type

---------

Co-authored-by: Yuri05 <[email protected]>

* Fixes #2589 only export species indepednent parameters to spatial str… (#2591)

* Fixes #2589 only export species indepednent parameters to spatial structure

* Update to real DLLs

* Fixes typo

* Remove unused action

* Fixes update core (#2593)

* Fixes update core

* Fixes weird definition

* Update latest core (#2594)

* update to core 12.0.170 (#2604)

* Fixes #2596 implement hepatic impairment disease state (#2597)

* WIP #2596 implement hepatic impairment disease state

* More work on #2596

* More work on #2596

* More work on #2592

* Fixes #2596 implement hepatic impairement disease sate

* Fixes #2596

* Fixes #2596

* Small update

* Fixes merge conflict

* 2615 overriding ref conc and applying hi should use the updated refconc (#2620)

* Some rename first

* Add test showing issue with #2615

* Update to algorithm to match specificaitons

* Move logic of disease state to own view

* Fixes #2615 overriding ref conc

* Update DiseaseStateDTO.cs

just a typo

* Fixes failing test

* Fixes #2615 overriding ref conc

---------

Co-authored-by: Robert McIntosh <[email protected]>

* Core updates (#2625)

* Update to 12.0.178

* update to 12.0.178

* Update core

* update core (#2629)

* Fixes #2621. Fixes #2622 (#2630)

* Fixes #2621. Fixes #2622

* Fixes #2621. Fixes #2622

* Fixes #2621

* update core (#2633)

* Fixes #2624. Fixes #2623 (#2637)

* Fixes #2638 cannot export HI to snapshot (#2639)

* Fixes #2638 cannot export HI to snapshot

* Update DiseaseState.cs

make sure we use old way of namespacing

* Update DiseaseStateMapper.cs

* Update DiseaseStateMapper.cs

* Fixes #2638. Use file scoped namespace

* Fixes #2638 by reverting to namespace

* 2632 errorvalue cannot be null parameter name source (#2641)

* WIP #2632

* Fixes #2632 error value cannot be null

* Also null for protocol mapper

* Fixes #2643 when to show global pk analysis (#2644)

* Fixes #2643 when to show global pk analysis

* Fixes #2643 when to show global pk analysis

* Could not let it go

* 2627 no expression profiles created when exporting a simulation from pk sim to mobi (#2645)

* Fixes #2627 no expression profiles created

* Fixes #2627 no expression profiles created

* Fixes type

* Fixes update latest core (#2648)

* 2640 export initial conditions for expressions as part of the expression profile (#2649)

* Fixes #2640 Export initial conditions for expressions as part of the expression profile

* Update core

* separate MoleculeBuilders by their presence and definition in the individual

* rename

* refactor enumerable

* PR feedback

* remove dead starter tests project

* core updated to 12.0.191. No diffbuilders with Dimension specified (#2652)

* 2654 fix failing tests (#2655)

* Fixes #2654 by removing support for version <7.0

* Fixes #2654 by removing support for version <7.0

* Fixes #2658 differences in simulations created by pk sim and mobi molecule types (#2659)

* Too many molecules in molecules list for some observers

* Do not change container observer type to Drug

* Fixes #2532 (#2636)

* WIP #2532

* fix using the wrong assertion

* Add default parameters to all molecules

* add parameter to actual proten

* Also add the parmaeter values

* add reference to tablews

* WIP #2532 ontogeny factor in expression profile

* WIP #2532 ontogeny factor

* WIP #2532 ontogeny factor

* Rename db field

* Make PMA only human dependent

* 2657 ontogeny factor is it dimensionless or fraction (#2662)

* Fixes #2657 ontogeny factor dimensionless

* Fixes #2657

* Fixes #2661 exception when using 2 pore simulations (#2663)

* Fixes #2660 remove estimated ga and use PMA instead (#2664)

* Fixes #2660 remove estimated ga and use PMA instead

* Actual real formula

* Fixes #2617 export to snapshot (#2665)

* undo changes in appveryor

* undo changes in appveryor

* Update to latest core

---------

Co-authored-by: Robert McIntosh <[email protected]>
Co-authored-by: georgeDaskalakis <[email protected]>
Co-authored-by: Juri Solodenko <[email protected]>
Co-authored-by: Yuri05 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Verified
Development

No branches or pull requests

3 participants