sbrt.kernel.fba
Interface Fluxome

All Known Subinterfaces:
CatalyzedFluxome, IrrevRxnFluxome, MixedFluxome
All Known Implementing Classes:
IrrevRxnFluxomeV1, MixedFluxomeV1

public interface Fluxome

This interface is used to represent fluxomes for use in Flux Balance Analysis. A fluxome is a set of biochemical reactions whose rates (i.e. fluxes) may be subject to constraint. A fluxome is composed of

• chemical species
• the chemical reactions in which those chemical species participate
• the constraints on the fluxes of those reactions, and

Two basic types of reactions exist in a fluxome: internal reactions and exchange reactions. Each reaction has a unique identifier, that is, a name. Each reaction also has an associated flux constraint, which is either assigned explicitly or by default.

A flux constraint can be represented as α ≤ V ≤ β, where α and β are the lower and upper flux bounds, respectively, and V is the flux under consideration. For a particular type of fluxome, the allowed flux constraints may have a defined range. That is to say, the allowed values of α and β may differ between fluxomes of different types or even between reactions of different type within the same fluxome. For example, a popular type of fluxome uses the following convention: 0 ≤ α ≤ ∞, α ≤ β ≤ ∞ for internal reactions and -∞ ≤ α ≤ &infin, α ≤ β ≤ ∞ for exchange reactions. This interface provides a way to maintain the integrity of these definitions or conventions using isValid(Interval, String, double).

Author:
This interface was written and documented by Jeremiah Wright while in the Wagner lab.

Method Summary
 int addedConstraints()
          Returns the total number of constraints added to this fluxome.
 boolean areRxnNames(java.util.Collection<java.lang.String> c)
          Indicates if every string in the provided collection is the name of a reaction contained in this fluxome.
 int exchangeRxns()
          Returns the total number of exchange reactions contained in this fluxome.
 FluxConstraints getConstraints()
          Returns the set of all constraints for fluxes and mathematical expressions of fluxes in this fluxome.
 java.util.Set<java.lang.String> getExchangeRxnNames()
          Returns the set of names of all exchange reactions contained in this fluxome.
 java.util.Map<java.lang.String,? extends ExchangeRxn> getExchangeRxns()
          Returns all of the exchange reactions contained in this fluxome.
 Interval getFluxConstraint(java.lang.String reactionName)
          Returns the flux constraint for the reaction with the provided name.
 java.util.Set<java.lang.String> getInternalRxnNames()
          Returns the set of names of all internal chemical reactions contained in this fluxome.
 java.util.Map<java.lang.String,? extends ChemRxn> getInternalRxns()
          Returns the set of all internal chemical reactions contained in this fluxome.
 ChemRxn getRxn(java.lang.String reactionName)
          Returns the chemical reaction in this fluxome with the provided name.
 Interval getRxnExprConstraint(MathExpr<java.lang.String> rxnNameExpr)
          Returns the constraint corresponding to the provided mathematical expression of reaction names.
 java.util.Set<java.lang.String> getRxnNames()
          Returns the set of names of all chemical reactions contained in this fluxome.
 java.util.Map<java.lang.String,ChemRxn> getRxns()
          Returns the set of all chemical reactions contained in this fluxome.
 java.util.Map<java.lang.String,ChemRxn> getRxns(java.util.Collection<java.lang.String> rxnNames)
          Returns the chemical reactions with the provided names.
 java.util.Set<java.lang.String> getSpecies()
          Returns the set of names of all chemical species participating in reactions contained in this fluxome.
 SparseDoubleMatrix<java.lang.String,java.lang.String> getStoichMatrix()
          Returns the stoichiometry matrix of this fluxome.
 int internalRxns()
          Returns the total number of internal reactions contained in this fluxome.
 boolean isExchangeRxnName(java.lang.String s)
          Indicates if the provided string is the name of an exchange reaction contained in this fluxome.
 boolean isFluxVector(java.util.Map<java.lang.String,java.lang.Double> fluxVector, double tolerance)
          Indicates if the provided flux vector lies within the feasible space of this fluxome, given the provided tolerance value.
 boolean isInternalRxnName(java.lang.String s)
          Indicates if the provided string is the name of an internal reaction contained in this fluxome.
 boolean isRxnName(java.lang.String s)
          Indicates if the provided string is the name of a reaction contained in this fluxome.
 boolean isSpecies(java.lang.String s)
          Indicates if the provided string is the name of a chemical species contained in this fluxome.
 boolean isValid(Interval constraint, java.lang.String rxnName, double tolerance)
          Indicates if the provided interval is a valid flux constraint for the reaction with the provided name.
 Fluxome replaceConstraints(FluxConstraints constraints, double constraintTolerance)
          Returns a copy of this fluxome, but with all constraints replaced by those provided.
 int rxns()
          Returns the total number of chemical reactions contained in this fluxome.
 int species()
          Returns the total number of chemical species contained in this fluxome.
 

