Skip to content

Commit 1cdf723

Browse files
add_LLM_add_GUI_add_dmg
1 parent 6c41db7 commit 1cdf723

File tree

86 files changed

+158318
-677023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+158318
-677023
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,8 @@ testSQL.py
146146
/dist/
147147
/static/
148148
/templates/
149+
150+
.idea/
151+
*.dmg
152+
*.bin
153+
src/ml_sbo/models/**

README_Enhance.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# SBOannotator
2+
<img align="right" src="SBOannotator_logo.png" alt="drawing" width="250"/>
3+
4+
**SBOannotator: a Python tool for the automated assignment of Systems Biology Ontology terms**
5+
6+
[![License (LGPL version 3)](https://img.shields.io/badge/license-LGPLv3.0-blue.svg?style=plastic)](http://opensource.org/licenses/LGPL-3.0)
7+
[![Latest version](https://img.shields.io/badge/Latest_version-3.0.1-brightgreen.svg?style=plastic)](https://github.com/draeger-lab/SBOannotator/releases/)
8+
![Code Size](https://img.shields.io/github/languages/code-size/draeger-lab/SBOannotator.svg?style=plastic)
9+
[![PyPI version](https://badge.fury.io/py/SBOannotator.svg)](https://badge.fury.io/py/SBOannotator)
10+
![PyPI - Format](https://img.shields.io/pypi/format/SBOannotator)
11+
[![PyPI downloads](https://img.shields.io/pypi/dm/SBOannotator.svg)](https://pypistats.org/packages/SBOannotator)
12+
[![DOI](https://img.shields.io/badge/DOI-10.1093%2Fbioinformatics%2Fbtad437-blue.svg?style=plastic)](https://doi.org/10.1093/bioinformatics/btad437)
13+
14+
Developers : [Nantia Leonidou](https://github.com/NantiaL) & Elisabeth Fritze& Jiahui Hu
15+
___________________________________________________________________________________________________________
16+
17+
18+
### Overview
19+
This project transforms SBOannotator from a static, hard-coded tool into a dynamic, intelligent system for annotating Systems Biology Ontology (SBO) terms in SBML models. The enhanced system integrates real-time SBO term retrieval, multiple enzymology data sources, and LLM-assisted annotation—significantly improving accuracy and usability while preserving the core rule-based strengths. A standalone desktop GUI with interactive visualization makes powerful annotation capabilities accessible to a broader community of systems biology researchers.
20+
The system delivers three key innovations:
21+
Automated GitHub integration for real-time SBO file updates;
22+
23+
24+
A three-layer rule-based annotation workflow;
25+
26+
27+
A deep-learning classifier achieving 94% accuracy across 42 biochemical reaction classes.
28+
29+
30+
### Desktop App
31+
32+
+ Mac: download dmg which is saved in the root directory:`sboannotator.dmg`
33+
34+
If ERROR occurs, input command in terminal to bypass security check:
35+
36+
`sudo xattr -r -d com.apple.quarantine /Applications/main.app`
37+
!But it only can finish rule based annotation because of complex dependencies and direcotory operation with llm.
38+
39+
40+
41+
42+
### Input data
43+
+ an SBML document
44+
+ an sbo terms (.json or obo)(optional)
45+
46+
47+
### Outputs
48+
+ Rule Based Enhanced Annotated libSBML model
49+
+ LLM Annototed libSBML model
50+
+ Uptodate SBO terms (.json)
51+
52+
### Usage
53+
This tool has the following dependencies:
54+
55+
python >=3.9.6
56+
57+
Packages:
58+
59+
sqlite3
60+
libsbml
61+
collections
62+
requests
63+
json
64+
time
65+
66+
-`pip install -r requirements.txt`
67+
68+
run `python main.py` in the command line within the project folder.
69+
70+
If ERROR occurs, check the current version of Python:
71+
72+
- `python --version'`
73+
- `conda install python>=3.9.6`
74+
75+
### Exemplary models and results
76+
The folder `models/Customer_Models` contains a models as it were downloaded from
77+
the BiGG database.
78+
The annotated models after using the Rule based SBOannotator and target reaction filtered for llm are listed in the folder named `models/Enhanced_Annotated_Models`.
79+
The annotated models after using the LLM recommendationi are listed in the models/LLM_Annotated_Models

models/Annotated_Models/RECON1_SBOannotated.xml

Lines changed: 0 additions & 227456 deletions
This file was deleted.

models/Annotated_Models/Recon3D_SBOannotated.xml

Lines changed: 0 additions & 448875 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" sboTerm="SBO:0000693" level="3" version="1" fbc:required="false">
3+
<model metaid="TestModel" id="TestModel" name="AKGDm Test Model" substanceUnits="mole" timeUnits="hour" extentUnits="mole">
4+
<listOfUnitDefinitions>
5+
<unitDefinition id="mmol_per_gDW_per_hr">
6+
<listOfUnits>
7+
<unit kind="mole" exponent="1" scale="-3" multiplier="1"/>
8+
<unit kind="gram" exponent="-1" scale="0" multiplier="1"/>
9+
<unit kind="second" exponent="-1" scale="0" multiplier="3600"/>
10+
</listOfUnits>
11+
</unitDefinition>
12+
</listOfUnitDefinitions>
13+
<listOfCompartments>
14+
<compartment sboTerm="SBO:0000290" id="c" name="cytosol" spatialDimensions="3" size="1" constant="true"/>
15+
<compartment sboTerm="SBO:0000290" id="m" name="mitochondria" spatialDimensions="3" size="1" constant="true"/>
16+
</listOfCompartments>
17+
<listOfSpecies>
18+
<species metaid="M_akg_m" sboTerm="SBO:0000247" id="M_akg_m" name="2-Oxoglutarate" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
19+
<species metaid="M_coa_m" sboTerm="SBO:0000247" id="M_coa_m" name="Coenzyme A" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
20+
<species metaid="M_nad_m" sboTerm="SBO:0000247" id="M_nad_m" name="Nicotinamide adenine dinucleotide" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
21+
<species metaid="M_co2_m" sboTerm="SBO:0000247" id="M_co2_m" name="CO2" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
22+
<species metaid="M_nadh_m" sboTerm="SBO:0000247" id="M_nadh_m" name="Nicotinamide adenine dinucleotide - reduced" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
23+
<species metaid="M_succoa_m" sboTerm="SBO:0000247" id="M_succoa_m" name="Succinyl-CoA" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
24+
</listOfSpecies>
25+
<listOfParameters>
26+
<parameter sboTerm="SBO:0000626" id="cobra_default_lb" value="-1000" constant="true"/>
27+
<parameter sboTerm="SBO:0000626" id="cobra_default_ub" value="1000" constant="true"/>
28+
<parameter sboTerm="SBO:0000626" id="cobra_0_bound" value="0" constant="true"/>
29+
</listOfParameters>
30+
<listOfReactions>
31+
<reaction metaid="R_AKGDm" sboTerm="SBO:0000399" id="R_AKGDm" name="2-oxoglutarate dehydrogenase" reversible="false" fast="false" fbc:lowerFluxBound="cobra_0_bound" fbc:upperFluxBound="cobra_default_ub">
32+
<annotation>
33+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
34+
<rdf:Description rdf:about="#R_AKGDm">
35+
<bqbiol:is xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
36+
<rdf:Bag>
37+
<rdf:li rdf:resource="http://identifiers.org/seed.reaction/rxn08094"/>
38+
</rdf:Bag>
39+
</bqbiol:is>
40+
</rdf:Description>
41+
</rdf:RDF>
42+
</annotation>
43+
<listOfReactants>
44+
<speciesReference species="M_akg_m" stoichiometry="1" constant="true"/>
45+
<speciesReference species="M_coa_m" stoichiometry="1" constant="true"/>
46+
<speciesReference species="M_nad_m" stoichiometry="1" constant="true"/>
47+
</listOfReactants>
48+
<listOfProducts>
49+
<speciesReference species="M_co2_m" stoichiometry="1" constant="true"/>
50+
<speciesReference species="M_nadh_m" stoichiometry="1" constant="true"/>
51+
<speciesReference species="M_succoa_m" stoichiometry="1" constant="true"/>
52+
</listOfProducts>
53+
<fbc:geneProductAssociation>
54+
<fbc:and>
55+
<fbc:geneProductRef fbc:geneProduct="G_100689437"/>
56+
<fbc:geneProductRef fbc:geneProduct="G_100758466"/>
57+
<fbc:or>
58+
<fbc:geneProductRef fbc:geneProduct="G_100764862"/>
59+
<fbc:geneProductRef fbc:geneProduct="G_100769436"/>
60+
</fbc:or>
61+
</fbc:and>
62+
</fbc:geneProductAssociation>
63+
</reaction>
64+
</listOfReactions>
65+
<fbc:listOfObjectives fbc:activeObjective="obj">
66+
<fbc:objective fbc:id="obj" fbc:type="maximize">
67+
<fbc:listOfFluxObjectives>
68+
<fbc:fluxObjective fbc:reaction="R_AKGDm" fbc:coefficient="1"/>
69+
</fbc:listOfFluxObjectives>
70+
</fbc:objective>
71+
</fbc:listOfObjectives>
72+
<fbc:listOfGeneProducts>
73+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100689437" fbc:name="hypothetical gene 1" fbc:label="gene_100689437"/>
74+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100758466" fbc:name="hypothetical gene 2" fbc:label="gene_100758466"/>
75+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100764862" fbc:name="hypothetical gene 3" fbc:label="gene_100764862"/>
76+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100769436" fbc:name="hypothetical gene 4" fbc:label="gene_100769436"/>
77+
</fbc:listOfGeneProducts>
78+
</model>
79+
</sbml>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" sboTerm="SBO:0000693" level="3" version="1" fbc:required="false">
3+
<model metaid="TestModel" id="TestModel" name="AKGDm Test Model" substanceUnits="mole" timeUnits="hour" extentUnits="mole">
4+
<listOfUnitDefinitions>
5+
<unitDefinition id="mmol_per_gDW_per_hr">
6+
<listOfUnits>
7+
<unit kind="mole" exponent="1" scale="-3" multiplier="1"/>
8+
<unit kind="gram" exponent="-1" scale="0" multiplier="1"/>
9+
<unit kind="second" exponent="-1" scale="0" multiplier="3600"/>
10+
</listOfUnits>
11+
</unitDefinition>
12+
</listOfUnitDefinitions>
13+
<listOfCompartments>
14+
<compartment sboTerm="SBO:0000290" id="c" name="cytosol" spatialDimensions="3" size="1" constant="true"/>
15+
<compartment sboTerm="SBO:0000290" id="m" name="mitochondria" spatialDimensions="3" size="1" constant="true"/>
16+
</listOfCompartments>
17+
<listOfSpecies>
18+
<species metaid="M_akg_m" sboTerm="SBO:0000247" id="M_akg_m" name="2-Oxoglutarate" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
19+
<species metaid="M_coa_m" sboTerm="SBO:0000247" id="M_coa_m" name="Coenzyme A" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
20+
<species metaid="M_nad_m" sboTerm="SBO:0000247" id="M_nad_m" name="Nicotinamide adenine dinucleotide" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
21+
<species metaid="M_co2_m" sboTerm="SBO:0000247" id="M_co2_m" name="CO2" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
22+
<species metaid="M_nadh_m" sboTerm="SBO:0000247" id="M_nadh_m" name="Nicotinamide adenine dinucleotide - reduced" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
23+
<species metaid="M_succoa_m" sboTerm="SBO:0000247" id="M_succoa_m" name="Succinyl-CoA" compartment="m" initialConcentration="0" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
24+
</listOfSpecies>
25+
<listOfParameters>
26+
<parameter sboTerm="SBO:0000626" id="cobra_default_lb" value="-1000" constant="true"/>
27+
<parameter sboTerm="SBO:0000626" id="cobra_default_ub" value="1000" constant="true"/>
28+
<parameter sboTerm="SBO:0000626" id="cobra_0_bound" value="0" constant="true"/>
29+
</listOfParameters>
30+
<listOfReactions>
31+
<reaction metaid="R_AKGDm" sboTerm="SBO:0000399" id="R_AKGDm" name="2-oxoglutarate dehydrogenase" reversible="false" fast="false" fbc:lowerFluxBound="cobra_0_bound" fbc:upperFluxBound="cobra_default_ub">
32+
<annotation>
33+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
34+
<rdf:Description rdf:about="#R_AKGDm">
35+
<bqbiol:is xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
36+
<rdf:Bag>
37+
<rdf:li rdf:resource="http://identifiers.org/seed.reaction/rxn08094"/>
38+
</rdf:Bag>
39+
</bqbiol:is>
40+
</rdf:Description>
41+
</rdf:RDF>
42+
</annotation>
43+
<listOfReactants>
44+
<speciesReference species="M_akg_m" stoichiometry="1" constant="true"/>
45+
<speciesReference species="M_coa_m" stoichiometry="1" constant="true"/>
46+
<speciesReference species="M_nad_m" stoichiometry="1" constant="true"/>
47+
</listOfReactants>
48+
<listOfProducts>
49+
<speciesReference species="M_co2_m" stoichiometry="1" constant="true"/>
50+
<speciesReference species="M_nadh_m" stoichiometry="1" constant="true"/>
51+
<speciesReference species="M_succoa_m" stoichiometry="1" constant="true"/>
52+
</listOfProducts>
53+
<fbc:geneProductAssociation>
54+
<fbc:and>
55+
<fbc:geneProductRef fbc:geneProduct="G_100689437"/>
56+
<fbc:geneProductRef fbc:geneProduct="G_100758466"/>
57+
<fbc:or>
58+
<fbc:geneProductRef fbc:geneProduct="G_100764862"/>
59+
<fbc:geneProductRef fbc:geneProduct="G_100769436"/>
60+
</fbc:or>
61+
</fbc:and>
62+
</fbc:geneProductAssociation>
63+
</reaction>
64+
</listOfReactions>
65+
<fbc:listOfObjectives fbc:activeObjective="obj">
66+
<fbc:objective fbc:id="obj" fbc:type="maximize">
67+
<fbc:listOfFluxObjectives>
68+
<fbc:fluxObjective fbc:reaction="R_AKGDm" fbc:coefficient="1"/>
69+
</fbc:listOfFluxObjectives>
70+
</fbc:objective>
71+
</fbc:listOfObjectives>
72+
<fbc:listOfGeneProducts>
73+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100689437" fbc:name="hypothetical gene 1" fbc:label="gene_100689437"/>
74+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100758466" fbc:name="hypothetical gene 2" fbc:label="gene_100758466"/>
75+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100764862" fbc:name="hypothetical gene 3" fbc:label="gene_100764862"/>
76+
<fbc:geneProduct sboTerm="SBO:0000243" fbc:id="G_100769436" fbc:name="hypothetical gene 4" fbc:label="gene_100769436"/>
77+
</fbc:listOfGeneProducts>
78+
</model>
79+
</sbml>

0 commit comments

Comments
 (0)