Looking for a good sample model using Cell Designer and/or Copasi, compartments, and units

23 views
Skip to first unread message

Thomas Ligon

unread,
Dec 8, 2020, 12:20:43 PM12/8/20
to sbml-discuss
I know that units don't have much meaning in SBML, but they are, at a minimum, a good documentation of the intent of a model, and help me understand which numbers to use for things like rates that are at least partially available in the biology literature. Now, I can define units in Cell Designer and/or Copasi according to my understanding, but I feel like I am re-inventing the wheel. In addition, I see that Cell Designer produces warnings if some reactions are not multiplied by the volume of the compartment, and Copasi produces warnings if the units in a reaction don't match up.
So, I want to create correct units for everything in the model I am working on.

I found a number of (sample) models at http://celldesigner.org/models.html, but many of the links are broken. For example, one of the newer models, the influenza map, is here
which points to the model at
and that refers to a page that cannot be found.
Also, the Parkinson model is available in SBML, but doesn't go into the detail I am looking for (all species have a default type of amount, and there are no kinetic laws).

Does anyone have a recommendation, or a favorite model?

Matthias König

unread,
Dec 8, 2020, 12:34:04 PM12/8/20
to sbml-d...@googlegroups.com
Hi Thomas Lignon,

unfortunately, most people ignore units or solely treat them as optional annotations.
Personally, I have never seen an SBML model with complete unit annotations which passes SBML unit validation in the wild.
Please let me know if there are any model collections with unit annotations.

I am doing complete unit annotation on all my models which is especially important
- checking correctness of equations
- checking correctness of parameters (without units it is unclear to what value to set the parameters, is it in mM or pM?)
- in the context of model coupling with comp
- data mapping on models
- automatic unit conversion

For an example please see
which is part of a reproducibility study of one of my models I did:
with code here

If you have any questions please let me know.
You can just import the mode in COPASI then you have a COPASI model.
If CellDesigner is finally supporting SBML Level 3 (which it promises for a decade) you can also load the model in CellDesigner ;)

Best Matthias

--
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/0c684b3b-8114-4a47-ae47-85f4491ed0f6n%40googlegroups.com.


--
Matthias König, PhD.
Junior Group Leader LiSyM - Systems Medicine of the Liver
Humboldt Universität zu Berlin, Institute of Biology, Institute for Theoretical Biology
  https://livermetabolism.com
koni...@googlemail.com
https://github.com/matthiaskoenig
Tel: +49 30 2093 98435

Sluka, James Patrick

unread,
Dec 8, 2020, 12:58:54 PM12/8/20
to sbml-d...@googlegroups.com

One example “in the wild” that passes the SBML unit validation (http://sbml.org/Facilities/Validator/) is BIOMD0000000624

https://www.ebi.ac.uk/biomodels/BIOMD0000000624#Files

 

Jim

Matthias König

unread,
Dec 8, 2020, 1:31:00 PM12/8/20
to sbml-d...@googlegroups.com
Hi Jim,
great example. I even looked at the model at some point in the past ;)
There are definitely example models with complete annotations, but as far as I know not many systematic efforts or any model collection (for ODE based models).
Best M

Sluka, James Patrick

unread,
Dec 8, 2020, 2:00:32 PM12/8/20
to sbml-d...@googlegroups.com

Matthias-

 

Yes, I agree, units a rarely included. One thing we noticed when annotating that model was how difficult it was and how little guidance there was on what should be done. I remember asking BioModels if they had a description of what they do to annotate a model but they couldn’t provide much guidance. Perhaps we need a step-by-step guide on annotating an SBML model that includes units, linking species and reactions to ontologies, etc.

Matthias König

unread,
Dec 8, 2020, 4:20:21 PM12/8/20
to sbml-d...@googlegroups.com
What I did in my workflow is having automatic validation of the SBML with unit validation on every model change I apply.
Thereby I get immediate feedback as soon as units are not balanced. This works very well when building models from scratch, because the errors are only a handful and easy to fix during model building.
This is very helpful because it gives immediate feedback and helps to avoid many modeling issues.

On the other hand retrospectively annotating units to an existing model is very hard and takes a lot of time.
Yes, there are no good guidelines for adding units to models.

Thomas Ligon

