SBML2SHACL allows you to convert a SBML file in a RDF Turtle graph and verify it through SHACL.
It is required the installation of the rdflib python library.
That folder contains
-
The shapes' definition file modeling SBML constructs.
-
A diagram showing modeled constructs and their relations.
-
A SHACL verifier for Turtle graphs.
Are modeled whole SBML Extended and a subset of SBML 3.2 constructs.
It is implied that input SBML files are correct, reconversion from Turtle to XML won't necessarily output a file identical to the input SBML model but it will be the same knowledge (with respect to the modeled constructs).
ttl2sbml.py does NOT convert ANY Turtle file to SBML.
Contains some models to work with the converter, models taken from Biomodels are all SBML 3.2 files while in custom there are examples taken from the SBML Extended specification and dummy URIs are used, hence they won't pass SBML validator's.
Here can be seen an example of execution, the files in that folder are generated by the following commands.
$ python ./project/parsers/sbml2ttl.py -f ./test/example/example.xml -o ./test/example/sbml2ttl.ttl
$ python ./project/model/shacl_verifier.py -s ./project/model/shapes.ttl -d ./test/example/sbml2ttl.ttl
True
Validation Report
Conforms: True
$ python ./project/parsers/ttl2sbml.py -f ./test/example/sbml2ttl.ttl -o ./test/example/ttl2sbml.xml