Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true
}
12 changes: 6 additions & 6 deletions coralme/builder/troubleshooting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sympy
import pandas
import logging
import sys

log = logging.getLogger(__name__)

def process_model(model, growth_key = sympy.Symbol('mu', positive = True), parameters = dict()):
Expand All @@ -21,7 +21,7 @@ def process_model(model, growth_key = sympy.Symbol('mu', positive = True), param

dct = {}
for met in model.metabolites:
filter1 = isinstance(met, (cobra.core.metabolite.Metabolite, coralme.core.component.Metabolite))
filter1 = type(met) == cobra.core.metabolite.Metabolite or type(met) == coralme.core.component.Metabolite
filter2 = met.id.startswith('trna')
filter3 = met.id.endswith('trna_c')

Expand All @@ -39,9 +39,9 @@ def process_model(model, growth_key = sympy.Symbol('mu', positive = True), param
# lb = lb.subs(parameters).subs(growth_key, 1.)
# if hasattr(ub, 'subs'):
# ub = ub.subs(parameters).subs(growth_key, 1.)
# if met not in rxn.metabolites:
# # Sometimes it has a ghost association, ? e.g. h_c in ATPM of Synechocystis
# continue
if met not in rxn.metabolites:
# Sometimes it has a ghost association, ? e.g. h_c in ATPM of Synechocystis
continue
# coeff = rxn.metabolites[met]
# if hasattr(coeff, 'subs'):
# coeff = coeff.subs(parameters).subs(growth_key, 1.)
Expand Down Expand Up @@ -216,7 +216,7 @@ def brute_force_check(me_model, metabolites_to_add, growth_key_and_value,solver=
"""
if solver in ['gurobi', 'cplex']:
me_model.get_solution = me_model.optimize_windows
me_model.get_feasibility =me_model.feas_windows(solver = solver)
me_model.get_feasibility = me_model.feas_windows(solver = solver)
elif solver == "qminos":
me_model.get_solution = me_model.optimize
me_model.get_feasibility = me_model.feasibility
Expand Down
1 change: 1 addition & 0 deletions coralme/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
import coralme.core.parameters
import coralme.core.processdata
import coralme.core.reaction
import coralme.core.optimization
Loading