Skip to content

Commit

Permalink
fix: index free_enzyme_ratio by edge_to_enzyme on get_allostery
Browse files Browse the repository at this point in the history
  • Loading branch information
carrascomj committed Jul 12, 2024
1 parent 1a749d3 commit b8eb4c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions maud/stan/functions.stan
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ functions {
// one per allostery
array[] int allostery_mic,
// one per allostery
array[] int edge_to_tc // one per edge
array[] int edge_to_tc, // one per edge
array[] int edge_to_enzyme
) {
int N_edge = size(allostery_ix_bounds);
vector[N_edge] out = rep_vector(1, N_edge);
Expand All @@ -241,7 +242,7 @@ functions {
}
out[f] = inv(1
+ tc_edge
* (free_enzyme_ratio[f] * Q_num / Q_denom) ^ subunits[f]);
* (free_enzyme_ratio[edge_to_enzyme[f]] * Q_num / Q_denom) ^ subunits[edge_to_enzyme[f]]);
}
return out;
}
Expand Down Expand Up @@ -358,7 +359,7 @@ functions {
subunits, allostery_ix_long,
allostery_ix_bounds,
allostery_type, allostery_mic,
edge_to_tc);
edge_to_tc, edge_to_enzyme);
vector[N_edge] phosphorylation = get_phosphorylation(kcat_pme, conc_pme,
phos_ix_long,
phos_ix_bounds,
Expand Down Expand Up @@ -496,7 +497,7 @@ functions {
subunits, allostery_ix_long,
allostery_ix_bounds,
allostery_type, allostery_mic,
edge_to_tc);
edge_to_tc, edge_to_enzyme);
vector[N_edge] phosphorylation = get_phosphorylation(kcat_pme, conc_pme,
phos_ix_long,
phos_ix_bounds,
Expand Down Expand Up @@ -616,7 +617,7 @@ functions {
allostery_ix_bounds,
allostery_type,
allostery_mic,
edge_to_tc);
edge_to_tc, edge_to_enzyme);
complex_vector[N_edge] phosphorylation = get_phosphorylation(kcat_pme,
conc_pme,
phos_ix_long,
Expand Down Expand Up @@ -652,7 +653,8 @@ functions {
// one per allostery
array[] int allostery_mic,
// one per allostery
array[] int edge_to_tc // one per edge
array[] int edge_to_tc, // one per edge
array[] int edge_to_enzyme
) {
int N_edge = size(allostery_ix_bounds);
complex_vector[N_edge] out = rep_vector(1, N_edge);
Expand All @@ -678,7 +680,7 @@ functions {
out[f] = 1
/ (1
+ tc_edge
* (free_enzyme_ratio[f] * Q_num / Q_denom) ^ subunits[f]);
* (free_enzyme_ratio[edge_to_enzyme[f]] * Q_num / Q_denom) ^ subunits[edge_to_enzyme[f]]);
}
return out;
}
Expand Down
2 changes: 1 addition & 1 deletion maud/stan/model.stan
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ generated quantities {
dissociation_constant, subunits,
allostery_ix_long,
allostery_ix_bounds, allostery_type,
allostery_mic, edge_to_tc);
allostery_mic, edge_to_tc, edge_to_enzyme);
phosphorylation_train[e] = get_phosphorylation(kcat_pme,
conc_pme_train[e],
phosphorylation_ix_long,
Expand Down
2 changes: 1 addition & 1 deletion maud/stan/out_of_sample_model.stan
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ generated quantities {
dissociation_constant, subunits,
allostery_ix_long, allostery_ix_bounds,
allostery_type, allostery_mic,
edge_to_tc);
edge_to_tc, edge_to_enzyme);
phosphorylation_test[e] = get_phosphorylation(kcat_pme, conc_pme_test[e],
phosphorylation_ix_long,
phosphorylation_ix_bounds,
Expand Down

0 comments on commit b8eb4c6

Please sign in to comment.