Skip to content

Commit fd5fd9b

Browse files
Merge pull request #9 from brsynth/dev
update v0.1.3: add models to manifest
2 parents 0203aef + c795bdc commit fd5fd9b

9 files changed

Lines changed: 352114 additions & 8 deletions

File tree

damn/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.1"
1+
__version__ = "0.1.3"

damn/models/ecoli/M28_OD_20.csv

Lines changed: 21 additions & 0 deletions
Large diffs are not rendered by default.

damn/models/ecoli/M28_media.csv

Lines changed: 281 additions & 0 deletions
Large diffs are not rendered by default.

damn/models/ecoli/iML1515_duplicated.xml

Lines changed: 177359 additions & 0 deletions
Large diffs are not rendered by default.

damn/models/putida/IJN1463EXP_duplicated.xml

Lines changed: 174334 additions & 0 deletions
Large diffs are not rendered by default.

damn/models/putida/modul.zip

21.9 MB
Binary file not shown.

damn/models/putida/putida_OD_81.csv

Lines changed: 21 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
ID,glc__D_e,xyl__D_e,succ_e,ala__L_e,arg__L_e,asn__L_e,asp__L_e,cys__L_e,glu__L_e,gln__L_e,gly_e,his__L_e,ile__L_e,leu__L_e,lys__L_e,met__L_e,phe__L_e,pro__L_e,ser__L_e,thr__L_e,trp__L_e,tyr__L_e,val__L_e,ade_e,gua_e,csn_e,ura_e,thymd_e
2+
1,0,0,0,0,1.742,0,0,0.242,0,0,0,0.776,0,0,0.731,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
3+
2,0,0,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
4+
3,0,0,0,0.891,0,1.321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
5+
4,0,0,0,0.891,0,1.321,0,0,0,0,0,0.776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
6+
5,0,0,0,0,0,0,0,0,1.471,1.462,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
7+
6,0,0,0,0,1.742,0,0,0,0,0,0,0,0,0,0,0,0,1.151,0,0,0,0,0,0,0,0,0,0
8+
7,0,0,0,0,0,0,0,0,0,0,0,0,1.312,1.312,0,0,0,0,0,0,0,0,1.172,0,0,0,0,0
9+
8,0,0,0,0,1.742,0,0,0.242,0,0,0,0,0,0,0,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
10+
9,0,0,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,0,0,0,0,0,0,0,0,0,0,0,0
11+
10,3.964,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.222,0.224,0.484
12+
11,3.964,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0.222,0.224,0.484
13+
12,3.964,0,0,0,1.742,0,0,0.242,0,0,0,0.776,0,0,0.731,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
14+
13,3.964,0,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
15+
14,3.964,0,0,0,0,0,0,0,0,0,0.751,0,0,0,0,0,0,0,1.051,1.191,0,0,0,0,0,0,0,0
16+
15,3.964,0,0,0.891,0,1.321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
17+
16,3.964,0,0,0.891,0,1.321,0,0,0,0,0,0.776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
18+
17,3.964,0,0,0,0,0,0,0,1.471,1.462,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
19+
18,3.964,0,0,0,1.742,0,0,0,0,0,0,0,0,0,0,0,0,1.151,0,0,0,0,0,0,0,0,0,0
20+
19,3.964,0,0,0,0,0,0,0,0,0,0,0,1.312,1.312,0,0,0,0,0,0,0,0,1.172,0,0,0,0,0
21+
20,3.964,0,0,0,0,0,0,0.242,0,0,0,0,0,0,0,0.746,0,0,0,0,0,0,0,0,0,0,0,0
22+
21,3.964,0,0,0,1.742,0,0,0.242,0,0,0,0,0,0,0,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
23+
22,3.964,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
24+
23,3.964,0,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,0,0,0,0,0,0,0,0,0,0,0,0
25+
24,3.964,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0,0,0
26+
25,0,3.603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.222,0.224,0.484
27+
26,0,3.603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0.222,0.224,0.484
28+
27,0,3.603,0,0,1.742,0,0,0.242,0,0,0,0.776,0,0,0.731,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
29+
28,0,3.603,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
30+
29,0,3.603,0,0,0,0,0,0,0,0,0.751,0,0,0,0,0,0,0,1.051,1.191,0,0,0,0,0,0,0,0
31+
30,0,3.603,0,0.891,0,1.321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
32+
31,0,3.603,0,0.891,0,1.321,0,0,0,0,0,0.776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
33+
32,0,3.603,0,0,0,0,0,0,1.471,1.462,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
34+
33,0,3.603,0,0,1.742,0,0,0,0,0,0,0,0,0,0,0,0,1.151,0,0,0,0,0,0,0,0,0,0
35+
34,0,3.603,0,0,0,0,0,0,0,0,0,0,1.312,1.312,0,0,0,0,0,0,0,0,1.172,0,0,0,0,0
36+
35,0,3.603,0,0,0,0,0,0.242,0,0,0,0,0,0,0,0.746,0,0,0,0,0,0,0,0,0,0,0,0
37+
36,0,3.603,0,0,1.742,0,0,0.242,0,0,0,0,0,0,0,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
38+
37,0,3.603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
39+
38,0,3.603,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,0,0,0,0,0,0,0,0,0,0,0,0
40+
39,0,3.603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0,0,0
41+
40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.222,0.224,0.484
42+
41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0.222,0.224,0.484
43+
42,0,0,0,0,1.742,0,0,0.242,0,0,0,0.776,0,0,0.731,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
44+
43,0,0,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
45+
44,0,0,0,0,0,0,0,0,0,0,0.751,0,0,0,0,0,0,0,1.051,1.191,0,0,0,0,0,0,0,0
46+
45,0,0,0,0.891,0,1.321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
47+
46,0,0,0,0.891,0,1.321,0,0,0,0,0,0.776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
48+
47,0,0,0,0,0,0,0,0,1.471,1.462,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
49+
48,0,0,0,0,1.742,0,0,0,0,0,0,0,0,0,0,0,0,1.151,0,0,0,0,0,0,0,0,0,0
50+
49,0,0,0,0,0,0,0,0,0,0,0,0,1.312,1.312,0,0,0,0,0,0,0,0,1.172,0,0,0,0,0
51+
50,0,0,0,0,0,0,0,0.242,0,0,0,0,0,0,0,0.746,0,0,0,0,0,0,0,0,0,0,0,0
52+
51,0,0,0,0,1.742,0,0,0.242,0,0,0,0,0,0,0,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
53+
52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
54+
53,0,0,0,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,0,0,0,0,0,0,0,0,0,0,0,0
55+
54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0,0,0
56+
55,0,0,1.161,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.222,0.224,0.484
57+
56,0,0,1.161,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.27,0.302,0.222,0.224,0.484
58+
57,0,0,1.161,0,1.742,0,0,0.242,0,0,0,0.776,0,0,0.731,0.746,0,1.151,0,0,0,0,0,0,0,0,0,0
59+
58,0,0,1.161,0,0,0,0,0,0,0,0,0.776,0,0,0.731,0,1.652,0,0,0,1.021,0.906,0,0,0,0,0,0
60+
59,0,0,1.161,0,0,0,0,0,0,0,0.751,0,0,0,0,0,0,0,1.051,1.191,0,0,0,0,0,0,0,0
61+
60,0,0,1.161,0.891,0,1.321,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
62+
61,0,0,1.161,0.891,0,1.321,0,0,0,0,0,0.776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
63+
62,0,0,1.161,0,0,0,0,0,1.471,1.462,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
64+
63,0,0,1.161,0,1.742,0,0,0,0,0,0,0,0,0,0,0,0,1.151,0,0,0,0,0,0,0,0,0,0
65+
64,0,0,1.161,0,0,0,0,0,0,0,0,0,1.312,1.312,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0
82+
81,0,0,0,0.891,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

