Commit da6150e1 authored by BARGAIN Orianne's avatar BARGAIN Orianne
Browse files

add double michaelis menten detection

parent 00be8258
E+S=>SE.
SE+S=>SSE.
SSE=>SE+P+X.
SE=>E+P.
E+S=>SE.
SE+S=>SSE.
SSE=>SE+P.
SE=>E+P.
E+X=>Y.
......@@ -22,6 +22,7 @@
:- initial(option(enzyme: yes)).
:- initial(option(hill_reaction: no)).
:- initial(option(partial_hill_reaction: no)).
:- initial(option(double_michaelis_menten: no)).
pattern_reduction(Input_file) :-
......@@ -34,6 +35,7 @@ pattern_reduction(Input_file) :-
option(ep, yesno, MM_EP, 'michaelis menten with EP specie'),
option(hill_reaction, yesno, Hill, 'specifies if reducing hill patterns'),
option(partial_hill_reaction, yesno, Part_Hill, 'specifies if reducing partial hill patterns'),
option(double_michaelis_menten, yesno, Double_MM, 'specifies if reducing double michaelis menten'),
option(enzyme, yesno, MM_E, 'michaelis menten reduced reaction with enzyme'),
debug(motif, "Debugging motif reduction", []),
debug(motif, "Option: R_1:~w", [MM_R_1]),
......@@ -70,6 +72,14 @@ pattern_reduction(Input_file) :-
;
true
),
(
Double_MM = yes
->
partial_michaelis_menten(Graph, Stream, Dict_arcs_direct, Dict_arcs_indirect),
debug(motif, "Done looking for double Michaelis Menten", [])
;
true
),
write_reactions(Graph, Stream, Dict_arcs_direct, Dict_arcs_indirect),
close(Stream).
......@@ -603,3 +613,105 @@ partial_hill_reaction(ES, Dict_arcs_direct, Dict_arcs_indirect, E, S, P):-
assert(seen(R3)),
assert(seen(ES)),
assert(seen(ESS)).
/* partial_michaelis_menten */
/* partial_michaelis_menten(+Graph, +Stream, +Dict_arcs_direct, +Dict_arcs_indirect)
-> looks for hill reactions
+Graph: the graph
+Stream: where to write the new graph
+Dict_arcs_direct: dict of directed arcs
+Dict_arcs_indirect: dict of undirected arcs */
partial_michaelis_menten(Graph, Stream, Dict_arcs_direct, Dict_arcs_indirect):-
Graph = [Number_vertex, Number_species, _, Id],
assert(seen(Number_vertex)),
Number_species_1 is Number_species - 1,
numlist(0, Number_species_1, Species_list),
set_counter(patrial_michaelis_menten_count, 0),
forall(
(
member(ES, Species_list)
),
(
(
not(seen(ES)),
once(partial_michaelis_menten(ES, Dict_arcs_direct, Dict_arcs_indirect, E, S, P))
->
debug(motif, "Hill reaction with E:~w S:~w P:~w ES:~w", [E, S, P, ES]),
write_reaction([E, S], [E, P], Id, Stream),
count(patrial_michaelis_menten_count, _)
;
true
)
)
),
peek_count(patrial_michaelis_menten_count, Nb_partial_michaelis_menten),
write('\nNumber of double Michaelis Menten: '),
write(Nb_partial_michaelis_menten),
write('\n').
/* partial_michaelis_menten */
/* partial_michaelis_menten(+ES, +Dict_arcs_direct, +Dict_arcs_indirect, +E, +S, +P)
-> checks if the concerned species and reactions form a hill reaction
+ES: catalyser
+Dict_arcs_direct: dict of directed arcs
+Dict_arcs_indirect: dict of undirected arcs
+E: enzyme
+S: substrate
+P: product */
partial_michaelis_menten(ES, Dict_arcs_direct, Dict_arcs_indirect, E, S, P):-
get_dict(ES, Dict_arcs_indirect, Targets_ES),
(
Targets_ES = [R11, R22]
;
Targets_ES = [R22, R11]
),
get_dict(ES, Dict_arcs_direct, Goals_ES),
(
Goals_ES = [R12, R21]
;
Goals_ES = [R21, R12]
),
get_dict(R21, Dict_arcs_indirect, Targets_R21),
(
Targets_R21 = [S, ES]
;
Targets_R21 = [ES, S]
),
get_dict(R21, Dict_arcs_direct, Goals_R21),
Goals_R21 = [ESS],
get_dict(ESS, Dict_arcs_indirect, Targets_ESS),
Targets_ESS = [R21],
get_dict(ESS, Dict_arcs_direct, Goals_ESS),
Goals_ESS = [R22],
get_dict(R22, Dict_arcs_indirect, Targets_R22),
Targets_R22 = [ESS],
get_dict(R22, Dict_arcs_direct, Goals_R22),
(
Goals_R22 = [ES, P]
;
Goals_R22 = [P, ES]
),
get_dict(R12, Dict_arcs_indirect, Targets_R12),
Targets_R12 = [ES],
get_dict(R12, Dict_arcs_direct, Goals_R12),
(
Goals_R12 = [E, P]
;
Goals_R12 = [P, E]
),
get_dict(R11, Dict_arcs_indirect, Targets_R11),
(
Targets_R11 = [S, E]
;
Targets_R11 = [E, S]
),
get_dict(R11, Dict_arcs_direct, Goals_R11),
Goals_R11 = [ES],
assert(seen(R11)),
assert(seen(R12)),
assert(seen(R21)),
assert(seen(R22)),
assert(seen(ES)),
assert(seen(ESS)).
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