Atomic CHMC

Public functions

MarkovWeightedEFMs.CHMC.Atomic.find_atomic_chmc_input_errorsFunction
find_atomic_chmc_input_errors(S::Matrix{<:Real}, v::Vector{<:Real})

Performs a series of checks on stoichiometry matrix S and steady state flux vector v to determine whether they meet the atomic CHMC requirements. Returns an CHMCAtomicErrorSummary structure that can be printed via print(res::CHMCAtomicErrorSummary).

source
find_atomic_chmc_input_errors(S::Matrix{<:Real})

Performs a series of checks on stoichiometry matrix S to determine whether they meet the atomic CHMC requirements for atomic EFM enumeration. Returns an CHMCAtomicErrorSummary structure that can be printed via print(res::CHMCAtomicErrorSummary).

source
MarkovWeightedEFMs.CHMC.Atomic.correct_atomic_chmc_input_errorsFunction
correct_atomic_chmc_input_errors(#
    res::CHMCAtomicErrorSummary,
    S::Matrix{<:Real},
    v::Vector{<:Real},
    mets::Vector{String},
    rxns::Vector{String}
)

Corrects all errors identified by find_atomic_chmc_input_errors except for the steady state flux requirement. Returns a corrected version of each input.

S is the m by n stoichiometry matrix. v is the steady state flux vector of length n. mets is the vector of metabolite names of length m. rxns is the vector of reaction names of length n.

source
correct_atomic_chmc_input_errors(#
    res::CHMCAtomicErrorSummary,
    S::Matrix{<:Real},
    mets::Vector{String},
    rxns::Vector{String}
)

Corrects all errors identified by find_atomic_chmc_input_errors except for the steady state flux requirement. Returns a corrected version of each input.

S is the m by n stoichiometry matrix. mets is the vector of metabolite names of length m. rxns is the vector of reaction names of length n.

source
Base.printMethod
print(res::CHMCAtomicErrorSummary)

Write CHMCAtomicErrorSummary to stdout.

source
MarkovWeightedEFMs.CHMC.Atomic.correct_atomic_chmc_input_smilesFunction
correct_atomic_chmc_input_smiles(#
    S::Matrix{<:Real},
    v::Vector{<:Real},
    mets::Vector{String},
    rxns::Vector{String},
    smiles::Vector{String},
    H::Bool=false
)

Updates the inputs by (1) removing pseudometabolites and (2) reactions whose reaction strings exceed the RXNMapper character limit. Pseudometabolites are defined as either metabolites with no defined chemical structure/SMILES representation, or metabolites whose SMILES strings contain symbols absent from the periodic table (including metabolites with an R-group). Reactions that exceed the RXNMapper character limit are converted into unimolecular sources and sinks to maintain steady state flux. Returns the corrected inputs with a list of removed metabolites/reactions.

S is the m by n stoichiometry matrix.

v is the steady state flux vector of length n.

mets is the vector of metabolite names of length m.

rxns is the vector of reaction names of length n.

smiles is the vector of metabolite smiles matching mets.

H = false will not check for hydrogen conservation in each reaction.

source
correct_atomic_chmc_input_smiles(#
    S::Matrix{<:Real},
    mets::Vector{String},
    rxns::Vector{String},
    smiles::Vector{String},
    H::Bool=false
)

Updates the inputs by (1) removing pseudometabolites and (2) reactions whose reaction strings exceed the RXNMapper character limit. Pseudometabolites are defined as either metabolites with no defined chemical structure/SMILES representation, or metabolites whose SMILES strings contain symbols absent from the periodic table (including metabolites with an R-group). Reactions that exceed the RXNMapper character limit are converted into unimolecular sources and sinks to maintain steady state flux. Returns the corrected inputs with a list of removed metabolites/reactions.

S is the m by n stoichiometry matrix.

mets is the vector of metabolite names of length m.

rxns is the vector of reaction names of length n.

smiles is the vector of metabolite smiles matching mets.

H = false will not check for hydrogen conservation in each reaction.

source
MarkovWeightedEFMs.CHMC.Atomic.exchange_atomic_chmc_input_metabolitesFunction
exchange_atomic_chmc_input_metabolites(#
    S::Matrix{<:Real},
    v::Vector{<:Real},
    mets::Vector{String},
    rxns::Vector{String},
    smiles::Vector{String},
    ii::Vector{Int64}
)

Removes internal metabolites ii from the remaining inputs by converting each metabolite i ∈ ii into a pair of sink and source metabolites. Returns an updated copy of inputs S, v, mets, rxns, and smiles.