Method Detail

getRxns

java.util.Map<java.lang.String,ChemRxn> getRxns()
Returns the set of all chemical reactions contained in this fluxome. This set is the union of internal and exchange reactions.

Returns:
reaction names mapped to their corresponding reaction.

getRxns

java.util.Map<java.lang.String,ChemRxn> getRxns(java.util.Collection<java.lang.String> rxnNames)
Returns the chemical reactions with the provided names.

Parameters:
rxnNames - the names of the reactions to be returned.
Returns:
reaction names mapped to their corresponding reaction.

getInternalRxns

java.util.Map<java.lang.String,? extends ChemRxn> getInternalRxns()
Returns the set of all internal chemical reactions contained in this fluxome.

Returns:
reaction names mapped to their corresponding reaction.

getExchangeRxns

java.util.Map<java.lang.String,? extends ExchangeRxn> getExchangeRxns()
Returns all of the exchange reactions contained in this fluxome.

Returns:
reaction names mapped to their corresponding reaction.

getRxn

ChemRxn getRxn(java.lang.String reactionName)
Returns the chemical reaction in this fluxome with the provided name.

Parameters:
reactionName - the name of the chemical reaction to be returned.
Returns:
the chemical reaction in this fluxome with the provided name.

getRxnNames

java.util.Set<java.lang.String> getRxnNames()
Returns the set of names of all chemical reactions contained in this fluxome.

Returns:
the set of names of all chemical reactions contained in this fluxome.

getInternalRxnNames

java.util.Set<java.lang.String> getInternalRxnNames()
Returns the set of names of all internal chemical reactions contained in this fluxome.

Returns:
the set of names of all internal chemical reactions contained in this fluxome.

getExchangeRxnNames

java.util.Set<java.lang.String> getExchangeRxnNames()
Returns the set of names of all exchange reactions contained in this fluxome.

Returns:
the set of names of all exchange reactions contained in this fluxome.

getSpecies

java.util.Set<java.lang.String> getSpecies()
Returns the set of names of all chemical species participating in reactions contained in this fluxome.

Returns:
the set of names of all chemical species participating in reactions contained in this fluxome.

getFluxConstraint

Interval getFluxConstraint(java.lang.String reactionName)
Returns the flux constraint for the reaction with the provided name.

Parameters:
reactionName - the name of the reaction whose flux constraint is to be returned.
Returns:
the flux constraint for the reaction with the provided name.

getRxnExprConstraint

Interval getRxnExprConstraint(MathExpr<java.lang.String> rxnNameExpr)
Returns the constraint corresponding to the provided mathematical expression of reaction names.

Parameters:
rxnNameExpr - the mathematical expression of reaction names whose constraint is to be returned.
Returns:
the constraint corresponding to the provided mathematical expression of reaction names.

getConstraints

FluxConstraints getConstraints()
Returns the set of all constraints for fluxes and mathematical expressions of fluxes in this fluxome.

Returns:
the set of all constraints for fluxes and mathematical expressions of fluxes in this fluxome.

