Skip to content
Snippets Groups Projects
Unverified Commit 3998673e authored by Miroslav Kratochvil's avatar Miroslav Kratochvil :bicyclist: Committed by St. Elmo
Browse files

obliterate traling whitespace

parent 8dd3d1bc
No related branches found
No related tags found
No related merge requests found
......@@ -131,8 +131,8 @@ flux_dict(model::MetabolicModel, opt_model)::Maybe{Dict{String,Float64}} =
"""
flux_dict(model::GeckoModel, opt_model)
Specialization to format solved data for `GeckoModel`s but maps
the solution back into the namespace of the underlying model (the
Specialization to format solved data for `GeckoModel`s but maps
the solution back into the namespace of the underlying model (the
original ids).
"""
flux_dict(model::GeckoModel, opt_model) =
......@@ -143,8 +143,8 @@ flux_dict(model::GeckoModel, opt_model) =
"""
flux_dict(model::SMomentModel, opt_model)
Specialization to format solved data for `SMomentModel`s but maps
the solution back into the namespace of the underlying model (the
Specialization to format solved data for `SMomentModel`s but maps
the solution back into the namespace of the underlying model (the
original ids).
"""
flux_dict(model::SMomentModel, opt_model) =
......@@ -154,8 +154,8 @@ flux_dict(model::SMomentModel, opt_model) =
"""
_map_irrev_to_rev_ids(reaction_map, protein_ids, solution)
Return dictionaries of reaction ids mapped to fluxes,
and protein ids mapped to concentrations using `reaction_map` to
Return dictionaries of reaction ids mapped to fluxes,
and protein ids mapped to concentrations using `reaction_map` to
determine the ids of fluxes and `protein_ids` for the gene ids.
The solution in `solution` is used to fill the dictionaries.
"""
......
......@@ -317,7 +317,7 @@ end
"""
enzyme_capacity(model::MetabolicModel)
Return enzyme capacity inequality constraint vector and bound, or nothing
Return enzyme capacity inequality constraint vector and bound, or nothing
if it doesn't exist in the model.
"""
function enzyme_capacity(model::MetabolicModel)
......
......@@ -446,7 +446,7 @@ end
"""
has_reaction_isozymes(model::StandardModel, rid::String)
Check if reaction `rid` in `model` is catalyzed by multiple enzymes,
Check if reaction `rid` in `model` is catalyzed by multiple enzymes,
i.e. it has isozymes according to the gene reaction rules.
"""
function has_reaction_isozymes(model::StandardModel, rid::String)
......
"""
mutable struct EnzymeData
mutable struct EnzymeData
Holds data relevant for enzyme constrained metabolic models.
Holds data relevant for enzyme constrained metabolic models.
Reaction turnover numbers (catalytic constants, kcats) are supplied through
`reaction_kcats`, which is a dictionary mapping reaction ids to kcats of each
isozyme. Each isozyme should have both a forward and reverse kcat, so
......@@ -17,17 +17,17 @@ order of each entry in `reaction_kcats` and `reaction_protein_stoichiometry` is
taken to be the same as the order returned when calling
[`reaction_gene_association`](@ref) on the model. The protein masses (in molar
mass units) for each gene in the model should be supplied through
`protein_masses`. The format is a dictionary of gene ids mapped to molar masses.
`protein_masses`. The format is a dictionary of gene ids mapped to molar masses.
Total enzyme capacity (sum of all enzyme concentrations multiplied by their
molar mass) is constrained by `total_protein_mass`, a unitless mass fraction of
enzyme mass to cell dry mass. The reaction fluxes and protein concentrations can
be bounded by `flux_measurements` and `protein_measurements` respectively. Both
lower and upper bounds need to be supplied (as a tuple) if a reaction flux is to
be bounded, likewise with protein concentration bounds.
be bounded, likewise with protein concentration bounds.
# Fields
```
```
reaction_kcats::Dict{String,Vector{Vector{Float64}}} # rid => [[for, rev], ...]
reaction_protein_stoichiometry::Dict{String,Vector{Vector{Float64}}} # rid => [[stoich, stoich,...], ...]
protein_masses::Dict{String,Float64}
......@@ -79,7 +79,7 @@ EnzymeData(
Holds the already constructed GECKO problem.
# Fields
```
```
c::SparseVector{Float64, Int64}
E::SparseMatrixCSC{Float64, Int64}
d::SparseVector{Float64, Int64}
......@@ -136,7 +136,7 @@ will have enzyme bounds associated with them, but all isozymes are assumed to
have data if data is supplied. Currently only `modifications` that change
attributes of the `optimizer` are supported.
To actually run GECKO, call [`flux_balance_analysis`](@ref) on a `GeckoModel`
To actually run GECKO, call [`flux_balance_analysis`](@ref) on a `GeckoModel`
to run an analysis on it.
See also: [`StandardModel`](@ref)
......@@ -165,7 +165,7 @@ end
protein_measurements = Dict{String,Tuple{Float64,Float64}}(),
)
Constructor for `GeckoModel`.
Constructor for `GeckoModel`.
"""
function GeckoModel(
model::MetabolicModel;
......@@ -247,7 +247,7 @@ genes(model::GeckoModel) = model.geckodata.protein_ids
_order_id_to_idx_dict(id_to_idx_dict)
Return the keys of `id_to_idx_dict` sorted by the values, which
are taken to be the indices. This is a helper function for
are taken to be the indices. This is a helper function for
[`reactions`](@ref) and [`metabolites`](@ref).
"""
function _order_id_to_idx_dict(dmap)
......@@ -275,7 +275,7 @@ end
"""
enzyme_capacity(model::GeckoModel)
Return enzyme capacity inequality constraint vector and bound, or nothing
Return enzyme capacity inequality constraint vector and bound, or nothing
if it doesn't exist in the model.
"""
enzyme_capacity(model::GeckoModel) = (model.geckodata.M[end, :], model.geckodata.h[end])
......@@ -287,14 +287,14 @@ Lower level function that updates the matrix form of a model with enzyme
capacity constraints, in GECKO format.
Specifically, updates `model.geckodata` with the vector and matrix coefficients `c,
E, d, M, h` satisfying
E, d, M, h` satisfying
```
opt cᵀ * x
s.t. E * x = d
s.t. E * x = d
M * x ≤ h
```
as well as `reaction_map, metabolite_map, protein_ids`, where
`reaction_map` shows the order of the columns (reactions) in `E`. Proteins
as well as `reaction_map, metabolite_map, protein_ids`, where
`reaction_map` shows the order of the columns (reactions) in `E`. Proteins
are ordered according to `protein_ids`, and follow after reactions.
"""
function build_geckomodel_internals!(model::GeckoModel)
......@@ -487,7 +487,7 @@ end
"""
_build_irreversible_stoichiometric_matrix(model::StandardModel)
Return the stoichiometric matrix. All reactions are forward only i.e. only
Return the stoichiometric matrix. All reactions are forward only i.e. only
positive fluxes are allowed. Include arm reactions.
"""
function _build_irreversible_stoichiometric_matrix(model::StandardModel)
......@@ -508,7 +508,7 @@ function _build_irreversible_stoichiometric_matrix(model::StandardModel)
max_met_idx = [1], #TODO maybe fix, this is a dodgy way of adding a counter to a named tuple
pseudo_met_idx = [1], #TODO maybe fix, this is a dodgy way of adding a counter to a named tuple
)
#TODO for the counter thing, basically I wanted e.g. max_rxn_idx = 1 and then update it,
#TODO for the counter thing, basically I wanted e.g. max_rxn_idx = 1 and then update it,
#TODO but named tuples are immutable... :(
# fill the matrix entries
......
......@@ -4,7 +4,7 @@
Holds the already constructed SMOMENT problem.
# Fields
```
```
c::SparseVector{Float64, Int64}
E::SparseMatrixCSC{Float64, Int64}
d::SparseVector{Float64, Int64}
......@@ -44,14 +44,14 @@ SMomentData() = SMomentData(
Construct an enzyme capacity constrained model see `Bekiaris, Pavlos Stephanos,
and Steffen Klamt. "Automatic construction of metabolic models with enzyme
constraints." BMC bioinformatics, 2020.` for implementation details.
constraints." BMC bioinformatics, 2020.` for implementation details.
Note, `"§"` is reserved for internal use as a delimiter, no reaction id should
contain that character. Also note, SMOMENT assumes that each reaction only has a
single enzyme (one GRR) associated with it. It is required that a model be
modified to ensure that this condition is met. For ease-of-use,
[`remove_slow_isozymes!`](@ref) is supplied to effect this. Currently only
`modifications` that change attributes of the `optimizer` are supported.
`modifications` that change attributes of the `optimizer` are supported.
"""
mutable struct SMomentModel <: MetabolicModel
smodel::StandardModel
......@@ -167,7 +167,7 @@ end
"""
build_smomentmodel_internals!(model::SMomentModel)
Build internal data structures used to solve SMOMENT type flux
Build internal data structures used to solve SMOMENT type flux
balance analysis problems.
"""
function build_smomentmodel_internals!(model::SMomentModel)
......@@ -247,7 +247,7 @@ end
reaction_map,
)
Helper function to return functions describing the inequality
Helper function to return functions describing the inequality
constraints for smoment.
"""
function _smoment_build_inequality_constraints(
......
......@@ -23,7 +23,7 @@ protein_dict(model::GeckoModel, opt_model) =
)
Remove all but the fastest isozyme from each reaction in `model`.
Use the largest kcat (for, rev) for these calculations. Modifies all
Use the largest kcat (for, rev) for these calculations. Modifies all
the arguments in place.
"""
function remove_slow_isozymes!(
......
......@@ -157,8 +157,8 @@ const reaction_standard_gibbs_free_energies = Dict(
const ecoli_core_protein_masses = Dict(
#=
Data downloaded from Uniprot for E. coli K12,
gene mass in kDa. To obtain these data yourself, go to
Data downloaded from Uniprot for E. coli K12,
gene mass in kDa. To obtain these data yourself, go to
Uniprot: https://www.uniprot.org/
and search using these terms: <reviewed:yes AND organism:"Escherichia coli (strain K12) [83333]">
=#
......@@ -302,7 +302,7 @@ const ecoli_core_protein_masses = Dict(
const ecoli_core_protein_stoichiometry = Dict(
#=
Data made up, each isozyme is assumed to be composed of
Data made up, each isozyme is assumed to be composed of
only one subunit each.
=#
"ACALD" => [[1.0], [1.0]],
......@@ -383,9 +383,9 @@ const ecoli_core_protein_stoichiometry = Dict(
const ecoli_core_reaction_kcats = Dict(
#=
Data taken from Heckmann, David, et al. "Machine learning applied to enzyme
turnover numbers reveals protein structural correlates and improves metabolic
models." Nature communications 9.1 (2018): 1-10. Assume forward and reverse
Data taken from Heckmann, David, et al. "Machine learning applied to enzyme
turnover numbers reveals protein structural correlates and improves metabolic
models." Nature communications 9.1 (2018): 1-10. Assume forward and reverse
kcats are the same, and each isozyme has the same kcat.
=#
"ACALD" =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment