Skip to content

Commit

Permalink
Remove redundant volume parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jwkruisselbrink committed May 1, 2024
1 parent b6c50a1 commit 66bc7e9
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 1,762 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ The converted SBML file does not yet contain annotations of terms and units. It

An initial version of an annotations file is available (see, [euromix.annotations.csv](model/euromix.annotations.csv)). This demonstrates how elements of the model are related to ontology terms and units. The script [annotate_sbml_terms.py](src/python/annotate_sbml.py) combines the model file and annotations file to obtain an SBML file with annotated terms. The script [annotate_sbml_units.py](src/python/annotate_sbml_units.py) combines the model file and annotations file to obtain an SBML file with annotated units. Both scripts are heavily inspired by the [sbmlUtils](https://github.com/matthiaskoenig/sbmlutils) package. What remains to be done is to establish the vocabularies/ontologies to use for annotation and decide on the annotation requirements. I.e., what needs to be annotated? Also, it remains unclear how to distinguish different substances from species (in case of multiple-substance models).

Notebook [test_model_annotation.ipynb](notebooks/test_model_annotation.ipynb) shows how to annotate the model using an annotations file.

## SBML validation [in progress]

Automatic validation can be included to check for model errors, model consistency, consitency of units, and also on more PBK-model specific aspects (such as mass balance). The script [validate_sbml.py](src/python/validate_sbml.py) can be run to run validation checks on the SBML file. This is a first version in which some rudimentary file and consistency checks are performed. This first version is inspired by the [example](https://synonym.caltech.edu/software/libsbml/5.18.0/docs/formatted/python-api/validate_s_b_m_l_8py-example.html) presented in the libSBML documentation.
Expand Down
33 changes: 11 additions & 22 deletions model/euromix.ant
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,9 @@ model euromix()
## Physiology

### Body size
const VFat := BM * scVFat / rho
const VRich := BM * scVRich / rho
const VLiver := BM * scVLiver / rho
const VBlood := BM * scVBlood / rho
const VArt := VBlood / 3.0
const VVen := VBlood - VArt
const VSkin_e := BSA * Height_vs * fSA_exposed
const VSkin_u := BSA * Height_vs * (1 - fSA_exposed)
const VSkin_sc_e := BSA * Height_sc * fSA_exposed
const VSkin_sc_u := BSA * Height_sc * (1 - fSA_exposed)
const VPoor := (BM / rho) - VFat - VRich - VLiver - VSkin_e - VSkin_u - VSkin_sc_e - VSkin_sc_u - VBlood - 0.1 * (BM / rho)

const f_su := Kp_sc_vs * BSA * (1 - fSA_exposed)
const f_se := Kp_sc_vs * BSA * fSA_exposed
const VBlood := BM * scVBlood / rho

### Flow rates
const FBlood := scFBlood * BM
Expand All @@ -95,17 +84,17 @@ model euromix()
const FSkin_u := FSkin - FSkin_e

# Compartments and Species
compartment Fat := VFat
compartment Rich := VRich
compartment Poor := VPoor
compartment Liver := VLiver
compartment Fat := BM * scVFat / rho
compartment Rich := BM * scVRich / rho
compartment Liver := BM * scVLiver / rho
compartment Art := VBlood / 3.0
compartment Ven := VBlood - Art
compartment Skin_e := BSA * Height_vs * fSA_exposed
compartment Skin_u := BSA * Height_vs * (1 - fSA_exposed)
compartment Skin_sc_e := BSA * Height_sc * fSA_exposed
compartment Skin_sc_u := BSA * Height_sc * (1 - fSA_exposed)
compartment Poor := (BM / rho) - Fat - Rich - Liver - Skin_e - Skin_u - Skin_sc_e - Skin_sc_u - VBlood - 0.1 * (BM / rho)
compartment Gut
compartment Skin_u := VSkin_u
compartment Skin_e := VSkin_e
compartment Skin_sc_u := VSkin_sc_u
compartment Skin_sc_e := VSkin_sc_e
compartment Art := VArt
compartment Ven := VVen

# Species
substanceOnly species QFat in Fat
Expand Down
1,305 changes: 121 additions & 1,184 deletions model/euromix.sbml

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions model/euromix.terms.csv
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,5 @@ scVRich,parameter,scVRich,richly perfused tissues (viscera) as fraction of total
scVLiver,parameter,scVLiver,liver as fraction of total body volume,rdf,BQB_IS,uo/UO:0000193,fraction,
scVBlood,parameter,scVBlood,blood as fraction of total body volume,rdf,BQB_IS,uo/UO:0000194,fraction,
Vmax,parameter,Vmax,maximum rate of metabolism,rdf,BQB_IS,sbo/SBO:0000186,maximal velocity,Using generic term for maximal velocity.
VFat,parameter,VFat,volume of adipose tissue,rdf,BQB_IS,pato/PATO:0000918,volume,
VArt,parameter,VArt,arterial blood volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VBlood,parameter,VBlood,total blood volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VLiver,parameter,VLiver,liver volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VPoor,parameter,VPoor,poorly perfused tissue volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VVen,parameter,VVen,venous blood volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VRich,parameter,VRich,richly perfused tissue volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VSkin_e,parameter,VSkin_e,exposed skin volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VSkin_u,parameter,VSkin_u,unexposed skin volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VSkin_sc_e,parameter,VSkin_sc_e,stratum corneum exposed skin volume,rdf,BQB_IS,pato/PATO:0000918,volume,
VSkin_sc_u,parameter,VSkin_sc_u,stratum corneum unexposed skin volume,rdf,BQB_IS,pato/PATO:0000918,volume,
rho,parameter,rho,density of the tissues,rdf,BQB_IS,http://purl.obolibrary.org/obo/NCIT_C45781,density,
14 changes: 1 addition & 13 deletions model/euromix.units.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
element_id,sbml_type,unit
element_id,sbml_type,unit
timeUnits,document,s
substanceUnits,document,mmol
volumeUnits,document,L
Expand Down Expand Up @@ -36,20 +36,8 @@ scVFat,parameter,unitless
scVRich,parameter,unitless
scVLiver,parameter,unitless
scVBlood,parameter,unitless
VFat,parameter,L
VFat,parameter,L
VFat,parameter,L
VRich,parameter,L
VLiver,parameter,L
VBlood,parameter,L
VArt,parameter,L
VVen,parameter,L
VSkin_e,parameter,L
fSA_exposed,parameter,unitless
VSkin_u,parameter,L
VSkin_sc_e,parameter,L
VSkin_sc_u,parameter,L
VPoor,parameter,L
rho,parameter,kg/L
scFBlood,parameter,L.kg-1.h-1
scFFat,parameter,unitless
Expand Down
27 changes: 9 additions & 18 deletions notebooks/euromix.annotations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ id,sbml_type,name,unit,pattern,annotation_type,qualifier,resource
default_compartment,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",default_compartment,rdf,BQB_IS,
Fat,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Fat,rdf,BQB_IS,
Rich,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Rich,rdf,BQB_IS,
Poor,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Poor,rdf,BQB_IS,
Liver,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Liver,rdf,BQB_IS,
Gut,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Gut,rdf,BQB_IS,
Skin_u,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_u,rdf,BQB_IS,
Skin_e,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_e,rdf,BQB_IS,
Skin_sc_u,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_sc_u,rdf,BQB_IS,
Skin_sc_e,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_sc_e,rdf,BQB_IS,
Art,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Art,rdf,BQB_IS,
Ven,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Ven,rdf,BQB_IS,
Skin_e,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_e,rdf,BQB_IS,
Skin_u,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_u,rdf,BQB_IS,
Skin_sc_e,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_sc_e,rdf,BQB_IS,
Skin_sc_u,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Skin_sc_u,rdf,BQB_IS,
Poor,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Poor,rdf,BQB_IS,
Gut,compartment,,"litre (exponent = 1, multiplier = 1, scale = 0)",Gut,rdf,BQB_IS,
QFat,species,,"mole (exponent = 1, multiplier = 1, scale = -3)",QFat,rdf,BQB_IS,
QRich,species,,"mole (exponent = 1, multiplier = 1, scale = -3)",QRich,rdf,BQB_IS,
QPoor,species,,"mole (exponent = 1, multiplier = 1, scale = -3)",QPoor,rdf,BQB_IS,
Expand Down Expand Up @@ -39,6 +39,7 @@ scFPoor,parameter,,"dimensionless (exponent = 1, multiplier = 1, scale = 0)",scF
scFLiver,parameter,,"dimensionless (exponent = 1, multiplier = 1, scale = 0)",scFLiver,rdf,BQB_IS,
scFSkin,parameter,,"dimensionless (exponent = 1, multiplier = 1, scale = 0)",scFSkin,rdf,BQB_IS,
Falv,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",Falv,rdf,BQB_IS,
rho,parameter,,"gram (exponent = 1, multiplier = 1, scale = 3), litre (exponent = -1, multiplier = 1, scale = 0)",rho,rdf,BQB_IS,
PCFat,parameter,,"dimensionless (exponent = 1, multiplier = 1, scale = 0)",PCFat,rdf,BQB_IS,
PCLiver,parameter,,"dimensionless (exponent = 1, multiplier = 1, scale = 0)",PCLiver,rdf,BQB_IS,
PCRich,parameter,,"dimensionless (exponent = 1, multiplier = 1, scale = 0)",PCRich,rdf,BQB_IS,
Expand All @@ -55,19 +56,9 @@ Kp_sc_vs,parameter,,"metre (exponent = 1, multiplier = 1, scale = -1), second (e
kGut,parameter,,"second (exponent = -1, multiplier = 3600, scale = 1)",kGut,rdf,BQB_IS,
CLH,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",CLH,rdf,BQB_IS,
Ke,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",Ke,rdf,BQB_IS,
VFat,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VFat,rdf,BQB_IS,
VRich,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VRich,rdf,BQB_IS,
VLiver,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VLiver,rdf,BQB_IS,
f_su,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",f_su,rdf,BQB_IS,
f_se,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",f_se,rdf,BQB_IS,
VBlood,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VBlood,rdf,BQB_IS,
VArt,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VArt,rdf,BQB_IS,
VVen,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VVen,rdf,BQB_IS,
VSkin_e,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VSkin_e,rdf,BQB_IS,
VSkin_u,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VSkin_u,rdf,BQB_IS,
VSkin_sc_e,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VSkin_sc_e,rdf,BQB_IS,
VSkin_sc_u,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VSkin_sc_u,rdf,BQB_IS,
VPoor,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0)",VPoor,rdf,BQB_IS,
f_su,parameter,,indeterminable,f_su,rdf,BQB_IS,
f_se,parameter,,indeterminable,f_se,rdf,BQB_IS,
FBlood,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",FBlood,rdf,BQB_IS,
FFat,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",FFat,rdf,BQB_IS,
FPoor,parameter,,"litre (exponent = 1, multiplier = 1, scale = 0), second (exponent = -1, multiplier = 3600, scale = 1)",FPoor,rdf,BQB_IS,
Expand Down
Loading

0 comments on commit 66bc7e9

Please sign in to comment.