Importing XML Simbiology model

3 vues (au cours des 30 derniers jours)
Jacopo Biasetti
Jacopo Biasetti le 29 Nov 2022
Hi,
I'm trying to import the attached .xml Simbiology file taken from literature (just zipped to be able to attach it) using the command.
modelObj = sbmlimport('GutInflammation.xml');
I receive the following error message, both with R2021b and R2022b. The error message is self-explanatory, but wonder how to correctly fix this issue in the file.
Error using SimBiology.internal.sbml.read
Unable to read the file 'C:\Users\kjgm780\Downloads\cts12849-sup-0004-supinfo\ModelCode\GutInflammation.xml'. The format may be incorrect, or
the file may be corrupted. See the following message for more information: Missing a required XML attribute. The unitDefinition attribute
'id' is required.
Error in privatesbmlio
Error in sbmlimport>loadModelFromFile (line 74)
modelObj = privatesbmlio('read',nargout,{tempFileName});
Error in sbmlimport (line 30)
modelObj = loadModelFromFile(filenameOrUrl);
Many thanks,
Jacopo

Réponse acceptée

Jeremy Huard
Jeremy Huard le 29 Nov 2022
Hi Jacopo,
this SBML file is indeed not valid according to the SBML validator. One unit definition is missing the 'id' attribute.
That said, a valid unit (with an 'id') with the same name and same definition is defined a few lines above it.
So you can safely delete lines 80-85 of the file and save it. The model will then get imported just fine.
This model seems to have a couple of issues though. For example parameter k1_74 does have any unit. Also, the Peripheral and Lymph Nodes compartments are not used and do not contain any species. But there might be more information about this in the associated paper.
Best regards,
Jérémy

Plus de réponses (0)

Communautés

Plus de réponses dans  SimBiology Community

Catégories

En savoir plus sur Extend Modeling Environment dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by