Open-Systems-Pharmacology / PK-Sim

PK-Sim® is a comprehensive software tool for whole-body physiologically based pharmacokinetic modeling
Other
103 stars 50 forks source link

Issue #648 still will not load #684

Closed UlrichSi closed 6 years ago

UlrichSi commented 6 years ago

Exporting and re-importing the sorafenib project from #648 will result in a long list of warnings, mostly parameters not being found. The JSON file import fails. The nightly build of 07-May was used, version 7.3.0.12 Beta.

@msevestre could you please try to reproduce that with the project I sent for #648?

UlrichSi commented 6 years ago

It is also a drawback that there is no way to interrupt the import process that produces the error messages. It can take some time until it is finished with reporting all the errors.

msevestre commented 6 years ago

@UlrichSi Warnings are reported because we are exporting an older projects where ALL parameters appears to have changed. (see discussion in #674

Also the reason why those parameters are not found again when the snapshot is imported is because the enzyme was renamed in the individual but the simulation was not updated (thus some internal path, the only way to map a parameter in the hierarchy) are not found anymore (Simulation are recreated from scratch using the building blocks.. if the building block are changed, the simulation won't match)

msevestre commented 6 years ago

It is also a drawback that there is no way to interrupt the import process that produces the error messages. It can take some time until it is finished with reporting all the errors.

Please creates a separate issue for that

msevestre commented 6 years ago

So the issue here is that a simulation is referencing an alternative in the compound that does not exist anymore in the template... Alternative PI #2 is used in a simulation but has disappear from compound

@Yuri05 Snapshot export should really be done for project that are somewhat consistent.

At that stage I am going to throw an error and say that the alternative is not found. The message from the snapshot load is actually not that bad:

Warning: Parameter 'Solubility at reference pH' defined in molecule 'Sorafenib' has an invalid value: NaN

msevestre commented 6 years ago

@Yuri05 Maybe export of simulation in "Red" state to snapshot should not happen? I have lost tremendous amount of time because of that (e.g. understanding why a simulation cannot be loaded). it is ALWAYS because of some discrepancies between referenced building blocks and used building block at time of export. (structural difference that is!).

msevestre commented 6 years ago

Actually simulation that cannot be created will be removed from project upon load with warning in log

Yuri05 commented 6 years ago

Maybe export of simulation in "Red" state to snapshot should not happen?

Would prefer a warning telling the user that "red" simulations might be not reimported correctly. Then user can stop or continue export.

Actually simulation that cannot be created will be removed from project upon load with warning in log

That's fine

UlrichSi commented 6 years ago

I agree with Yuri05 - a warning at the export process should be given, and on import of a project like that PK-Sim should do as good as possible.

I am afraid that things like that will happen all the time with "living" projects, That's why I tested several projects in different states.

msevestre commented 6 years ago

I agree with Yuri05 - a warning at the export process should be given, and on import of a project like that PK-Sim should do as good as possible.

Sounds good.

What about something like that? image

UlrichSi commented 6 years ago

Fine, let's try this out and see what complaints we will get. ;-) Maybe better use the exclamation mark icon, as common for Windows warnings.

ic726119 from: https://msdn.microsoft.com/en-us/library/windows/desktop/dn742488(v=vs.85).aspx

msevestre commented 6 years ago

@UlrichSi At the moment, our implementation only suppoirt "Question mark" when we ask a question. (Here YES NO question). This can be changed later, but not for this version