PMR2 / models.physiomeproject.org

The Physiome Model Repository
0 stars 0 forks source link

Model Errors categorized #33

Open bilalshaikh42 opened 2 years ago

bilalshaikh42 commented 2 years ago

Here are the errors that we experienced by error type:

Invalid SedML

Disconnected Interfaces

This might be caused by us trying to run the wrong files, but essentially OpenCor complains that some variables have "in" interfaces that are not connected to any "out" ports

Invalid CellML

These are probably due to the schema for 1.0 being incorrect and not allowing "id" in math elements

Underconstrained Models

Inconsistent Units

Max Iterations exceeded

Convergence Errors

No Equations defined

Unknown error preventing execution

Original was replaced in vim via:
%s/"\([0-9a-f]\{1,3\}\)",\?/- [\/e\/\1](https:\/\/models.physiomeproject.org\/e\/\1)/
%s/"\([0-9a-f]\{32\}\)",\?/- [\/exposure\/\1](https:\/\/models.physiomeproject.org\/exposure\/\1)/
MichaelClerx commented 2 years ago

Hey @bilalshaikh42 . This looks like a lot of work! Do you still have everything set up to re-run these tests?

I have an unfinished project on CellML validation here, that includes several validation methods (mostly by others), as well as some tests of various validation methods.

I'd be quite curious to see if the new schema (or the older but more complete RelaxNG validation) shows more or fewer errors on a scan of this type

bilalshaikh42 commented 2 years ago

@MichaelClerx Hello! Yes, I have a repository that contains the code for importing all projects from physiome, performing validation, and then packaging and running the projects on BioSimulations

That project is using BioSimulators_Utils to perform the validation of the CellML files themselves, which is simply using the XML schemas downloaded from the CellML website. I believe those are the ones you are referring to above? The specific method for validation is here As you can see, it just reads a file and validates against the schema.

Some of the errors above are only discovered after running the simulation, however. These are for issues such as models that do not converge, etc.

bilalshaikh42 commented 2 years ago

Improving the validation using any updates to the schemas would be great! We ourselves ran into some issues with the schema and had to make minor edits, so making sure we are aligned on a standard validation method would be great. The best way to do this is probably to have BioSimulators_Utils use your project under the hood. I've added you to our repo if you are interested in working on this with us! This would not only ensure that the CellML files are valid according to the schema, but that they can be correctly simulated as well.

MichaelClerx commented 2 years ago

Sure! There are some rules in CellML that cannot be validated by a schema. Jonathan Cooper wrote a RelaxNG schema that does a better job (https://github.com/MichaelClerx/cellml-validation/blob/master/check/_validation.py#L107-L134 ). So if you want to stick with standard tooling I'd recommend that.

If you're open to non-standard tools then Myokit does quite a good job (https://github.com/MichaelClerx/cellml-validation/tree/master/reports ).

None of the available methods handle the reactions parts of CellML models well. (Use of CellML reactions has been discouraged for a long time).

bilalshaikh42 commented 2 years ago

@nickerso do you have a recommendation for the validation tool that is best to use for the existing PMR models? BioSimulations is flexible, so it would probably be best for us to pick the one that can most easily be enforced in PMR and have the existing PMR models updated to match it.