unread,
Dec 9, 2020, 12:25:35 PM12/9/20
to sbml-discuss
Thanks to both of you! James' suggestion to use the SBML validator is sure to be very useful, and Matthias' glucose model with its handling of compartments gives me a good starting point for my next changes. For example, I would change the kineticLaw of my re167 from
c5*Transport_0_Transporter_rev(re_167_k1,s1373,re167_k2,s2968)
to
Transport_0_Transporter_rev(c5*re_167_k1,s1373,c8*re167_k2,s2968)
This means that a reversible transport reaction gets the volume of the source compartment for the forward direction and the volume of the target compartment for the reverse direction. Copasi has created a
"Function for transport IL4 mRNA nucleus -> mast cell"
with the following math
"Transport 0 Transporter (rev)"(c5*re167_k1,s1373,c8*re167_k2,s2968)
To me, this looks like a significant improvement, because the reaction goes across 2 compartments, and so it needs 2 compartment volumes.
I would also change the kineticLaw of my re575 from
c5*Degradation(kdegPDef,s99)
to
Degradation(c5*kdegPDef,s99)
This does not seem to change anything in the resulting kinetics, but I think the notation is more logical. Copasi has created a
"Function for GATA3 nucleus protein degradation"
with the following math
"Degradation (irrev)"(c5*kdegPDef,s99)/c5
I'm not 100% sure why Copasi is dividing by the volume of the nucleus, but that seems to be an artifact of the way Copasi is defining the function and how it converts between concentrations and particle numbers, and doesn't appear in the math of the kineticLaw in SBML.
I don't think this changes the kinetics, but I think the documentation is more logical, putting the volume of the compartment next to the rate and not in front of the function.

Now a big question is which units to use internally. The biological literature reports some of the interesting values in units like mMol or number of molecules per cell. In the extreme case, where gene regulation is involved, this may be something like 1 or 2 molecules (genes) per cell. I have collected this information, including references, in a separate document, and can easily do the unit conversions there. With this background, it seems logical to use  number of molecules as an internal unit. But how do I deal with something like the transport reaction that moves mRNA from the nucleus to the cytosol? Is it logical to have units of
"number of molecules in the nucleus" being transported to "number of molecules in the cytosol", or
"number of molecules per femtoliter" being transported from the nucleus to the cytosol, or
mM or nM being transported from the nucleus to the cytosol?
What kind of unit should I be using for the rate of transport (forward and reverse)?

PS: I will definitely take a closer look at the glucose model.
By the way, I see that you have a compartment definition for cytosol size = 1l, so I assume that this refers to a population of cells, not a single cell, or you just decided that this volume is irrelevant. Also, GLUT2_Vmax = 420mmol/min used in the reaction "GLUT2 glucose transporter", which transports glucose (mmol/l) from the blood to the cytosol. Since blood and cytosol have the same volume, that seems easy enough to understand, but I have different volumes for nucleus and cytosol.

Thomas Ligon

unread,
Dec 12, 2020, 12:07:09 PM12/12/20
to sbml-discuss
Question about BIOMD0000000624_url.xml is Sluka 2016 - Acetaminophen metabolism

I downloaded BIOMD0000000624_url.xml, which is Sluka 2016 - Acetaminophen metabolism, and refers to a PLOS ONE paper [1], which I also accessed.
My immediate goal is very limited: I want to understand more about units, especially when to multiply by the volume of the compartment. This is because the large model I am working on has a lot of instances of this, so I need to decide how to deal with them.

I looked at reactions J1 and J2, which both occur within a single compartment, the hepatocyte, which is also referred to as "compartment".
Here are the two reactions, where I am only looking at v2 and v3.
J1: d/dt[NAPQI]=-kNapqiGsh*[NAPQI]*[GSH]*vol(compartment)^2
J2: d/dt[GSH]=kGsh*(GSHmax-[GSH])*vol(compartment)
The units for these reactions are:
J1: second^-1*substance=second_order_rate_constant*substance*substance*litre^2
J2: second^-1*substance=first_order_rate_constant*substance*litre
Converting to units gives:
J1: second^-1*millimole=(10^-3*mole)^-1*second^-1*millimole^2*litre^2
J2: second^-1*millimole=second^-1*millimole*litre
Simplifying:
J1: second^-1*millimole=second^-1*millimole*litre^2
J2: second^-1*millimole=second^-1*millimole*litre
In summary, it looks to me very much like the units on the left-hand-side do not match the units on the right-hand-side, and this is due explicitly to multiplying by the volume of the compartment. Even if I take account of a possible confusion between millimole and millimole per litre, they still don't match.

In contrast, I also looked at the hepatocyte glucose metabolism model [2], but didn't find any reactions that multiply by the volume of the compartment.

In summary, it looks to me like multiplying by the volume of the compartment would convert a concentration to a total amount, but that is only necessary if the rate expression explicitly assumes an amount, or if the lhs is an amount and the rhs is a concentration. So, I don't know why the authors of my model used it, and I will probably remove it.

[1] A Liver-Centric Multiscale Modeling Framework for Xenobiotics. 
Sluka JP, Fu X, Swat M, Belmonte JM, Cosmanescu A, Clendenon SG, Wambaugh JF, Glazier JA. 
PLoS ONE 2016; 11(9): e0162428 

[2] Quantifying the contribution of the liver to glucose homeostasis: a detailed kinetic model of human hepatic glucose metabolism. 
König M., Bulik S., Holzhütter HG. 
PLoS Comput Biol. 2012;8(6) 

Matthias König

unread,
Dec 12, 2020, 7:32:09 PM12/12/20
to sbml-discuss
Hi Thomas,
I think an important concept to understand is that you basically never have to multiply with volumes manually in your rate laws!
But SBML and the SBML to ODE system conversion by the tools takes care of that.
Most people are used to figure out manual conversions with volumes when directly writing the ODEs (e.g. in Matlab or any other programming language).
By using SBML you can get rid of these conversions.

1. Define if your species are in amounts or concentrations.
- all species are compartments with a given volume
- you set a flag if the species should be in amount (hasOnlySubstanceUnits=True) or in concentration (hasOnlySubstanceUnits=False)
- you can set either initialConcentration or initialAmount on the species independent of the flag
- all your species should have the same substance units, e.g. `mmole`
- all your volumes should have the same volume unit, e.g., `litre`
=> you know have amount or concentration species in `mmole` or `mmole/litre = mM` respectively

2. Define reactions
- you define the equation by definining reactants and products (these can be in different compartments!, thereby by a transport reaction)
- define a kineticLaw for your reaction. This is in `substance_unit/time_unit`!. I.e. all your kinetic laws in reactions are, e.g. using `min` as time now in `mmole/min`

3. Lean back and enjoy the correct ODEs
- the tools now can figure out if they have to multiply by volumes or not

For details please see the specification:
I.e. the following sections
- 4.6.5 ThehasOnlySubstanceUnitsattribute
- 4.11.7 Mathematical interpretation of SBML reactions and kinetic laws (!!! read this !!!)
- 7.8 Example of translation from a multi-compartmental model to ODEs (!!! read this !!!)

SBML Models which explicitly multiply by compartment volumes are highly error prone and it is absolutely not necessary, because SBML solves the issue.
All of this said, it becomes clear why unit validation and annotation is so powerful (to just state the 2 most important):
- you can automatically check that all your rate laws are in substance_units/time_units !
- you can check that all your assignments are in correct units

In summary: If you use SBML correctly and encode your models correctly you don't need to multiply by volumes.
Best Matthias

Johann Rohwer

unread,
Dec 13, 2020, 4:10:01 AM12/13/20
to sbml-d...@googlegroups.com
Hi Thomas

For a detailed treatment of kinetic modelling of compartmentalised reaction networks, including all possibilities such as two-dimensional "compartments" occurring at interfaces (e.g. membranes), you can also refer to the recent paper by Hofmeyr:
https://doi.org/10.1016/j.biosystems.2020.104203

Johann

--

Johann M. Rohwer  |  PhD
Professor of Systems Biology  |  Laboratory for Molecular Systems Biology

Department of Biochemistry   |   Faculty of Science  

e: j...@sun.ac.za  |  t: +27 21 808 5843  |  a: Room 108 JC Smuts Building, Van der Bijl Street, Stellenbosch

m: Dept. of Biochemistry, Private Bag X1, 7602 Matieland, South Africa




The integrity and confidentiality of this e-mail is governed by these terms / Die integriteit en vertroulikheid van hierdie e-pos word deur die volgende bepalings gereël. http://www.sun.ac.za/emaildisclaimer

Thomas Ligon

unread,
Dec 13, 2020, 1:15:27 PM12/13/20
to sbml-discuss
Hi Matthias,

your summary is very good! I had already read the SBML specification, especially 4.6.5, but reading those other 2 sections in context is very useful. In addition, your bullet points are right on the mark. It would be nice to see this as part of a tutorial or an introductory section in the specification.

Risking asking too much, I will formulate the next question that I need to answer for my model. I inherited the model from people who are convinced that a model that describes all reactions in SBGN is very useful for a significant audience. The model included a lot of functions used in reactions, often multiplied by the volume of the compartment, but no kinetic laws. So, the authors didn't include the computational aspects of the model in the scope of their work. I now have the model in a state that I can import into Copasi, and run time courses and steady-state calculations (if I make the tolerance more lenient and include both Newton and simulation). That required fixing some things like unbounded species (production but no degradation).

Now I want to make sure that my unit definitions are correct. You make a very important remark:
- all your species should have the same substance units, e.g. `mmole`
Now, I have
1) Genes, with typically 0, 1 or 2 molecules (amount) per cell (per nucleus).
2) mRNA, currently in amount.
3) Proteins, currently in amount, but could easily be something like mmol or mmol/l.
4) Protein complexes, often used to modify reactions like phosphorylation, or as membrane-bound receptors.
For proteins, the biological literature often quotes mmol/l, but it is easy to convert to any other units.
For the protein complexes and receptors, the biological literature often quotes the number of molecules per cell.
For some other proteins (hormones), the literature also sometimes quotes an amount.