damn/train.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
import os
22
import numpy as np
33
import tensorflow as tf
4+
from importlib.resources import files
45
import damn
56
from damn import model
67
from damn import plot
78

89
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
9-
DAMN_DIR = os.path.dirname(os.path.abspath(damn.__file__))
10-
PROJECT_ROOT = os.path.dirname(DAMN_DIR)
11-
DOCS_DIR = os.path.join(PROJECT_ROOT, "docs")
10+
#DAMN_DIR = os.path.dirname(os.path.abspath(damn.__file__))
11+
#PROJECT_ROOT = os.path.dirname(DAMN_DIR)
12+
#DOCS_DIR = os.path.join(PROJECT_ROOT, "docs")
13+
14+
15+
def get_default_model(organism):
16+
if organism.lower() == "putida":
17+
return str(files("damn.models.putida").joinpath("IJN1463EXP_duplicated.xml"))
18+
elif organism.lower() == "ecoli":
19+
return str(files("damn.models.ecoli").joinpath("iML1515_duplicated.xml"))
20+
else:
21+
raise ValueError("Custom model must be provided")
1222

1323
def train_damn(
1424
organism="custom",
@@ -48,8 +58,7 @@ def train_damn(
4858
"file_name": "putida_OD_81",
4959
"od_file": "putida_OD_81.csv",
5060
"media_file": "putida_media_81.csv",
51-
"cobra_model_file": os.path.join(
52-
DOCS_DIR, "putida", "IJN1463EXP_duplicated.xml"),
61+
"cobra_model_file": get_default_model('putida'),
5362
"biomass_rxn_id": "BIOMASS_KT2440_WT3",
5463
"seed": 1,
5564
"num_epochs": 500,
@@ -62,8 +71,7 @@ def train_damn(
6271
"file_name": "M28_OD_20",
6372
"od_file": "M28_OD_20.csv",
6473
"media_file": "M28_media.csv",
65-
"cobra_model_file": os.path.join(
66-
DOCS_DIR, "putida","iML1515_duplicated.xml"),
74+
"cobra_model_file": get_default_model('ecoli'),
6775
"biomass_rxn_id": "BIOMASS_Ec_iML1515_core_75p37M",
6876
"seed": 30,
6977
"num_epochs": 1000,

0 commit comments

Comments
 (0)