Annotating Models
Annotating a biological complex
A biological complex is a functional unit composed of multiple parts. To annotate that you are modelling a complex you can neglect the identity and instead use an arbitrary number of hasPart predicates. In this example we model the binding of Sos, Grb2 and Shc.
Note
You can create this model using the following tellurium code:
import tellurium as te
r = te.loada("""
model ComplexBinding
compartment cytoplasm = 1;
Shc in cytoplasm;
Sos in cytoplasm;
Grb2 in cytoplasm;
Shc = 1;
Sos = 1;
Grb2 = 1;
Shc_Sos_Grb2 = 0;
k_bind = 0.1;
k_unbind = 0.1;
Binding: Shc + Sos + Grb2 => Shc_Sos_Grb2; cytoplasm*k_bind*Shc*Sos*Grb2;
Unbinding: Shc_Sos_Grb2 => Shc + Sos + Grb2; cytoplasm*k_unbind*Shc_Sos_Grb2;
end
"""
)
sbml = r.getSBML()
print(sbml)
Annotating a biological complex in Python
from pyomexmeta import RDF, eUriType
import os
sbml = """<?xml version="1.1" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1">
<model metaid="ComplexBinding" id="ComplexBinding">
<listOfCompartments>
<compartment id="cytoplasm" spatialDimensions="3" size="1" constant="true"/>
</listOfCompartments>
<listOfSpecies>
<species id="Shc" metaid="Shc" compartment="cytoplasm" initialConcentration="1" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="Sos" metaid="Sos" compartment="cytoplasm" initialConcentration="1" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="Grb2" metaid="Grb2" compartment="cytoplasm" initialConcentration="1" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="Shc_Sos_Grb2" metaid="Shc_Sos_Grb2" compartment="cytoplasm" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<listOfParameters>
<parameter id="k_bind" metaid="k_bind" value="0.1" constant="true"/>
<parameter id="k_unbind" metaid="k_unbind" value="0.1" constant="true"/>
</listOfParameters>
<listOfReactions>
<reaction id="Binding" metaid="Binding" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="Shc" stoichiometry="1" constant="true"/>
<speciesReference species="Sos" stoichiometry="1" constant="true"/>
<speciesReference species="Grb2" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="Shc_Sos_Grb2" stoichiometry="1" constant="true"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<times/>
<ci> cytoplasm </ci>
<ci> k_bind </ci>
<ci> Shc </ci>
<ci> Sos </ci>
<ci> Grb2 </ci>
</apply>
</math>
</kineticLaw>
</reaction>
<reaction id="Unbinding" metaid="Unbinding" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="Shc_Sos_Grb2" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="Shc" stoichiometry="1" constant="true"/>
<speciesReference species="Sos" stoichiometry="1" constant="true"/>
<speciesReference species="Grb2" stoichiometry="1" constant="true"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<times/>
<ci> cytoplasm </ci>
<ci> k_unbind </ci>
<ci> Shc_Sos_Grb2 </ci>
</apply>
</math>
</kineticLaw>
</reaction>
</listOfReactions>
</model>
</sbml>
"""
# create an empty RDF object
rdf = RDF()
editor = rdf.to_editor(sbml, generate_new_metaids=True, sbml_semantic_extraction=False)
# Remember that in Python, the with block takes care of adding the annotation to our RDF graph
# so that its not possible to forget.
# Annotate the Shc entity
with editor.new_physical_entity() as Shc:
Shc \
.about("Shc", eUriType.MODEL_URI) \
.has_property("OPB:OPB_00340") \
.identity("uniprot/P29353")
# We could optionally annot
# ate where we are modelling Shc, for instance nucleus, cytoplasm, skin, bone, etc. Here
# we do not need to since we are only modelling reactions in the cytoplasm.
# Annotate the Sos entity
with editor.new_physical_entity() as Sos:
Sos \
.about("Sos", eUriType.MODEL_URI) \
.has_property("OPB:OPB_00340") \
.identity("uniprot/Q07889")
# Annotate the Grb2 entity
with editor.new_physical_entity() as Grb2:
Grb2 \
.about("Grb2", eUriType.MODEL_URI) \
.has_property("OPB:OPB_00340") \
.identity("uniprot/P62993")
# Annotate the shc_sos_grb2 entity
with editor.new_physical_entity() as shc_sos_grb2:
shc_sos_grb2 \
.about("Shc_Sos_Grb2", eUriType.MODEL_URI) \
.has_property("OPB:OPB_00340") \
.has_part("uniprot/P29353") \
.has_part("uniprot/Q07889") \
.has_part("uniprot/P62993")
# annotate the binding reaction
with editor.new_physical_process() as binding_reaction:
binding_reaction.about("Binding", eUriType.MODEL_URI) \
.has_property("OPB:OPB_00340") \
.add_source("Shc", eUriType.MODEL_URI, 1.0) \
.add_source("Grb2", eUriType.MODEL_URI, 1.0) \
.add_source("Sos", eUriType.MODEL_URI, 1.0) \
.add_sink("Shc_Sos_Grb2", eUriType.MODEL_URI, 1.0)
# annotate the unbinding reaction
with editor.new_physical_process() as unbinding_reaction:
unbinding_reaction.about("Unbinding", eUriType.MODEL_URI) \
.has_property("OPB:OPB_00340") \
.add_source("Shc_Sos_Grb2", eUriType.MODEL_URI, 1.0) \
.add_sink("Shc", eUriType.MODEL_URI, 1.0) \
.add_sink("Grb2", eUriType.MODEL_URI, 1.0) \
.add_sink("Sos", eUriType.MODEL_URI, 1.0)
print(rdf)
Output
[16:33:33 +01:00] warning : XML parser warning: Unsupported version '1.1'
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix bqbiol: <http://biomodels.net/biology-qualifiers/> .
@prefix semsim: <http://bime.uw.edu/semsim/> .
@prefix OMEXlib: <http://omex-library.org/> .
@prefix local: <http://omex-library.org/NewOmex.omex/NewModel.rdf#> .
local:EntityProperty0000
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0001
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0002
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0003
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:ProcessProperty0000
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Binding> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:ProcessProperty0001
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Unbinding> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:SinkParticipant0000
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> .
local:SinkParticipant0001
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> .
local:SinkParticipant0002
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> .
local:SinkParticipant0003
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> .
local:SourceParticipant0000
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> .
local:SourceParticipant0001
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> .
local:SourceParticipant0002
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> .
local:SourceParticipant0003
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Binding>
semsim:hasSinkParticipant local:SinkParticipant0000 ;
semsim:hasSourceParticipant local:SourceParticipant0000, local:SourceParticipant0001, local:SourceParticipant0002 .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2>
bqbiol:is <https://identifiers.org/uniprot/P62993> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Shc>
bqbiol:is <https://identifiers.org/uniprot/P29353> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2>
bqbiol:hasPart <https://identifiers.org/uniprot/P29353>, <https://identifiers.org/uniprot/P62993>, <https://identifiers.org/uniprot/Q07889> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Sos>
bqbiol:is <https://identifiers.org/uniprot/Q07889> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Unbinding>
semsim:hasSinkParticipant local:SinkParticipant0001, local:SinkParticipant0002, local:SinkParticipant0003 ;
semsim:hasSourceParticipant local:SourceParticipant0003 .
Annotating a biological complex in C++
#include "omexmeta/OmexMeta.h"
#include <iostream>
#include <filesystem>
using namespace omexmeta;
int main() {
std::string sbml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" level=\"3\" version=\"1\">\n"
" <model metaid=\"ComplexBinding\" id=\"ComplexBinding\">\n"
" <listOfCompartments>\n"
" <compartment id=\"cytoplasm\" spatialDimensions=\"3\" size=\"1\" constant=\"true\"/>\n"
" </listOfCompartments>\n"
" <listOfSpecies>\n"
" <species id=\"Shc\" metaid=\"Shc\" compartment=\"cytoplasm\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" <species id=\"Sos\" metaid=\"Sos\" compartment=\"cytoplasm\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" <species id=\"Grb2\" metaid=\"Grb2\" compartment=\"cytoplasm\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" <species id=\"Shc_Sos_Grb2\" metaid=\"Shc_Sos_Grb2\" compartment=\"cytoplasm\" initialConcentration=\"0\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" </listOfSpecies>\n"
" <listOfParameters>\n"
" <parameter id=\"k_bind\" metaid=\"k_bind\" value=\"0.1\" constant=\"true\"/>\n"
" <parameter id=\"k_unbind\" metaid=\"k_unbind\" value=\"0.1\" constant=\"true\"/>\n"
" </listOfParameters>\n"
" <listOfReactions>\n"
" <reaction id=\"Binding\" metaid=\"Binding\" reversible=\"false\" fast=\"false\">\n"
" <listOfReactants>\n"
" <speciesReference species=\"Shc\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Sos\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfReactants>\n"
" <listOfProducts>\n"
" <speciesReference species=\"Shc_Sos_Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfProducts>\n"
" <kineticLaw>\n"
" <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
" <apply>\n"
" <times/>\n"
" <ci> cytoplasm </ci>\n"
" <ci> k_bind </ci>\n"
" <ci> Shc </ci>\n"
" <ci> Sos </ci>\n"
" <ci> Grb2 </ci>\n"
" </apply>\n"
" </math>\n"
" </kineticLaw>\n"
" </reaction>\n"
" <reaction id=\"Unbinding\" metaid=\"Unbinding\" reversible=\"false\" fast=\"false\">\n"
" <listOfReactants>\n"
" <speciesReference species=\"Shc_Sos_Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfReactants>\n"
" <listOfProducts>\n"
" <speciesReference species=\"Shc\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Sos\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfProducts>\n"
" <kineticLaw>\n"
" <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
" <apply>\n"
" <times/>\n"
" <ci> cytoplasm </ci>\n"
" <ci> k_unbind </ci>\n"
" <ci> Shc_Sos_Grb2 </ci>\n"
" </apply>\n"
" </math>\n"
" </kineticLaw>\n"
" </reaction>\n"
" </listOfReactions>\n"
" </model>\n"
"</sbml>";
RDF rdf;
// Here we leave "generate_new_metaids" argument to false and set "sbml_semantic_extraction" to false so that we can annotate ourselves
Editor editor = rdf.toEditor(sbml, false, false);
// Annotate the Shc entity
PhysicalEntity Shc = editor.newPhysicalEntity();
Shc
.about("Shc", MODEL_URI) // corresponds to the metaid for Shc in the SBML source code
.identity("uniprot/P29353") // SHC1
.hasProperty("OPB:OPB_00340");// Were modelling the chemical concentration
editor.addPhysicalEntity(Shc);
// We could optionally annotate where we are modelling Shc, for instance nucleus, cytoplasm, skin, bone, etc. Here
// we do not need to since we are only modelling reactions in the cytoplasm.
// Annotate the Sos entity
PhysicalEntity Sos = editor.newPhysicalEntity();
Sos
.about("Sos", MODEL_URI) // corresponds to the metaid for Sos in the SBML source code
.identity("uniprot/Q07889") // SOS1
.hasProperty("OPB:OPB_00340");// Were modelling the chemical concentration
editor.addPhysicalEntity(Sos);
// Annotate the Grb2 entity
PhysicalEntity Grb2 = editor.newPhysicalEntity();
Grb2
.about("Grb2", MODEL_URI) // corresponds to the metaid for Grb2 in the SBML source code
.identity("uniprot/P62993") // GRB2
.hasProperty("OPB:OPB_00340");// Were modelling the chemical concentration
editor.addPhysicalEntity(Grb2);
// Annotate the Complex containing Shc, Sos and Grb2
PhysicalEntity shc_sos_grb2 = editor.newPhysicalEntity();
shc_sos_grb2
.about("Shc_Sos_Grb2", MODEL_URI) // corresponds to the metaid for Grb2 in the SBML source code
.hasProperty("OPB:OPB_00340") // Were modelling the chemical concentration
.isPartOf("uniprot/P29353") // SHC1
.isPartOf("uniprot/Q07889") // SOS1
.isPartOf("uniprot/P62993") ; // GRB2
editor.addPhysicalEntity(shc_sos_grb2);
// annotate the binding reaction
PhysicalProcess binding_reaction = editor.newPhysicalProcess();
binding_reaction.about("Binding", MODEL_URI)
.hasProperty("OPB:OPB_00340")
.addSource("Shc",MODEL_URI, 1.0 )
.addSource("Grb2",MODEL_URI, 1.0 )
.addSource("Sos",MODEL_URI, 1.0 )
.addSink("Shc_Sos_Grb2", MODEL_URI, 1.0);
editor.addPhysicalProcess(binding_reaction);
// annotate the unbinding reaction
PhysicalProcess unbinding_reaction = editor.newPhysicalProcess();
unbinding_reaction.about("Unbinding", MODEL_URI)
.hasProperty("OPB:OPB_00340")
.addSource( "Shc_Sos_Grb2", MODEL_URI, 1.0)
.addSink( "Shc", MODEL_URI, 1.0)
.addSink( "Grb2", MODEL_URI, 1.0)
.addSink( "Sos", MODEL_URI, 1.0);
editor.addPhysicalProcess(unbinding_reaction);
std::cout << rdf.toString() << std::endl;
return 0;
}
Output
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix bqbiol: <http://biomodels.net/biology-qualifiers/> .
@prefix semsim: <http://bime.uw.edu/semsim/> .
@prefix OMEXlib: <http://omex-library.org/> .
@prefix local: <http://omex-library.org/NewOmex.omex/NewModel.rdf#> .
local:EntityProperty0000
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0001
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0002
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0003
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:ProcessProperty0000
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Binding> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:ProcessProperty0001
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Unbinding> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:SinkParticipant0000
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> .
local:SinkParticipant0001
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> .
local:SinkParticipant0002
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> .
local:SinkParticipant0003
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> .
local:SourceParticipant0000
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> .
local:SourceParticipant0001
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> .
local:SourceParticipant0002
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> .
local:SourceParticipant0003
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Binding>
semsim:hasSinkParticipant local:SinkParticipant0000 ;
semsim:hasSourceParticipant local:SourceParticipant0000, local:SourceParticipant0001, local:SourceParticipant0002 .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2>
bqbiol:is <https://identifiers.org/uniprot/P62993> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Shc>
bqbiol:is <https://identifiers.org/uniprot/P29353> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2>
bqbiol:isPartOf <https://identifiers.org/uniprot/P29353>, <https://identifiers.org/uniprot/P62993>, <https://identifiers.org/uniprot/Q07889> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Sos>
bqbiol:is <https://identifiers.org/uniprot/Q07889> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Unbinding>
semsim:hasSinkParticipant local:SinkParticipant0001, local:SinkParticipant0002, local:SinkParticipant0003 ;
semsim:hasSourceParticipant local:SourceParticipant0003 .
Annotating a biological complex in C
#include "omexmeta/OmexMetaCApi.h"
#include <iostream>
using namespace omexmeta;
int main() {
const char* sbml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<sbml xmlns=\"http://www.sbml.org/sbml/level3/version1/core\" level=\"3\" version=\"1\">\n"
" <model metaid=\"ComplexBinding\" id=\"ComplexBinding\">\n"
" <listOfCompartments>\n"
" <compartment id=\"cytoplasm\" spatialDimensions=\"3\" size=\"1\" constant=\"true\"/>\n"
" </listOfCompartments>\n"
" <listOfSpecies>\n"
" <species id=\"Shc\" metaid=\"Shc\" compartment=\"cytoplasm\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" <species id=\"Sos\" metaid=\"Sos\" compartment=\"cytoplasm\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" <species id=\"Grb2\" metaid=\"Grb2\" compartment=\"cytoplasm\" initialConcentration=\"1\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" <species id=\"Shc_Sos_Grb2\" metaid=\"Shc_Sos_Grb2\" compartment=\"cytoplasm\" initialConcentration=\"0\" hasOnlySubstanceUnits=\"false\" boundaryCondition=\"false\" constant=\"false\"/>\n"
" </listOfSpecies>\n"
" <listOfParameters>\n"
" <parameter id=\"k_bind\" metaid=\"k_bind\" value=\"0.1\" constant=\"true\"/>\n"
" <parameter id=\"k_unbind\" metaid=\"k_unbind\" value=\"0.1\" constant=\"true\"/>\n"
" </listOfParameters>\n"
" <listOfReactions>\n"
" <reaction id=\"Binding\" metaid=\"Binding\" reversible=\"false\" fast=\"false\">\n"
" <listOfReactants>\n"
" <speciesReference species=\"Shc\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Sos\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfReactants>\n"
" <listOfProducts>\n"
" <speciesReference species=\"Shc_Sos_Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfProducts>\n"
" <kineticLaw>\n"
" <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
" <apply>\n"
" <times/>\n"
" <ci> cytoplasm </ci>\n"
" <ci> k_bind </ci>\n"
" <ci> Shc </ci>\n"
" <ci> Sos </ci>\n"
" <ci> Grb2 </ci>\n"
" </apply>\n"
" </math>\n"
" </kineticLaw>\n"
" </reaction>\n"
" <reaction id=\"Unbinding\" metaid=\"Unbinding\" reversible=\"false\" fast=\"false\">\n"
" <listOfReactants>\n"
" <speciesReference species=\"Shc_Sos_Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfReactants>\n"
" <listOfProducts>\n"
" <speciesReference species=\"Shc\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Sos\" stoichiometry=\"1\" constant=\"true\"/>\n"
" <speciesReference species=\"Grb2\" stoichiometry=\"1\" constant=\"true\"/>\n"
" </listOfProducts>\n"
" <kineticLaw>\n"
" <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
" <apply>\n"
" <times/>\n"
" <ci> cytoplasm </ci>\n"
" <ci> k_unbind </ci>\n"
" <ci> Shc_Sos_Grb2 </ci>\n"
" </apply>\n"
" </math>\n"
" </kineticLaw>\n"
" </reaction>\n"
" </listOfReactions>\n"
" </model>\n"
"</sbml>";
RDF* rdf = RDF_new();
// Here we leave "generate_new_metaids" argument to false and set "sbml_semantic_extraction" to false so that we can annotate ourselves
Editor* editor = RDF_toEditor(rdf, sbml, false, false);
// Annotate the Shc entity
PhysicalEntity* Shc = Editor_newPhysicalEntity(editor);
PhysicalEntity_about(Shc, "Shc", MODEL_URI); // corresponds to the metaid for Shc in the SBML source code
PhysicalEntity_identity(Shc, "uniprot/P29353"); // SHC1
PhysicalEntity_hasPropertyisVersionOf(Shc, "OPB:OPB_00340"); // We're modelling the chemical concentration
Editor_addPhysicalEntity(editor, Shc); // add to the RDF graph
// We could optionally annotate where we are modelling Shc, for instance nucleus, cytoplasm, skin, bone, etc. Here
// we do not need to since we are only modelling reactions in the cytoplasm.
// Annotate the Sos entity
PhysicalEntity* Sos = Editor_newPhysicalEntity(editor);
PhysicalEntity_about(Sos, "Sos", MODEL_URI); // corresponds to the metaid for Shc in the SBML source code
PhysicalEntity_identity(Sos, "uniprot/Q07889"); // SOS1
PhysicalEntity_hasPropertyisVersionOf(Sos, "OPB:OPB_00340"); // We're modelling the chemical concentration
Editor_addPhysicalEntity(editor, Sos); // add to the RDF graph
// Annotate the Grb2 entity
PhysicalEntity* Grb2 = Editor_newPhysicalEntity(editor);
PhysicalEntity_about(Grb2, "Grb2", MODEL_URI); // corresponds to the metaid for Shc in the SBML source code
PhysicalEntity_identity(Grb2, "uniprot/P62993"); // Grb2
PhysicalEntity_hasPropertyisVersionOf(Grb2, "OPB:OPB_00340"); // We're modelling the chemical concentration
Editor_addPhysicalEntity(editor, Grb2); // add to the RDF graph
// Annotate the shc_sos_grb2 entity
PhysicalEntity* shc_sos_grb2 = Editor_newPhysicalEntity(editor);
PhysicalEntity_about(shc_sos_grb2, "Shc_Sos_Grb2", MODEL_URI); // corresponds to the metaid for Shc in the SBML source code
PhysicalEntity_hasPropertyisVersionOf(shc_sos_grb2, "OPB:OPB_00340"); // We're modelling the chemical concentration
PhysicalEntity_hasPart(shc_sos_grb2, "uniprot/P29353"); // We're modelling the chemical concentration
PhysicalEntity_hasPart(shc_sos_grb2, "uniprot/Q07889"); // We're modelling the chemical concentration
PhysicalEntity_hasPart(shc_sos_grb2, "uniprot/P62993"); // We're modelling the chemical concentration
Editor_addPhysicalEntity(editor, shc_sos_grb2); // add to the RDF graph
// annotate the binding reaction
PhysicalProcess* binding_reaction = Editor_newPhysicalProcess(editor);
PhysicalProcess_about(binding_reaction, "Binding");
PhysicalProcess_hasPropertyisVersionOf(binding_reaction, "OPB:OPB_00340");
PhysicalProcess_addSource(binding_reaction, "Shc", MODEL_URI, 1.0);
PhysicalProcess_addSource(binding_reaction, "Sos", MODEL_URI, 1.0);
PhysicalProcess_addSource(binding_reaction, "Grb2", MODEL_URI, 1.0);
PhysicalProcess_addSink(binding_reaction, "Shc_Sos_Grb2", MODEL_URI, 1.0);
Editor_addPhysicalProcess(editor, binding_reaction);
// annotate the binding reaction
PhysicalProcess* unbinding_reaction = Editor_newPhysicalProcess(editor);
PhysicalProcess_about(unbinding_reaction, "Unbinding");
PhysicalProcess_hasPropertyisVersionOf(unbinding_reaction, "OPB:OPB_00340");
PhysicalProcess_addSource(unbinding_reaction, "Shc_Sos_Grb2", MODEL_URI, 1.0);
PhysicalProcess_addSink(unbinding_reaction, "Shc", MODEL_URI, 1.0);
PhysicalProcess_addSink(unbinding_reaction, "Sos", MODEL_URI, 1.0);
PhysicalProcess_addSink(unbinding_reaction, "Grb2", MODEL_URI, 1.0);
Editor_addPhysicalProcess(editor, unbinding_reaction);
char* rdf_string = RDF_toString(rdf, "turtle");
printf("%s\n", rdf_string);
free(rdf_string);
// clean up
PhysicalEntity_delete(Shc);
PhysicalEntity_delete(Sos);
PhysicalEntity_delete(Grb2);
PhysicalEntity_delete(shc_sos_grb2);
PhysicalProcess_delete(binding_reaction);
PhysicalProcess_delete(unbinding_reaction);
Editor_delete(editor);
RDF_delete(rdf);
return 0;
}
Output:
Output
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix bqbiol: <http://biomodels.net/biology-qualifiers/> .
@prefix semsim: <http://bime.uw.edu/semsim/> .
@prefix OMEXlib: <http://omex-library.org/> .
@prefix local: <http://omex-library.org/NewOmex.omex/NewModel.rdf#> .
local:EntityProperty0000
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0001
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0002
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:EntityProperty0003
bqbiol:isPropertyOf <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:ProcessProperty0000
bqbiol:isPropertyOf local:Binding ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:ProcessProperty0001
bqbiol:isPropertyOf local:Unbinding ;
bqbiol:isVersionOf <https://identifiers.org/OPB:OPB_00340> .
local:SinkParticipant0000
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> .
local:SinkParticipant0001
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> .
local:SinkParticipant0002
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> .
local:SinkParticipant0003
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> .
local:SourceParticipant0000
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc> .
local:SourceParticipant0001
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Sos> .
local:SourceParticipant0002
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2> .
local:SourceParticipant0003
semsim:hasMultiplier "1"^^rdf:double ;
semsim:hasPhysicalEntityReference <http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Binding>
semsim:hasSinkParticipant local:SinkParticipant0000 ;
semsim:hasSourceParticipant local:SourceParticipant0000, local:SourceParticipant0001, local:SourceParticipant0002 .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Grb2>
bqbiol:is <https://identifiers.org/uniprot/P62993> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Shc>
bqbiol:is <https://identifiers.org/uniprot/P29353> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Shc_Sos_Grb2>
bqbiol:hasPart <https://identifiers.org/uniprot/P29353>, <https://identifiers.org/uniprot/P62993>, <https://identifiers.org/uniprot/Q07889> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Sos>
bqbiol:is <https://identifiers.org/uniprot/Q07889> .
<http://omex-library.org/NewOmex.omex/NewModel.xml#Unbinding>
semsim:hasSinkParticipant local:SinkParticipant0001, local:SinkParticipant0002, local:SinkParticipant0003 ;
semsim:hasSourceParticipant local:SourceParticipant0003 .