Importing XML Simbiology model

10 次查看(过去 30 天)
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

采纳的回答

Jeremy Huard
Jeremy Huard 2022-11-29
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

更多回答(0 个)

社区

更多回答在  SimBiology Community

类别

Help CenterFile Exchange 中查找有关 Scan Parameter Ranges 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by