TranslateSBML Error

36 views
Skip to first unread message

Matt Lane

unread,
Jun 29, 2023, 2:38:42 PM6/29/23
to sbml-discuss
Hi All! 

I'm a grad student trying to follow an implementation of a paper using SBML and SBMLToolbox to run DYNAMO by Santolini et al.

I installed SBML from the binaries using cmake (with MATLAB bindings included) following the documentation, and everything seemingly installed just fine. However, when I attempt to run the Dynamo code, I immediately run into an error from Translate SBML:

The model contains 0 errors and 99 warnings.

Error using TranslateSBML The error message identifier is invalid.

The error gives a link to the TranslateSBML documentation, but other than that, I'm at a loss, especially given that the TranslateSBML is just a binding.


Version Information:

  • Operating System: macOS Ventura 13.4 (22F66)
  • Matlab: R2020b Update 4 (9.9.0.1570001)
  • SBML: v5.20
  • SBML toolboxv4.1.0
  • SBML File being translated: BIOMD0000000404.xml  Level 2 Version 4


Does anyone have any thoughts as to what could possibly be causing an issue?


Lucian Smith

unread,
Jul 3, 2023, 11:38:55 AM7/3/23
to sbml-d...@googlegroups.com
I was hoping someone else might have a solution to your problem, but no luck.  You might have some success posting an issue on the DYNAMO github page, though it looks like it hasn't been updated in many years.

