When will sbmlimport support sbml level 3?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
1 개 추천
Would be useful to know. I believe 2020b only supports level 2, correct?
Has anyone else run into having to use an sblm level 3 model? How do you handle this?
Thanks.
채택된 답변
Arthur Goldsipe
2021년 1월 26일
SimBiology already supports SBML level 3 version 1. That was introduced in R2016a. You can read more about what is supported here.
댓글 수: 11
Jim Bosley
2021년 2월 1일
편집: Jim Bosley
2021년 2월 1일
Arthur,
Thanks. I'm still a little confused. I was prompted to ask the question by the following exchange:
> mc = sbmlimport('SBMLModel.xml')
Error using SimBiology.internal.sbml.read
This version of SBML cannot be read. SimBiology supports the reading of SBML file versions up to Level 2 Version 1.
Error in privatesbmlio
Error in sbmlimport (line 89)
ret = privatesbmlio('read',nargout,{tempFileName})
It could be that my sbml is not conformal. Frank Bergmann and his friends have an online sbml tester that shows some errors. But in any case the error message is confusing.
Best,
Jim
PS: This is in R2020b running on Ubuntu.
Ah, thanks for pointing that out. The error message did not get updated when support was added for SBML level 3. I will put this in our bug tracking system so that we can fix it in an upcoming release.
FWIW, SimBiology reports this error when libSBML returns the error code InvalidSBMLLevelVersion when parsing an SBML file.
I thought that must be the issue. So perhaps my sbml file is version 2. I'll go back to the source.
Any idea when version 2 will be implemented?
As always, thanks for the fast, understandable answers Arthur.
Yes, if your file is level 3 version 2, that would explain the issue. I don't think a whole lot changed between version 1 and 2, so you might just try hand-modifying the version to 1 and see what happens (ideally running through the SBML validator to see if that flags anything else). I think another users have managed to do that with some success.
I'll pass along your request to upgrade our support to include level 3 version 2. We haven't hard much about customers needing this, so we've focused our work on things we consider higher priority. But now that we know it would be useful, we can consider this for a future release. Unfortunately, I can't comment here on any specific release data.
Nicolas
2024년 9월 17일
Hello, I would also need to be able to use sbml L3V2 (mainly, in simbiology). One of the main new features of L3V2 is the possibility to use the functions max, min, rem (modulo). Some others functions are also available, but I think that the three mentions previously are quite critical. The reference can be found here https://sbml.org/specifications/sbml-level-3/version-2/core/release-1/sbml-level-3-version-2-core.pdf, section 3.4.1
Thanks !
Arthur Goldsipe
2024년 9월 17일
편집: Arthur Goldsipe
2024년 9월 20일
[Edit: I was wrong about when max, min, and rem were introduced.]
Nicolas: max, min, and rem were introduced in L3V1, not L3V2. The main change I see in L3V2 is with respect to XML namespaces. So you may still be able to convert your L3V2 files to L3V1 without loss of functionality, so that you can import them into SimBiology.
That said, SimBiology currently preserves MathML operator names when importing SBML models. So you may need to make some manual update to expressions if the MATLAB function has a different name or has a different syntax than the corresponding MathML operator. For example, MathML's arcsin needs to be changed to MATLAB's asin. And MathML's max takes an arbitrary number of scalar inputs, whereas MATLAB's max operates on vectors.
If you run into problems importing a specific SBML file, feel free to post your own question on MATLAB Answers or to reach out to Technical Support.
Nicolas
2024년 9월 20일
Arthur, thanks for your answer.
According to the specifications (see References) min, max and rem are supported by L3V2 but not L3V1.
Manually changing L3V2 to L3V1 in the xml header of the SBML document will produce a document that fails sbml validation. There exist programmatic tools to convert L3V2 documents to L3V1 such as libsbml for instance. Unfortunately, said tool fails the conversion, precisely because of the L3V2 math elements.
This means that in order to import an L3V2 model (that has L3V2 math) in Simbiology, one has to manually modify the math formulas such that they no longer use L3V2 math. This is potentially complex and error-prone. For example, by replacing "max x y" by "if x >= y then x else y".
Thanks for your time !
References:
Oops. My mistake. I was accidentaly looking at L3V2 release 1 instead of L3V1.
I'll make sure your request is noted in SimBiology's enhancement database.
In the interim, you could still probably just change the version number in the file and see if SimBiology imports it correctly. Although it's not strictly valid SBML, I think our importer (which relies on libsbml) is fairly forgiving.
Arthur,
Thanks for your answer to my colleague Nicolas' question. In our (or at least my) experience, there was no simple way to translate. The sbml output is not entirely well-formed (for example, last time I checked, about a year ago, it did not list modifiers) so it crashes the translators.
I needed an updated version so (in one weekend) I taught myself Python and wrote an app that did a lot of the checking and correcting. Worked ok, but a modern level of sbml output would not be looked at disparagingly. Plus in my app I wasn't able to encode changing non-complex-differentiable functions into differentiable ones using Complex State Differentiation! 
Jim
Good to hear from you, Jim. And sorry we still haven't updated our SBML support.
Regarding complex differentiable functions, are there specific functions that I could add support for? In R2022b, I updated SimBiology to automatically replace min, max, and abs with complex differential equivalents during local sensitivity analysis. I could potentially do this for other MATLAB functions.
Hi Arthur,
Thanks for your note. I went back and looked. I had CSD versions of the modulo and the erf functions.
Not sure why I had the erf function, except to say that there's more than one way to skin a sigmoid. I used the modulo function to get time of day.
clock_time = mod( time, hours_per_day);
추가 답변 (0개)
커뮤니티
더 많은 답변 보기: SimBiology Community
카테고리
도움말 센터 및 File Exchange에서 Import Data에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