getStoichMatrix

SparseDoubleMatrix<java.lang.String,java.lang.String> getStoichMatrix()
Returns the stoichiometry matrix of this fluxome.

Returns:
the stoichiometry matrix of this fluxome. Row variables in this matrix are the names of chemical species, and column variables are reaction names.

isRxnName

boolean isRxnName(java.lang.String s)
Indicates if the provided string is the name of a reaction contained in this fluxome.

Parameters:
s - the string to test.
Returns:
true if the string is a valid reaction name; false otherwise.

isInternalRxnName

boolean isInternalRxnName(java.lang.String s)
Indicates if the provided string is the name of an internal reaction contained in this fluxome.

Parameters:
s - the string to test.
Returns:
true if the string is a valid internal reaction name; false otherwise.

isExchangeRxnName

boolean isExchangeRxnName(java.lang.String s)
Indicates if the provided string is the name of an exchange reaction contained in this fluxome.

Parameters:
s - the string to test.
Returns:
true if the string is a valid exchange reaction name; false otherwise.

areRxnNames

boolean areRxnNames(java.util.Collection<java.lang.String> c)
Indicates if every string in the provided collection is the name of a reaction contained in this fluxome.

Parameters:
c - a collection of strings.
Returns:
true if every string is a valid reaction name; false otherwise.

isSpecies

boolean isSpecies(java.lang.String s)
Indicates if the provided string is the name of a chemical species contained in this fluxome.

Parameters:
s - the string to test.
Returns:
true if the string is a valid chemical species; false otherwise.

isFluxVector

boolean isFluxVector(java.util.Map<java.lang.String,java.lang.Double> fluxVector,
                     double tolerance)
Indicates if the provided flux vector lies within the feasible space of this fluxome, given the provided tolerance value. The provided flux vector must satisfy both the steady state constraint and all flux constraints.

Parameters:
fluxVector - reaction names mapped to flux values.
tolerance - the amount by which a computed value is allowed to violate a defined constraint. This should be small positive number, like 1E-9 for example.
Returns:
true if the vector satisfies all constraints; false otherwise.

isValid

boolean isValid(Interval constraint,
                java.lang.String rxnName,
                double tolerance)
Indicates if the provided interval is a valid flux constraint for the reaction with the provided name.

Parameters:
constraint - the flux constraint to test.
rxnName - the name of the reaction.
tolerance - the allowed amount by which the provided constraint can violate its maximum defined interval. This maximum defined interval is implementation-dependent.
Returns:
true if the constraint is valid; false otherwise.
Throws:
java.lang.IllegalArgumentException - if the provided reaction name does not exist in this fluxome.

rxns

int rxns()
Returns the total number of chemical reactions contained in this fluxome.

Returns:
the total number of chemical reactions contained in this fluxome.

internalRxns

int internalRxns()
Returns the total number of internal reactions contained in this fluxome.

Returns:
the total number of internal reactions contained in this fluxome.

exchangeRxns

int exchangeRxns()
Returns the total number of exchange reactions contained in this fluxome.

Returns:
the total number of exchange reactions contained in this fluxome.

species

int species()
Returns the total number of chemical species contained in this fluxome.

Returns:
the total number of chemical species contained in this fluxome.

addedConstraints

int addedConstraints()
Returns the total number of constraints added to this fluxome.

Returns:
the total number of constraints added to this fluxome.
See Also:
replaceConstraints(FluxConstraints, double)

replaceConstraints

Fluxome replaceConstraints(FluxConstraints constraints,
                           double constraintTolerance)
Returns a copy of this fluxome, but with all constraints replaced by those provided. If a flux constraint for a particular reaction was not provided, its default value will be used.

Parameters:
constraints - the new set of flux constraints.
constraintTolerance - the allowed amount by which constraints can violate their maximum defined intervals. These maximum defined intervals are implementation-dependent.
Returns:
a copy of this fluxome, but with all constraints replaced by those provided.