Commit 9efcba80 authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

add option to not add inhibitors when inferring reactions

parent c507e21c
......@@ -174,6 +174,8 @@ biocham: list_ode.
\\end{example}
").
:- initial(option(import_reactions_with_inhibitors: no)).
%load_ode_system(InputFile) :-
load_reactions_from_ode(InputFile) :-
biocham_command,
......@@ -181,6 +183,8 @@ load_reactions_from_ode(InputFile) :-
doc("
infers a set of reactions equivalent to an ODE system, and loads it as \\command{load_biocham/1}.
"),
option(import_reactions_with_inhibitors, yesno, _,
'Add inhibitors when inferring reactions.'),
retractall(flag_influences),
models:load_all('ode', InputFile).
......@@ -192,6 +196,8 @@ add_reactions_from_ode(InputFile) :-
doc('
infers a set of reactions equivalent to an ODE system, and adds it to the current model as \\command{add_biocham/1}.
'),
option(import_reactions_with_inhibitors, yesno, _,
'Add inhibitors when inferring reactions.'),
retractall(flag_influences),
models:add_all('ode', InputFile).
......@@ -344,6 +350,8 @@ init(InitList) :-
add_reactions_from_ode_system :-
biocham_command,
doc('adds a set of reactions equivalent to the current ODE system.'),
option(import_reactions_with_inhibitors, yesno, _,
'Add inhibitors when inferring reactions.'),
get_current_ode_system(Id),
!,
retractall(flag_influences),
......@@ -369,6 +377,8 @@ load_reactions_from_ode_system :-
biocham_command,
doc('Replaces the current reactions with those from
\\command{add_reactions_from_ode_system/0}.'),
option(import_reactions_with_inhibitors, yesno, _,
'Add inhibitors when inferring reactions.'),
delete_reactions,
add_reactions_from_ode_system.
......@@ -689,10 +699,17 @@ add_term_as_reactions(Id, Term, Occurrences) :-
reactant(Object, Coefficient),
Reactants
),
findall(
Object,
inhibitor(Object, _Coefficient),
Inhibitors
get_option(import_reactions_with_inhibitors, AddInh),
(
AddInh = yes
->
findall(
Object,
inhibitor(Object, _Coefficient),
Inhibitors
)
;
Inhibitors = []
),
findall(
Coefficient * Object,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment