Closed PavelBal closed 1 month ago
- All parameters of the spatial structure that have the same value in all species and individuals are stored directly in the spatial structures BB
the same value or the same formula
- Parameters that are present in all species but have different species-specific values are located in the SS BB, but their value is set to
NaN
.
As far as I remember, we agreed not to do this. So if a parameter is either present not in all species, or has different species-specific formulas or has different species-specific values - it will not appear in the SpStruct at all. Instead, it will be added dynamically when merging an individual.
- Distributed physiological parameters. Parameters that are present only for certain species
Not necessarily distributed parameters, but in fact any parameters which differs between species (s. above)
- Why is the parameter
Organism|MeanHeight
part of the SS BB?
Actually it should not be there, because it's defined not for all species...
Okay so it seems that the concept is not correctly implemented. Basically, no NaN
should be present in the SS BB, except if the parameter is defined by a formula that cannot be evaluated at this timepoint.
Can we find the issue where we described everything?
17.07.2024: Remove all parameters with NaN
(except those with a formula that evaluates to NaN) from the spatial structure -> Parameters coming from the Individual are not part of the SS BB.
so MeanHeight is returned by the DB has been used by all species
Here is the list of parameter that are NOT common. Clearly, meanHeight is this is why. I am going to try to see if I can understand why @Yuri05 Might have an idea why this is done like this?
As for NaN for value, this is done explicitly like this in code. I am going to change the code so that these parameters are REMOVED From the spatial structure
@Yuri05 I am losing my mind lol There are two VIEWS that are defined in the PKSimDB VIEW_INDIVIDUAL_PARAMETER_NOT_FOR_ALL_SPECIES VIEW_INDIVIDUAL_PARAMETER_SAME_FORMULA_OR_VALUE_FOR_ALL_SPECIES
Looking at the second one, I would expect to get all parameter that share the same formula or value across species. Volume Cell is not the case for instance. For Volume I only have
ok so MeanHeight is only defined in tab_parameter_container_curve and not in any other table. This is why its' seen as the same as for all species because ContainerParameters_Species
View does not take this table into account
CREATE VIEW [ContainerParameters_Species]
AS
SELECT DISTINCT
[cpv].[container_id],
[cpv].[container_type],
[cpv].[container_name],
[cpv].[parameter_name],
[species]
FROM [tab_container_parameter_values] AS [cpv],
[tab_container_parameters] AS [cp]
ok Volume is solved because they are not individual parameters
ok so MeanHeight is only defined in tab_parameter_container_curve and not in any other table. This is why its' seen as the same as for all species because
ContainerParameters_Species
View does not take this table into account
Yep, that was a mistake. Fixed it in the open PR (added the highlighted part).
Yep, that was a mistake. Fixed it in the open PR (added the highlighted part).
Rollbacked the fix due to problems.
what problems?
Lot of integration tests where simulations were created failed because some parameters were missing.
@Yuri05 Was it because of the change for MEanHeight or the other changes?
Hard to say. I incorporated the changes from the last PR for MeanHeight before I run the tests
@msevestre @Yuri05 THis is solved, right?
Yes should be resolved
I am summarizing in the documentation how different parameters are stored in the new version. I came up with the following summary:
All parameters of the spatial structure that have the same value in all species and individuals are stored directly in the spatial structures BB with the fixed value or an explicit formula. Example:
Organism|Thickness (endothelium)
(constant value) orOrganism|Weight of blood organs
(sum formula).Parameters that are present in all species but have different species-specific values are located in the SS BB, but their value is set to
NaN
. Example:Organism|Acidic phospholipids (blood cells) [mg/g] - RR
, which has a value of 0.57 for humans and 0.5 for rats. The actual value is stored in the Individual BB. When creating a simulation and selecting a PK-Sim module, the user must select an individual. The value from the individual BB will be then applied to the parameter and replace theNaN
stored in the SS BB.Distributed physiological parameters. Parameters that are present only for certain species (e.g.,
Organism|Lumen|Duodenum|Thickness_p1
is only present in the human species, but not in rat,Organism|Lumen|Duodenum|Default thickness of gut wall
is present in the rat but not in human), or have a distribution in a species population (e.g.,Orgnanism|Fat|Volume
) are not located in the spatial structures BB, but only in the individual. Such parameters are added to the simulation stucture during simulation creation step. Note: only parameters defined in the Individual BB are added to the model structure, but not the parameters defined in the PV BB.In particular, I am not sure I correctly understand the third type (parameters that will be added):
Organism|MeanHeight
part of the SS BB?Volume
parameters not in the SS BB with the valueNaN
? They are shared across all species (I assume?)