diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index e631c1a..fd8a07d 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-08T22:36:14","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-09T22:00:41","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/API/index.html b/dev/API/index.html index 2426280..aae2bf4 100644 --- a/dev/API/index.html +++ b/dev/API/index.html @@ -1,16 +1,16 @@ -API · DataDrivenEnzymeRateEqs.jl

DataDrivenEnzymeRateEqs

API for DataDrivenEnzymeRateEqs.

DataDrivenEnzymeRateEqs.data_driven_rate_equation_selectionMethod
data_driven_rate_equation_selection(
+API · DataDrivenEnzymeRateEqs.jl

DataDrivenEnzymeRateEqs

API for DataDrivenEnzymeRateEqs.

DataDrivenEnzymeRateEqs.data_driven_rate_equation_selectionFunction
data_driven_rate_equation_selection(
     general_rate_equation::Function,
     data::DataFrame,
     metab_names::Tuple{Symbol,Vararg{Symbol}},
     param_names::Tuple{Symbol,Vararg{Symbol}},
     range_number_params::Tuple{Int,Int},
     forward_model_selection::Bool,
-)

This function is used to perform data-driven rate equation selection using a general rate equation and data. The function will select the best rate equation by iteratively removing parameters from the general rate equation and finding an equation that yield best test scores on data not used for fitting.

Arguments

  • general_rate_equation::Function: Function that takes a NamedTuple of metabolite concentrations (with metab_names keys) and parameters (with param_names keys) and returns an enzyme rate.
  • data::DataFrame: DataFrame containing the data with column Rate and columns for each metab_names where each row is one measurement. It also needs to have a column source that contains a string that identifies the source of the data. This is used to calculate the weights for each figure in the publication.
  • metab_names::Tuple: Tuple of metabolite names that correspond to the metabolites of rate_equation and column names in data.
  • param_names::Tuple: Tuple of parameter names that correspond to the parameters of rate_equation.
  • range_number_params::Tuple{Int,Int}: A tuple of integers representing the range of the number of parameters of generalrateequation to search over.
  • forward_model_selection::Bool: A boolean indicating whether to use forward model selection (true) or reverse model selection (false).

Returns nothing, but saves a csv file for each num_params with the results of the training for each combination of parameters tested and a csv file with test results for top 10% of the best results with each number of parameters tested.

source
DataDrivenEnzymeRateEqs.display_rate_equationMethod
display_rate_equation(
+)

This function is used to perform data-driven rate equation selection using a general rate equation and data. The function will select the best rate equation by iteratively removing parameters from the general rate equation and finding an equation that yield best test scores on data not used for fitting.

Arguments

  • general_rate_equation::Function: Function that takes a NamedTuple of metabolite concentrations (with metab_names keys) and parameters (with param_names keys) and returns an enzyme rate.
  • data::DataFrame: DataFrame containing the data with column Rate and columns for each metab_names where each row is one measurement. It also needs to have a column source that contains a string that identifies the source of the data. This is used to calculate the weights for each figure in the publication.
  • metab_names::Tuple: Tuple of metabolite names that correspond to the metabolites of rate_equation and column names in data.
  • param_names::Tuple: Tuple of parameter names that correspond to the parameters of rate_equation.
  • range_number_params::Tuple{Int,Int}: A tuple of integers representing the range of the number of parameters of generalrateequation to search over.
  • forward_model_selection::Bool: A boolean indicating whether to use forward model selection (true) or reverse model selection (false).
  • save_train_results::Bool: A boolean indicating whether to save the results of the training for each number of parameters as a csv file.
  • enzyme_name::String: A string for enzyme name that is used to name the csv files that are saved.

Returns nothing, but saves a csv file for each num_params with the results of the training for each combination of parameters tested and a csv file with test results for top 10% of the best results with each number of parameters tested.

source
DataDrivenEnzymeRateEqs.display_rate_equationMethod
display_rate_equation(
 rate_equation::Function,
 metab_names::Tuple{Symbol,Vararg{Symbol}},
 param_names::Tuple{Symbol,Vararg{Symbol}};
-nt_param_removal_code = nothing

)

Return the symbolic rate equation for the given rate_equation function.

Arguments

  • rate_equation::Function: The rate equation function.
  • metab_names::Tuple{Symbol,Vararg{Symbol}}: The names of the metabolites.
  • param_names::Tuple{Symbol,Vararg{Symbol}}: The names of the parameters.
  • nt_param_removal_code::NamedTuple: The named tuple of the parameters to remove from the rate equation.
source
DataDrivenEnzymeRateEqs.fit_rate_equationMethod
fit_rate_equation(
+nt_param_removal_code = nothing

)

Return the symbolic rate equation for the given rate_equation function.

Arguments

  • rate_equation::Function: The rate equation function.
  • metab_names::Tuple{Symbol,Vararg{Symbol}}: The names of the metabolites.
  • param_names::Tuple{Symbol,Vararg{Symbol}}: The names of the parameters.
  • nt_param_removal_code::NamedTuple: The named tuple of the parameters to remove from the rate equation.
source
DataDrivenEnzymeRateEqs.fit_rate_equationMethod
fit_rate_equation(
     rate_equation::Function,
     data::DataFrame,
     metab_names::Tuple{Symbol, Vararg{Symbol}},
@@ -22,4 +22,4 @@
     source = ["Figure 1", "Figure 1", "Figure 2"]
 )
 rate_equation(metabs, params) = params.Vmax * metabs.S / (1 + metabs.S / params.K_S)
-fit_rate_equation(rate_equation, data, (:A,), (:Vmax, :K_S))
source
DataDrivenEnzymeRateEqs.@derive_general_mwc_rate_eqMacro
derive_general_mwc_rate_eq(metabs_and_regulators_kwargs...)

Derive a function that calculates the rate of a reaction using the general MWC rate equation given the list of substrates, products, and regulators that bind to specific cat or reg sites.

The general MWC rate equation is given by:

\[Rate = \frac{{V_{max}^a \prod_{i=1}^{n} \left(\frac{S_i}{K_{a, i}}\right) - V_{max, rev}^a \prod_{i=1}^{n} \left(\frac{P_i}{K_{a, i}}\right) \cdot Z_{a, cat}^{n-1} \cdot Z_{a, reg}^n + L \left(V_{max}^i \prod_{i=1}^{n} \left(\frac{S_i}{K_{i, i}}\right) - V_{max, rev}^i \prod_{i=1}^{n} \left(\frac{P_i}{K_{i, i}}\right)\right) \cdot Z_{i, cat}^{n-1} \cdot Z_{i, reg}^n}}{Z_{a, cat}^n \cdot Z_{a, reg}^n + L \cdot Z_{i, cat}^n \cdot Z_{i, reg}^n}\]

where:

  • $V_{max}^a$ is the maximum rate of the forward reaction
  • $V_{max, rev}^a$ is the maximum rate of the reverse reaction
  • $V_{max}^i$ is the maximum rate of the forward reaction
  • $V_{max, rev}^i$ is the maximum rate of the reverse reaction
  • $S_i$ is the concentration of the $i^{th}$ substrate
  • $P_i$ is the concentration of the $i^{th}$ product
  • $K_{a, i}$ is the Michaelis constant for the $i^{th}$ substrate
  • $K_{i, i}$ is the Michaelis constant for the $i^{th}$ product
  • $Z_{a, cat}$ is the allosteric factor for the catalytic site
  • $Z_{i, cat}$ is the allosteric factor for the catalytic site
  • $Z_{a, reg}$ is the allosteric factor for the regulatory site
  • $Z_{i, reg}$ is the allosteric factor for the regulatory site
  • $L$ is the ratio of inactive to active enzyme conformations in the absence of ligands
  • $n$ is the oligomeric state of the enzyme

Arguments

  • metabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.

Returns

  • A function that calculates the rate of the reaction using the general MWC rate equation
  • A tuple of the names of the metabolites and parameters used in the rate equation
source
DataDrivenEnzymeRateEqs.@derive_general_qssa_rate_eqMacro
derive_general_qssa_rate_eq(metabs_and_regulators_kwargs...)

Derive a function that calculates the rate of a reaction using the Quasi Steady State Approximation (QSSA) given the list of substrates, products, and regulators.

The general QSSA rate equation is given by:

\[Rate = \frac{V_{max} \left(\frac{\prod_{i=1}^{n}S_i}{(K_{S1...Sn})^n}\right) - V_{max, rev} \left(\frac{\prod_{i=1}^{n}P_i}{(K_{P1...Pn})^n}\right)}{Z}\]

where:

  • $V_{max}$ is the maximum rate of the forward reaction
  • $V_{max, rev}$ is the maximum rate of the reverse reaction
  • $S_i$, $P_i$, $R_i$ is the concentration of the $i^{th}$ substrate (S), product (P), or regulator (R)
  • $K_{X_1...X_n}$ is the kinetic constant
  • $Z$ is a combination of all terms containing products of [S], [P], and [R] divided by KSP_R

Arguments

  • metabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.

Returns

  • A function that calculates the rate of the reaction using the general qssa rate equation
  • A tuple of the names of the metabolites and parameters used in the rate equation
source
+fit_rate_equation(rate_equation, data, (:A,), (:Vmax, :K_S))
source
DataDrivenEnzymeRateEqs.@derive_general_mwc_rate_eqMacro
derive_general_mwc_rate_eq(metabs_and_regulators_kwargs...)

Derive a function that calculates the rate of a reaction using the general MWC rate equation given the list of substrates, products, and regulators that bind to specific cat or reg sites.

The general MWC rate equation is given by:

\[Rate = \frac{{V_{max}^a \prod_{i=1}^{n} \left(\frac{S_i}{K_{a, i}}\right) - V_{max, rev}^a \prod_{i=1}^{n} \left(\frac{P_i}{K_{a, i}}\right) \cdot Z_{a, cat}^{n-1} \cdot Z_{a, reg}^n + L \left(V_{max}^i \prod_{i=1}^{n} \left(\frac{S_i}{K_{i, i}}\right) - V_{max, rev}^i \prod_{i=1}^{n} \left(\frac{P_i}{K_{i, i}}\right)\right) \cdot Z_{i, cat}^{n-1} \cdot Z_{i, reg}^n}}{Z_{a, cat}^n \cdot Z_{a, reg}^n + L \cdot Z_{i, cat}^n \cdot Z_{i, reg}^n}\]

where:

  • $V_{max}^a$ is the maximum rate of the forward reaction
  • $V_{max, rev}^a$ is the maximum rate of the reverse reaction
  • $V_{max}^i$ is the maximum rate of the forward reaction
  • $V_{max, rev}^i$ is the maximum rate of the reverse reaction
  • $S_i$ is the concentration of the $i^{th}$ substrate
  • $P_i$ is the concentration of the $i^{th}$ product
  • $K_{a, i}$ is the Michaelis constant for the $i^{th}$ substrate
  • $K_{i, i}$ is the Michaelis constant for the $i^{th}$ product
  • $Z_{a, cat}$ is the allosteric factor for the catalytic site
  • $Z_{i, cat}$ is the allosteric factor for the catalytic site
  • $Z_{a, reg}$ is the allosteric factor for the regulatory site
  • $Z_{i, reg}$ is the allosteric factor for the regulatory site
  • $L$ is the ratio of inactive to active enzyme conformations in the absence of ligands
  • $n$ is the oligomeric state of the enzyme

Arguments

  • metabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.

Returns

  • A function that calculates the rate of the reaction using the general MWC rate equation
  • A tuple of the names of the metabolites and parameters used in the rate equation
source
DataDrivenEnzymeRateEqs.@derive_general_qssa_rate_eqMacro
derive_general_qssa_rate_eq(metabs_and_regulators_kwargs...)

Derive a function that calculates the rate of a reaction using the Quasi Steady State Approximation (QSSA) given the list of substrates, products, and regulators.

The general QSSA rate equation is given by:

\[Rate = \frac{V_{max} \left(\frac{\prod_{i=1}^{n}S_i}{(K_{S1...Sn})^n}\right) - V_{max, rev} \left(\frac{\prod_{i=1}^{n}P_i}{(K_{P1...Pn})^n}\right)}{Z}\]

where:

  • $V_{max}$ is the maximum rate of the forward reaction
  • $V_{max, rev}$ is the maximum rate of the reverse reaction
  • $S_i$, $P_i$, $R_i$ is the concentration of the $i^{th}$ substrate (S), product (P), or regulator (R)
  • $K_{X_1...X_n}$ is the kinetic constant
  • $Z$ is a combination of all terms containing products of [S], [P], and [R] divided by KSP_R

Arguments

  • metabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.

Returns

  • A function that calculates the rate of the reaction using the general qssa rate equation
  • A tuple of the names of the metabolites and parameters used in the rate equation
source
diff --git a/dev/Tutorial/index.html b/dev/Tutorial/index.html index 0641c04..d5db754 100644 --- a/dev/Tutorial/index.html +++ b/dev/Tutorial/index.html @@ -1,2 +1,2 @@ -Tutorial · DataDrivenEnzymeRateEqs.jl
+Tutorial · DataDrivenEnzymeRateEqs.jl
diff --git a/dev/index.html b/dev/index.html index 34343d5..b52ceca 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · DataDrivenEnzymeRateEqs.jl
+Home · DataDrivenEnzymeRateEqs.jl
diff --git a/dev/objects.inv b/dev/objects.inv index 1ce0089..82dab76 100644 Binary files a/dev/objects.inv and b/dev/objects.inv differ diff --git a/dev/search_index.js b/dev/search_index.js index b30b575..15ab028 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"CurrentModule = DataDrivenEnzymeRateEqs","category":"page"},{"location":"Tutorial/#Tutorials-for-DataDrivenEnzymeRateEqs","page":"Tutorial","title":"Tutorials for DataDrivenEnzymeRateEqs","text":"","category":"section"},{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"This page contains several tutorials describing how to use DataDrivenEnzymeRateEqs.jl ","category":"page"},{"location":"Tutorial/#Fit-user-provided-rate-equation-to-user-provided-data","page":"Tutorial","title":"Fit user provided rate equation to user provided data","text":"","category":"section"},{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"Work in progress... ","category":"page"},{"location":"Tutorial/#Identify-Rate-Equation","page":"Tutorial","title":"Identify Rate Equation","text":"","category":"section"},{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"Work in progress... ","category":"page"},{"location":"","page":"Home","title":"Home","text":"CurrentModule = DataDrivenEnzymeRateEqs","category":"page"},{"location":"#DataDrivenEnzymeRateEqs","page":"Home","title":"DataDrivenEnzymeRateEqs","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Documentation for DataDrivenEnzymeRateEqs.","category":"page"},{"location":"","page":"Home","title":"Home","text":"This page provides an overview of DataDrivenEnzymeRateEqs.jl package. ","category":"page"},{"location":"","page":"Home","title":"Home","text":"Work in progress... ","category":"page"},{"location":"API/","page":"API","title":"API","text":"CurrentModule = DataDrivenEnzymeRateEqs","category":"page"},{"location":"API/#DataDrivenEnzymeRateEqs","page":"API","title":"DataDrivenEnzymeRateEqs","text":"","category":"section"},{"location":"API/","page":"API","title":"API","text":"API for DataDrivenEnzymeRateEqs.","category":"page"},{"location":"API/","page":"API","title":"API","text":"","category":"page"},{"location":"API/","page":"API","title":"API","text":"Modules = [DataDrivenEnzymeRateEqs]\nPrivate = false","category":"page"},{"location":"API/#DataDrivenEnzymeRateEqs.data_driven_rate_equation_selection-Tuple{Function, DataFrames.DataFrame, Tuple{Symbol, Vararg{Symbol}}, Tuple{Symbol, Vararg{Symbol}}, Tuple{Int64, Int64}, Bool}","page":"API","title":"DataDrivenEnzymeRateEqs.data_driven_rate_equation_selection","text":"data_driven_rate_equation_selection(\n general_rate_equation::Function,\n data::DataFrame,\n metab_names::Tuple{Symbol,Vararg{Symbol}},\n param_names::Tuple{Symbol,Vararg{Symbol}},\n range_number_params::Tuple{Int,Int},\n forward_model_selection::Bool,\n)\n\nThis function is used to perform data-driven rate equation selection using a general rate equation and data. The function will select the best rate equation by iteratively removing parameters from the general rate equation and finding an equation that yield best test scores on data not used for fitting.\n\nArguments\n\ngeneral_rate_equation::Function: Function that takes a NamedTuple of metabolite concentrations (with metab_names keys) and parameters (with param_names keys) and returns an enzyme rate.\ndata::DataFrame: DataFrame containing the data with column Rate and columns for each metab_names where each row is one measurement. It also needs to have a column source that contains a string that identifies the source of the data. This is used to calculate the weights for each figure in the publication.\nmetab_names::Tuple: Tuple of metabolite names that correspond to the metabolites of rate_equation and column names in data.\nparam_names::Tuple: Tuple of parameter names that correspond to the parameters of rate_equation.\nrange_number_params::Tuple{Int,Int}: A tuple of integers representing the range of the number of parameters of generalrateequation to search over.\nforward_model_selection::Bool: A boolean indicating whether to use forward model selection (true) or reverse model selection (false).\n\nReturns nothing, but saves a csv file for each num_params with the results of the training for each combination of parameters tested and a csv file with test results for top 10% of the best results with each number of parameters tested.\n\n\n\n\n\n","category":"method"},{"location":"API/#DataDrivenEnzymeRateEqs.display_rate_equation-Tuple{Function, Tuple{Symbol, Vararg{Symbol}}, Tuple{Symbol, Vararg{Symbol}}}","page":"API","title":"DataDrivenEnzymeRateEqs.display_rate_equation","text":"display_rate_equation(\nrate_equation::Function,\nmetab_names::Tuple{Symbol,Vararg{Symbol}},\nparam_names::Tuple{Symbol,Vararg{Symbol}};\nnt_param_removal_code = nothing\n\n)\n\nReturn the symbolic rate equation for the given rate_equation function.\n\nArguments\n\nrate_equation::Function: The rate equation function.\nmetab_names::Tuple{Symbol,Vararg{Symbol}}: The names of the metabolites.\nparam_names::Tuple{Symbol,Vararg{Symbol}}: The names of the parameters.\nnt_param_removal_code::NamedTuple: The named tuple of the parameters to remove from the rate equation.\n\n\n\n\n\n","category":"method"},{"location":"API/#DataDrivenEnzymeRateEqs.fit_rate_equation-Tuple{Function, DataFrames.DataFrame, Tuple{Symbol, Vararg{Symbol}}, Tuple{Symbol, Vararg{Symbol}}}","page":"API","title":"DataDrivenEnzymeRateEqs.fit_rate_equation","text":"fit_rate_equation(\n rate_equation::Function,\n data::DataFrame,\n metab_names::Tuple{Symbol, Vararg{Symbol}},\n param_names::Tuple{Symbol, Vararg{Symbol}};\n n_iter = 20\n\n)\n\nFit rate_equation to data and return loss and best fit parameters.\n\nArguments\n\nrate_equation::Function: Function that takes a NamedTuple of metabolite concentrations (with metab_names keys) and parameters (with param_names keys) and returns an enzyme rate.\ndata::DataFrame: DataFrame containing the data with column Rate and columns for each metab_names where each row is one measurement. It also needs to have a column source that contains a string that identifies the source of the data. This is used to calculate the weights for each figure in the publication.\nmetab_names::Tuple{Symbol, Vararg{Symbol}}: Tuple of metabolite names that correspond to the metabolites of rate_equation and column names in data.\nparam_names::Tuple{Symbol, Vararg{Symbol}}: Tuple of parameter names that correspond to the parameters of rate_equation.\nn_iter::Int: Number of iterations to run the fitting process.\n\nReturns\n\nloss::Float64: Loss of the best fit.\nparams::NamedTuple: Best fit parameters with param_names keys\n\nExample\n\nusing DataFrames\ndata = DataFrame(\n Rate = [1.0, 2.0, 3.0],\n A = [1.0, 2.0, 3.0],\n source = [\"Figure 1\", \"Figure 1\", \"Figure 2\"]\n)\nrate_equation(metabs, params) = params.Vmax * metabs.S / (1 + metabs.S / params.K_S)\nfit_rate_equation(rate_equation, data, (:A,), (:Vmax, :K_S))\n\n\n\n\n\n","category":"method"},{"location":"API/#DataDrivenEnzymeRateEqs.@derive_general_mwc_rate_eq-Tuple{Any}","page":"API","title":"DataDrivenEnzymeRateEqs.@derive_general_mwc_rate_eq","text":"derive_general_mwc_rate_eq(metabs_and_regulators_kwargs...)\n\nDerive a function that calculates the rate of a reaction using the general MWC rate equation given the list of substrates, products, and regulators that bind to specific cat or reg sites.\n\nThe general MWC rate equation is given by:\n\nRate = fracV_max^a prod_i=1^n left(fracS_iK_a iright) - V_max rev^a prod_i=1^n left(fracP_iK_a iright) cdot Z_a cat^n-1 cdot Z_a reg^n + L left(V_max^i prod_i=1^n left(fracS_iK_i iright) - V_max rev^i prod_i=1^n left(fracP_iK_i iright)right) cdot Z_i cat^n-1 cdot Z_i reg^nZ_a cat^n cdot Z_a reg^n + L cdot Z_i cat^n cdot Z_i reg^n\n\nwhere:\n\nV_max^a is the maximum rate of the forward reaction\nV_max rev^a is the maximum rate of the reverse reaction\nV_max^i is the maximum rate of the forward reaction\nV_max rev^i is the maximum rate of the reverse reaction\nS_i is the concentration of the i^th substrate\nP_i is the concentration of the i^th product\nK_a i is the Michaelis constant for the i^th substrate\nK_i i is the Michaelis constant for the i^th product\nZ_a cat is the allosteric factor for the catalytic site\nZ_i cat is the allosteric factor for the catalytic site\nZ_a reg is the allosteric factor for the regulatory site\nZ_i reg is the allosteric factor for the regulatory site\nL is the ratio of inactive to active enzyme conformations in the absence of ligands\nn is the oligomeric state of the enzyme\n\nArguments\n\nmetabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.\n\nReturns\n\nA function that calculates the rate of the reaction using the general MWC rate equation\nA tuple of the names of the metabolites and parameters used in the rate equation\n\n\n\n\n\n","category":"macro"},{"location":"API/#DataDrivenEnzymeRateEqs.@derive_general_qssa_rate_eq-Tuple{Any}","page":"API","title":"DataDrivenEnzymeRateEqs.@derive_general_qssa_rate_eq","text":"derive_general_qssa_rate_eq(metabs_and_regulators_kwargs...)\n\nDerive a function that calculates the rate of a reaction using the Quasi Steady State Approximation (QSSA) given the list of substrates, products, and regulators.\n\nThe general QSSA rate equation is given by:\n\nRate = fracV_max left(fracprod_i=1^nS_i(K_S1Sn)^nright) - V_max rev left(fracprod_i=1^nP_i(K_P1Pn)^nright)Z\n\nwhere:\n\nV_max is the maximum rate of the forward reaction\nV_max rev is the maximum rate of the reverse reaction\nS_i, P_i, R_i is the concentration of the i^th substrate (S), product (P), or regulator (R)\nK_X_1X_n is the kinetic constant\nZ is a combination of all terms containing products of [S], [P], and [R] divided by KSP_R\n\nArguments\n\nmetabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.\n\nReturns\n\nA function that calculates the rate of the reaction using the general qssa rate equation\nA tuple of the names of the metabolites and parameters used in the rate equation\n\n\n\n\n\n","category":"macro"}] +[{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"CurrentModule = DataDrivenEnzymeRateEqs","category":"page"},{"location":"Tutorial/#Tutorials-for-DataDrivenEnzymeRateEqs","page":"Tutorial","title":"Tutorials for DataDrivenEnzymeRateEqs","text":"","category":"section"},{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"This page contains several tutorials describing how to use DataDrivenEnzymeRateEqs.jl ","category":"page"},{"location":"Tutorial/#Fit-user-provided-rate-equation-to-user-provided-data","page":"Tutorial","title":"Fit user provided rate equation to user provided data","text":"","category":"section"},{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"Work in progress... ","category":"page"},{"location":"Tutorial/#Identify-Rate-Equation","page":"Tutorial","title":"Identify Rate Equation","text":"","category":"section"},{"location":"Tutorial/","page":"Tutorial","title":"Tutorial","text":"Work in progress... ","category":"page"},{"location":"","page":"Home","title":"Home","text":"CurrentModule = DataDrivenEnzymeRateEqs","category":"page"},{"location":"#DataDrivenEnzymeRateEqs","page":"Home","title":"DataDrivenEnzymeRateEqs","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Documentation for DataDrivenEnzymeRateEqs.","category":"page"},{"location":"","page":"Home","title":"Home","text":"This page provides an overview of DataDrivenEnzymeRateEqs.jl package. ","category":"page"},{"location":"","page":"Home","title":"Home","text":"Work in progress... ","category":"page"},{"location":"API/","page":"API","title":"API","text":"CurrentModule = DataDrivenEnzymeRateEqs","category":"page"},{"location":"API/#DataDrivenEnzymeRateEqs","page":"API","title":"DataDrivenEnzymeRateEqs","text":"","category":"section"},{"location":"API/","page":"API","title":"API","text":"API for DataDrivenEnzymeRateEqs.","category":"page"},{"location":"API/","page":"API","title":"API","text":"","category":"page"},{"location":"API/","page":"API","title":"API","text":"Modules = [DataDrivenEnzymeRateEqs]\nPrivate = false","category":"page"},{"location":"API/#DataDrivenEnzymeRateEqs.data_driven_rate_equation_selection","page":"API","title":"DataDrivenEnzymeRateEqs.data_driven_rate_equation_selection","text":"data_driven_rate_equation_selection(\n general_rate_equation::Function,\n data::DataFrame,\n metab_names::Tuple{Symbol,Vararg{Symbol}},\n param_names::Tuple{Symbol,Vararg{Symbol}},\n range_number_params::Tuple{Int,Int},\n forward_model_selection::Bool,\n)\n\nThis function is used to perform data-driven rate equation selection using a general rate equation and data. The function will select the best rate equation by iteratively removing parameters from the general rate equation and finding an equation that yield best test scores on data not used for fitting.\n\nArguments\n\ngeneral_rate_equation::Function: Function that takes a NamedTuple of metabolite concentrations (with metab_names keys) and parameters (with param_names keys) and returns an enzyme rate.\ndata::DataFrame: DataFrame containing the data with column Rate and columns for each metab_names where each row is one measurement. It also needs to have a column source that contains a string that identifies the source of the data. This is used to calculate the weights for each figure in the publication.\nmetab_names::Tuple: Tuple of metabolite names that correspond to the metabolites of rate_equation and column names in data.\nparam_names::Tuple: Tuple of parameter names that correspond to the parameters of rate_equation.\nrange_number_params::Tuple{Int,Int}: A tuple of integers representing the range of the number of parameters of generalrateequation to search over.\nforward_model_selection::Bool: A boolean indicating whether to use forward model selection (true) or reverse model selection (false).\nsave_train_results::Bool: A boolean indicating whether to save the results of the training for each number of parameters as a csv file.\nenzyme_name::String: A string for enzyme name that is used to name the csv files that are saved.\n\nReturns nothing, but saves a csv file for each num_params with the results of the training for each combination of parameters tested and a csv file with test results for top 10% of the best results with each number of parameters tested.\n\n\n\n\n\n","category":"function"},{"location":"API/#DataDrivenEnzymeRateEqs.display_rate_equation-Tuple{Function, Tuple{Symbol, Vararg{Symbol}}, Tuple{Symbol, Vararg{Symbol}}}","page":"API","title":"DataDrivenEnzymeRateEqs.display_rate_equation","text":"display_rate_equation(\nrate_equation::Function,\nmetab_names::Tuple{Symbol,Vararg{Symbol}},\nparam_names::Tuple{Symbol,Vararg{Symbol}};\nnt_param_removal_code = nothing\n\n)\n\nReturn the symbolic rate equation for the given rate_equation function.\n\nArguments\n\nrate_equation::Function: The rate equation function.\nmetab_names::Tuple{Symbol,Vararg{Symbol}}: The names of the metabolites.\nparam_names::Tuple{Symbol,Vararg{Symbol}}: The names of the parameters.\nnt_param_removal_code::NamedTuple: The named tuple of the parameters to remove from the rate equation.\n\n\n\n\n\n","category":"method"},{"location":"API/#DataDrivenEnzymeRateEqs.fit_rate_equation-Tuple{Function, DataFrames.DataFrame, Tuple{Symbol, Vararg{Symbol}}, Tuple{Symbol, Vararg{Symbol}}}","page":"API","title":"DataDrivenEnzymeRateEqs.fit_rate_equation","text":"fit_rate_equation(\n rate_equation::Function,\n data::DataFrame,\n metab_names::Tuple{Symbol, Vararg{Symbol}},\n param_names::Tuple{Symbol, Vararg{Symbol}};\n n_iter = 20\n\n)\n\nFit rate_equation to data and return loss and best fit parameters.\n\nArguments\n\nrate_equation::Function: Function that takes a NamedTuple of metabolite concentrations (with metab_names keys) and parameters (with param_names keys) and returns an enzyme rate.\ndata::DataFrame: DataFrame containing the data with column Rate and columns for each metab_names where each row is one measurement. It also needs to have a column source that contains a string that identifies the source of the data. This is used to calculate the weights for each figure in the publication.\nmetab_names::Tuple{Symbol, Vararg{Symbol}}: Tuple of metabolite names that correspond to the metabolites of rate_equation and column names in data.\nparam_names::Tuple{Symbol, Vararg{Symbol}}: Tuple of parameter names that correspond to the parameters of rate_equation.\nn_iter::Int: Number of iterations to run the fitting process.\n\nReturns\n\nloss::Float64: Loss of the best fit.\nparams::NamedTuple: Best fit parameters with param_names keys\n\nExample\n\nusing DataFrames\ndata = DataFrame(\n Rate = [1.0, 2.0, 3.0],\n A = [1.0, 2.0, 3.0],\n source = [\"Figure 1\", \"Figure 1\", \"Figure 2\"]\n)\nrate_equation(metabs, params) = params.Vmax * metabs.S / (1 + metabs.S / params.K_S)\nfit_rate_equation(rate_equation, data, (:A,), (:Vmax, :K_S))\n\n\n\n\n\n","category":"method"},{"location":"API/#DataDrivenEnzymeRateEqs.@derive_general_mwc_rate_eq-Tuple{Any}","page":"API","title":"DataDrivenEnzymeRateEqs.@derive_general_mwc_rate_eq","text":"derive_general_mwc_rate_eq(metabs_and_regulators_kwargs...)\n\nDerive a function that calculates the rate of a reaction using the general MWC rate equation given the list of substrates, products, and regulators that bind to specific cat or reg sites.\n\nThe general MWC rate equation is given by:\n\nRate = fracV_max^a prod_i=1^n left(fracS_iK_a iright) - V_max rev^a prod_i=1^n left(fracP_iK_a iright) cdot Z_a cat^n-1 cdot Z_a reg^n + L left(V_max^i prod_i=1^n left(fracS_iK_i iright) - V_max rev^i prod_i=1^n left(fracP_iK_i iright)right) cdot Z_i cat^n-1 cdot Z_i reg^nZ_a cat^n cdot Z_a reg^n + L cdot Z_i cat^n cdot Z_i reg^n\n\nwhere:\n\nV_max^a is the maximum rate of the forward reaction\nV_max rev^a is the maximum rate of the reverse reaction\nV_max^i is the maximum rate of the forward reaction\nV_max rev^i is the maximum rate of the reverse reaction\nS_i is the concentration of the i^th substrate\nP_i is the concentration of the i^th product\nK_a i is the Michaelis constant for the i^th substrate\nK_i i is the Michaelis constant for the i^th product\nZ_a cat is the allosteric factor for the catalytic site\nZ_i cat is the allosteric factor for the catalytic site\nZ_a reg is the allosteric factor for the regulatory site\nZ_i reg is the allosteric factor for the regulatory site\nL is the ratio of inactive to active enzyme conformations in the absence of ligands\nn is the oligomeric state of the enzyme\n\nArguments\n\nmetabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.\n\nReturns\n\nA function that calculates the rate of the reaction using the general MWC rate equation\nA tuple of the names of the metabolites and parameters used in the rate equation\n\n\n\n\n\n","category":"macro"},{"location":"API/#DataDrivenEnzymeRateEqs.@derive_general_qssa_rate_eq-Tuple{Any}","page":"API","title":"DataDrivenEnzymeRateEqs.@derive_general_qssa_rate_eq","text":"derive_general_qssa_rate_eq(metabs_and_regulators_kwargs...)\n\nDerive a function that calculates the rate of a reaction using the Quasi Steady State Approximation (QSSA) given the list of substrates, products, and regulators.\n\nThe general QSSA rate equation is given by:\n\nRate = fracV_max left(fracprod_i=1^nS_i(K_S1Sn)^nright) - V_max rev left(fracprod_i=1^nP_i(K_P1Pn)^nright)Z\n\nwhere:\n\nV_max is the maximum rate of the forward reaction\nV_max rev is the maximum rate of the reverse reaction\nS_i, P_i, R_i is the concentration of the i^th substrate (S), product (P), or regulator (R)\nK_X_1X_n is the kinetic constant\nZ is a combination of all terms containing products of [S], [P], and [R] divided by KSP_R\n\nArguments\n\nmetabs_and_regulators_kwargs...: keyword arguments that specify the substrates, products, catalytic sites, regulatory sites, and other parameters of the reaction.\n\nReturns\n\nA function that calculates the rate of the reaction using the general qssa rate equation\nA tuple of the names of the metabolites and parameters used in the rate equation\n\n\n\n\n\n","category":"macro"}] }