As a result, I am very tempted to use amount (not concentration) for all species. Of course, the documentation can use mmol/l wherever that is desired. What do you think? This would differ from your hepatocyte glucose model, but I would find it difficult to use mmol or mmol/l for everything.

Thomas Ligon

unread,
Dec 13, 2020, 1:17:15 PM12/13/20
to sbml-discuss
Hi Johann,

the Hofmeyr paper looks very interesting (all 44 pages). I plan to read it and apply it to a subsequent step (step after next).

Matthias König

unread,
Dec 14, 2020, 4:39:46 AM12/14/20
to sbml-discuss
Some quick clarification:
[1]
> all your species should have the same substance units, e.g. `mmole`
It depends on your problem domain. To clarify, all species should have the same unit, with the unit depending on the problem domain. In case of gene expression models the native unit is probably something like `item` which is just a count of the objects. It makes it just so much easier to have correct units if you use the same base units for your species.
Disclaimer: if you have largely varying concentrations this can result in numerical issues, but just in very extrem cases. I normally have no issues with having hormones (in fM - nM concentrations) and metabolites with high concentrations (mM) in the same model with using mmole as a substance unit and litre as a volume unit. You can always shift your reference unit (e.g. use pM if you work with only pM hormones in a model).
If your system is more naturally described by `item` as a base unit use item.

[2] Sometimes you have volumes or areas in rate laws, but this is to scale the system by surface or volume, not to convert from amount to concentration !
E.g. I often have scaling by organ size, but the units of your other parameters reflect this.

E.g.
Vmax [mmole/min/litre]  (This is the Vmax per given volume, coming somehow from kcat * P with amount of protein in [mmole/litre]. I.e. one has a certain amount of protein in a given volume (most in vitro measurements are scaled on cell volumes, dry mass or something similar). You use the actual volume to scale this protein density to your actual volume in the model.

Vmax_eff = Vmax * Vli [mmole/min]

Similar things occur by transporters, where you would have a surface density of your protein which you scale by the surface area.
These volume factors are not amount to concentration conversions!

Best M

Robert Phair

unread,
Dec 14, 2020, 6:40:00 PM12/14/20
to sbml-d...@googlegroups.com
Thomas,

This is an interesting thread you started.

I am not as familiar with Copasi as you are, but I have given a lot of thought to transport between compartments and the associated units as we developed our own modeling tool, ProcessDB, to support our consulting practice. We are also reasonably familiar with SBML (at least Level 2), but I think the SBML units spec is an example of over-specification and I'm betting that is why few if any modelers use it. The units spec was mostly driven by spatial modelers, and it may be useful for them, but I think the spec is too rigid. We absolutely agree that units are essential in our modeling, but we do not export them in SBML. We're using absolute units everywhere. It's challenging but, in my view, very important. To me, units of molecules/cell are the best for all intracellular processes. Concentration-based rate laws (kinetic laws) are, in my view, too painful. It is true you will have to convert literature Km, Ks, Ki values to molecules/cell (in the relevant compartment), but you gain the wonderful advantage that all your fluxes are in molecules/min/cell. This also avoids having to define volumes of distribution for membrane-bound molecules and it matches up nicely with experimental abundance measurements.

I do admit that molecules/cell is problematic when transport is from extracellular space to cytosol. Here, I sometimes revert to concentration-based rate laws. This is an issue I would love to discuss further.

I made many of these points 20 years ago in SBML meetings, but obviously I did not succeed in affecting the mainstream.

I'm a physiologist/cell biologist so many of our models involve multiple organ systems or cell types as well as organelles. Thus, compartments a key part of what we do. I am always interested in informal discussion around these topics. Reach me anytime at rph...@integrativebioinformatics.com.

Regards,
Robert

Robert D Phair PhD  |  Chief Science Officer  |  Integrative Bioinformatics Inc
Mountain View, CA, USA
www.integrativebioinformatics.com

ProcessDB: Mechanistic modeling for systems biology


Thomas Ligon

unread,
Dec 16, 2020, 3:33:11 AM12/16/20
to sbml-discuss
Hello Robert,
thanks for your very useful comments. Now I feel confident that units of molecules/cell are my best bet, and the explanation from Mattias on how to code that correctly will put me on firm ground. By the way, we have had discussions in the past (2015 and 2017), concerning how to code transcription reactions and how to deal with the DEGRADED species in Cell Designer.

Robert Phair

unread,
Dec 16, 2020, 10:07:16 PM12/16/20
to sbml-d...@googlegroups.com
Thomas,
Your memory is far better than mine!
Let's continue discussing in 2021.

Robert


Reply all
Reply to author
Forward
0 new messages