generated from SystemsBioinformatics/sbl-template-pub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable_1.py
executable file
·27 lines (23 loc) · 925 Bytes
/
Table_1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from helpers_EFM_FBA import *
model_dir = os.path.join("models")
model_list = ["iJR904",
"Lactobacillus_plantarum_WCFS1_Official_23_May_2019_18_45_01",
"MG1363_20190628",
"iAF1260b",
"iMM904",
"iNJ661"]
for model_name in model_list:
# load model
try:
cmod = cbm.readSBML3FBC(os.path.join(model_dir, model_name + ".xml"))
# cmod.setNotes(cmod.getNotes().encode(encoding='ascii', errors='ignore'))
except: # use version 2
cmod = cbm.readSBML2FBA(os.path.join(model_dir, model_name + ".xml"))
# do FBA with scaled reduced cost
cbm.analyzeModel(cmod, with_reduced_costs='scaled')
# find scaled reduced costs
nzrc_dictionaries_scaled, n_objectives_scaled = get_nzrc(cmod)
# report output
print('Number of nzrc reactions for model:')
print(model_name)
print(len(nzrc_dictionaries_scaled))