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

Ontogeny factor in Expression Profile? #2532

Closed
rwmcintosh opened this issue Dec 14, 2022 · 15 comments
Closed

Ontogeny factor in Expression Profile? #2532

rwmcintosh opened this issue Dec 14, 2022 · 15 comments
Assignees
Milestone

Comments

@rwmcintosh
Copy link
Member

Should this parameter be part of Expression Profile Building Block

@PavelBal
Copy link
Member

The parameter Ontogeny factor is currently not exported in the Expression Profile BB, and basically gets "lost" during export process.

This can be solved by defining the parameter as a table parameter or even an equation depending on age. Combination of expression profiles and individuals in MoBi would then create correct ontogenies.

@msevestre @Yuri05 thoughts?

@Yuri05
Copy link
Member

Yuri05 commented Dec 15, 2022

2 parameters are required: Ontogeny factor and Ontogeny factor GI

@msevestre
Copy link
Member

There is no parameter in the expression profile building block? is this the reason?

Now I think it's a great idea to have the parameter as a table formula. I am not sure how this will be used later on because it will be function of AGE and not of Time..... but at least the info is here

@Yuri05
Copy link
Member

Yuri05 commented Dec 15, 2022

Will probably need to create Table formula with argument in the individual/simulation (similar to the pH-Solubility table)

@PavelBal
Copy link
Member

How is the ontogeny stored in the DB? Not as an equation?

@Yuri05
Copy link
Member

Yuri05 commented Dec 15, 2022

table (supporting points { $Mean_i \ ; (geo)SD_i$ })

@msevestre msevestre transferred this issue from Open-Systems-Pharmacology/OSPSuite.Core Feb 8, 2023
@msevestre msevestre added this to the Version 12 milestone Feb 8, 2023
@PavelBal
Copy link
Member

@Yuri05 Could you help us out specifying what has to be done?

@msevestre
Copy link
Member

msevestre commented May 24, 2023

After discussion today, here is the initial plan

IndividualMoleculeFactory => CreateMolecule

  • We will add two new parameters with a constant value of 1:
    • Ontogeny factor GI Table
    • Ontogeny factor Table

If we are dealing with an individual, then add 2 parameters (See AddAgeDependentOntogenyParametersTo)

  • Same parameters as before
  • Formula is now a TableFormulaWithxArgument
    • x=>Age
    • Formula = > Ontogeny Factor XX Table

MoleculeOntogenyVariabilityUpdater => void UpdateMoleculeOntogeny(IndividualMolecule molecule, Ontogeny ontogeny, ISimulationSubject simulationSubject);

This method is called when an ontogeny is selected in the Expression Profile (OR When updating an Expression Profile in an Individual)

molecule is the molecule (either in the expr profile or the individual)
simulationSubject is either the parameterless individual in the expression profile (just for the container structure) or the individual where the expression profile will be applied

If we are using an expression profile

  • we create the table (DistributedTableFormula object maybe) from the ontogenyRepository (todo find code in PKSim doing this already...TBD)

  • If we are using a real individual

  • Maybe we have to do nothing

Check that

  • expressionProfileUpdater.SynchronizeAllSimulationSubjectsWithExpressionProfile(_simulationSubject); is synchronizing also TableParameters
  • Mapping from EP to EP building block works with Formula
  • Mapping from Ind to Ind Building block works with Formula and FormulaWithXArgument

NOTE:
Goal is not to change if possible

  • public class ParameterUpdater : IParameterUpdater
  • DistributedParameterToTableParameterConverter

msevestre added a commit that referenced this issue May 24, 2023
@msevestre
Copy link
Member

ok this is a duplicate of #2626

@msevestre msevestre self-assigned this Jun 2, 2023
@msevestre
Copy link
Member

starting on this

msevestre added a commit that referenced this issue Jun 2, 2023
msevestre added a commit that referenced this issue Jun 14, 2023
msevestre added a commit that referenced this issue Jun 14, 2023
msevestre added a commit that referenced this issue Jun 14, 2023
@msevestre
Copy link
Member

@PavelBal @Yuri05
This is proving to be VERY challenging. I have spent two full days on this and I am nowhere done. We need to discuss what we want exactly and why because right now, I am opening a massive can of worms

The main problem that I have is about reusability and consistency.
At the moment, I have the table in the expression profile. This works. But in the individual, we need to have a parameter as a function of PMA and this table in the expression. This works also but when we want to export to mobi, we have this weird mismatch: We do not want the ontogeny factor in the expression profile because it references age of the individual. But we do not want the parameter in the individual either because it references a specific expression profile.

Not sure how to deal with this best

@msevestre
Copy link
Member

For now, I have added the paramter to the expression profile....To be continued

@msevestre
Copy link
Member

@Yuri05 @PavelBal
What about ontogeny factor albumin and glycoprotein. Those two could also be implemented the same way (and exported as table + arg, but this time in the individual. Thoughts?)

@PavelBal
Copy link
Member

What about ontogeny factor albumin and glycoprotein. Those two could also be implemented the same way (and exported as table + arg, but this time in the individual. Thoughts?)

I think this also makes sense.

@Yuri05
Copy link
Member

Yuri05 commented Jun 20, 2023

What about ontogeny factor albumin and glycoprotein. Those two could also be implemented the same way (and exported as table + arg, but this time in the individual. Thoughts?)

makes sense :)

rwmcintosh pushed a commit that referenced this issue Jun 22, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Fixed
Development

No branches or pull requests

4 participants