My only diagnosis is that 'the error message identifier is invalid' seems to me to mean that it got an error message from libSBML that it doesn't recognize (one of the 99 warnings, I guess?), perhaps because libSBML hadn't returned that message six years ago when the package was being developed?  You might have some success if you uploaded your model to the SBML validator (https://synonym.caltech.edu/validator_servlet/), corrected any warnings it finds, then try again with an error-and-warning-less SBML file.  It can be obnoxious fixing all the warnings in an SBML file, but it might work out?

If none of that works, perhaps you can explain what you would like to do with your model, and we can suggest a different package for you; perhaps one that's currently being maintained.

-Lucian

--
For questions or feedback about the sbml-discuss list,
contact sbml...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "sbml-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sbml-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sbml-discuss/9a298567-b580-46be-a0f9-d64747ce3871n%40googlegroups.com.

Matt Lane

unread,
Jul 10, 2023, 11:28:27 AM7/10/23
to sbml-discuss
Additionally, I completely forgot to respond to your final question: 

As for my ultimate goal with the model, I'm honestly looking to recapitulate the work that Santolini et al. have done to create a number of sensitivity matrices from the models themselves.   The DYNAMO project has code pre-built to compute these (in MATLAB, hence the bindings requirement). 

Do you by any chance know of any other methods out there that compute sensitivity matrices of these models? 

Thank you again! 
Matt 

Matt Lane

unread,
Jul 10, 2023, 11:28:28 AM7/10/23
to sbml-discuss
Hi Lucian! 

Thank you so much for answering!  I wanted to wait to respond until I thought I had everything figured out, but alas, I think I'm back to square one with recompiling different model versions and seeing where I go from there. 

Model Checking
I validated the model I've been using for testing and it came back with a valid model. 
Screenshot 2023-07-10 at 10.44.36 AM.png

After checking the `units consistency` box, though, I did find a number of warnings noting that `parameter` ought to be declared rather than undefined (To be completely candid, as these are models I'm primarily unfamiliar with, I'm a bit hesitant to start initializing parameters with arbitrary values): 

Screenshot 2023-07-10 at 10.45.03 AM.png


Model Versioning
On another note, I did go digging to see if perhaps it was somehow a versioning issue and came across another user having TranslateSBML issues with the MATLAB bindings.   She apparently found that downloading prior installations of MATLAB worked (at least a little bit) for her, so that is the current path I'm on. 


Thank you again! 

On Monday, July 3, 2023 at 11:38:55 AM UTC-4 Lucian Smith wrote:

Herbert M Sauro

unread,
Jul 10, 2023, 1:40:00 PM7/10/23
to sbml-d...@googlegroups.com
Can you define what the sensitivity matrices you’re after as there are a number of different kinds.

Herbert Sauro

On Mon, Jul 10, 2023 at 8:28 AM Matt Lane <lane.matt...@gmail.com> wrote:
Additionally, I completely forgot to respond to your final question: As for my ultimate goal with the model, I'm honestly looking to recapitulate the work that Santolini et al. have done to create a number of sensitivity matrices from the models
ZjQcmQRYFpfptBannerStart
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
See https://itconnect.uw.edu/email-tags for additional information. Please contact the UW-IT Service Center, he...@uw.edu 206.221.5000, for assistance.
 
ZjQcmQRYFpfptBannerEnd
--
Herbert Sauro, Professor
Director: NIH Center for model reproducibility
University of Washington, Bioengineering
Mobile: 206-880-8093

Hoops, Stefan (sh9cq)

unread,
Jul 10, 2023, 3:31:55 PM7/10/23
to sbml-d...@googlegroups.com
Hello Matt,

COPASI (https://copasi.org/) will allow you to load your SBML model and
has quiet flexible methods to calculate sensitivity matrices.

Thanks,
Stefan
> > > <https://github.com/msantolini/dynamo/tree/master> by Santolini
> > > et al.
> > >
> > > I installed SBML from the binaries using cmake (with MATLAB
> > > bindings
> > > included) following the documentation
> > > <
> > > https://sbml.org/software/libsbml/5.18.0/docs/formatted/matlab-api
> > > /libsbml-installation.html#locations>,
> > > and everything seemingly installed just fine. However, when I
> > > attempt to
> > > run the Dynamo code, I immediately run into an error from
> > > Translate SBML:
> > >
> > > *The model contains 0 errors and 99 warnings.*
> > >
> > > *Error using TranslateSBML The error message identifier is
> > > invalid.*
> > >
> > > The error gives a link to the TranslateSBML documentation, but
> > > other than
> > > that, I'm at a loss, especially given that the TranslateSBML is
> > > just a
> > > binding.
> > >
> > >
> > > Version Information:
> > >
> > >
> > >    - Operating System: macOS Ventura 13.4 (22F66)
> > >    - Matlab: R2020b Update 4 (9.9.0.1570001)
> > >    - SBML: v5.20
> > >    - SBML toolboxv4.1.0
> > >    - SBML File being translated: BIOMD0000000404.xml
> > >   
> > > <https://github.com/msantolini/dynamo/blob/master/test_model/BIOM
> > > D0000000404.xml> 
> > >    Level 2 Version 4
> > >
> > >
> > > Does anyone have any thoughts as to what could possibly be
> > > causing an
> > > issue?
> > >
> > >
> > > --
> > > For questions or feedback about the sbml-discuss list,
> > > contact sbml...@googlegroups.com
> > > ---
> > > You received this message because you are subscribed to the
> > > Google Groups
> > > "sbml-discuss" group.
> > > To unsubscribe from this group and stop receiving emails from it,
> > > send an
> > > email to sbml-discuss...@googlegroups.com.
> > > To view this discussion on the web visit
> > > https://groups.google.com/d/msgid/sbml-discuss/9a298567-b580-46be-a0f9-d64747ce3871n%40googlegroups.com
> > >  
> > > <
> > > https://groups.google.com/d/msgid/sbml-discuss/9a298567-b580-46be-
> > > a0f9-
> > > d64747ce3871n%40googlegroups.com?utm_medium=email&utm_source=foot
> > > er>
> > > .
> > >
> >
>

--
Stefan Hoops, Ph.D.
Research Associate Professor
Biocomplexity Institute & Initiative
University of Virginia
995 Research Park Boulevard
Charlottesville, VA 22911

Phone: +1 540 570 1301
Email: sho...@virginia.edu

Matt Lane

unread,
Jul 11, 2023, 12:45:09 AM7/11/23
to sbml-discuss
@Herbert Sauro, that's a great question! To be completely candid that is most definitely news to me!  I'm coming from having recently read Predicting perturbation patterns from the topology of biological networks. I'm not 100% sure what the specific type of sensitivity matrix they used is called, but within the text, they note:
                   If the dynamical equations are known, the sensitivity matrix can be analytically derived using a
                   perturbative framework (17, 27) (Methods). In the following we refer to this exact sensitivity
                   matrix as the “(full) biochemical model,” which is the underlying model from which it is
                   computed (
Fig. 1B).

The full biochemical model that they discuss is a network in which the edges (i.e. the corresponding i, j in a matrix) are defined by taking the jacobian of the  differential equations to create an adjacency matrix (A -> B).  





The sensitivity matrix is then defined by: 
𝑆=(𝐼𝐽)1𝐷(1(𝐼𝐽)1)

Ultimately, if there is another way of calculating these matrices, I would be absolutely ecstatic as getting these libraries to properly link up has been rather frustrating to say the least. 

And @Stefan Hoops, I'll absolutely be checking out out COPASI. I had a difficult time getting it to run, but that sounds like it may be an easier lift than attempting to figure out why the MATLAB bindings weren't working at all! 

Thank you all so much!
Matt

Herbert M Sauro

unread,
Jul 11, 2023, 1:53:06 PM7/11/23
to sbml-d...@googlegroups.com
It looks like they are defining correlations between changes in pairs of species as a derivative dxi/dxj. If that's what you want then you can use the concentration control coefficients from metabolic control analysis to help. Also, it looks like they are computing the unscaled sensitivities (which I don't think is a very good idea if you want to compare sensitivities). The only thing I didn't check is whether the paper is computing the steady-state or time-dependent sensitivities, I'm going to assume the steady state

Hence you need to use the unscaled concentration control coefficients. Specifically, you need to look at their ratios. The definition of an unscaled concentration control coefficient is:
C_{xi) = dxi/dp, with respect to a parameter p. Hence your sensitivity can be computed by finding the ratio: C_{xi}/C_{xj} = (dxi/dp)/(dxj/dp). It doesn't matter what p is.

In principle, you should be able to do this COPASI but here I'll give the tellurium script. This gives you one sensitivity, you can also get the entire matrix of Cs and then do a pairwise division.

import tellurium as te
r = te.loada('''
    $Xo -> S1; k1*Xo - k2*S1
      S1 -> S2; k3*S1 - k4*S2
      S2 ->; k3*S2
      Xo = 10; k1 = 0.3; k2 = 0.8;
      k3 = 0.45; k4 = 0.05
''')

r.steadyState()
sensitivity = r.getuCC ('S1', 'k2')/r.getuCC ('S2', 'k2')
print (sensitivity)








On Mon, Jul 10, 2023 at 9:45 PM Matt Lane <lane.matt...@gmail.com> wrote:
@ Herbert Sauro, that's a great question! To be completely candid that is most definitely news to me! I'm coming from having recently read Predicting perturbation patterns from the topology of biological networks. I'm not 100% sure what the specific

Matt Lane

unread,
Jul 13, 2023, 12:28:13 PM7/13/23
to sbml-discuss

Thank you so much @Herbert Sauro! 

And thank you everyone! all of these options have been astounding (and I've now got a ton of extra tools under my belt now for the future). 

And for the sake of posterity for anyone reading this thread, I'm astoundingly embarrassed to say that the base installation with the matlab bindings works just fine (as long as you use the addpath() function and point it to the compiled binaries).   As it turns out, the issue appears to be arise after using the `install.m` function of the `SBMLToolbox v4.1.0`. 

I honestly have not delved into why the toolbox install itself causes issues with the TranslateSBML function (primarily seeing as the toolbox doesn't override the function). 

To remedy this, I've taken only the desired / used toolbox functions and extracted those to a different directory I've since added to the path. 

Herbert M Sauro

unread,
Jul 17, 2023, 1:06:50 PM7/17/23
to sbml-d...@googlegroups.com
Matt, I had a quick look at the paper you referred to and the work is very similar (I think it's the same) to a large body of work called metabolic control analysis, you should look into this as it has a lot of relevant results.

Herbert Sauro 

Reply all
Reply to author
Forward
0 new messages