S is the m by n stoichiometry matrix.

v is the steady state flux vector of length n.

mets is the vector of metabolite names of length m.

rxns is the vector of reaction names of length n.

smiles is the vector of metabolite smiles matching mets.

ii is the vector of metabolite indices to exchange for pairs of sinks/sources.

source
exchange_atomic_chmc_input_metabolites(#
    S::Matrix{<:Real},
    mets::Vector{String},
    rxns::Vector{String},
    smiles::Vector{String},
    ii::Vector{Int64}
)

Removes internal metabolites ii from the remaining inputs by converting each metabolite i ∈ ii into a pair of sink and source metabolites. Returns an updated copy of inputs S, mets, rxns, and smiles.

S is the m by n stoichiometry matrix.

mets is the vector of metabolite names of length m.

rxns is the vector of reaction names of length n.

smiles is the vector of metabolite smiles matching mets.

ii is the vector of metabolite indices to exchange for pairs of sinks/sources.

source
MarkovWeightedEFMs.CHMC.Atomic.get_max_atomsFunction
get_max_atoms(s::Vector{String}, a::Symbol)

Returns the maximum number of atoms of type a for each SMILES string in s. Returns a vector of all source metabolites in stoichiometry matrix S.

s is the vector of metabolite SMILES strings.

a is a periodic table element symbol.

source
MarkovWeightedEFMs.CHMC.Atomic.map_reaction_stringsFunction
map_reaction_strings(#
    S::Matrix{<:Real},
    smiles::Vector{String},
    rxns::Vector{String},
    H::Bool=false
)

Constructs reaction strings from the smiles and then returns the atom-mapped reaction strings via RXNMapper.

S is the stoichiometry matrix.

smiles is the vector of SMILES strings for metabolites in S.

rxns is the vector of reaction names in S.

H = false will not check for hydrogen conservation in each reaction.

source
MarkovWeightedEFMs.CHMC.Atomic.precompute_atom_tracing_dictionaryFunction
precompute_atom_tracing_dictionary(#
    S::Matrix{Int16},
    ms::Vector{String},
    amax::Vector{Int64},
    a::Symbol
)

Precomputes a dictionary mapping each atom in a given substrate stoichiometric copy to its product atom across every reaction. The dictionary is used in steady_state_efm_distribution.

S is the stoichiometry matrix.

ms is the vector of mapped reaction SMILES strings.

amax is the total number of atom a in each metabolite row of S.

a is a periodic table element symbol.

source
MarkovWeightedEFMs.CHMC.Standard.steady_state_efm_distributionMethod
steady_state_efm_distribution(#
    S::Matrix{<:Integer},
    v::Vector{<:Real},
    ms::Vector{String},
    I::Tuple{Int64,Int64,Symbol},
    D::Dict{#
      NTuple{4,Int64},
      Tuple{Int64,Int64}
    } = Dict{NTuple{4,Int64}, Tuple{Int64,Int64}}();
    solver = nothing,
    verbose::Bool = true
)

Enumerates the atomic EFMs from stoichiometry matrix S and compute the steady state probabilities of each EFM according to the discrete-time, cycle-history Markov chain.

S is a fully-connected, unimolecular, m by n stoichiometry matrix with m metabolites and n reactions.

v is the n-length steady state flux vector associated with S.

ms is the vector of mapped reaction SMILES strings.

I is a triplet of the metabolite row index in S, the atom index, and the atom index type. It is the initial starting state for rooting the cycle-history Markov chain.

D is the precomputed dictionary from precompute_atom_tracing_dictionary.

solver is the type used for eigenvector calculations. Default is nothing and LinearSolve will pick the best solver. Consult LinearSolve.jl for specifying other solvers.

source
MarkovWeightedEFMs.CHMC.Atomic.preprocess_all_for_atomic_chmcFunction
preprocess_all_for_atomic_chmc(#
    S::Matrix{<:Real},
    v::Vector{<:Real},
    mets::Vector{String},
    rxns::Vector{String},
    smiles::Vector{String},
    atom::Symbol
)

Wrapper function to run pre-processing functions and return the updated model, atomic info, and error/warning logs.

S is the m by n stoichiometry matrix. v is the steady state flux vector of length n. mets is the vector of metabolite names of length m. rxns is the vector of reaction names of length n. smiles is the vector of metabolite SMILES strings of length m. a is a periodic table element symbol.

source

Index