|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.fba.MixedFluxomeV1
public final class MixedFluxomeV1
This class is a concrete implementation of MixedFluxome
.
All internal reactions must be of the types IrrevRxn and
RevRxn, and all exchange reactions must be of the types
SourceRxn, SinkRxn, and RevExchRxn.
Instances of this class are immutable.
Field Summary | |
---|---|
static Interval |
IRREV
The constraint used by default for irreversible internal reactions and sink reactions: [0, Infinity). |
static Interval |
OFF
The constraint used by default for source reactions and reversible exchange reactions: [0, 0]. |
static Interval |
REV
The constraint used by default for reversible internal reactions: (-Infinity, Infinity). |
Constructor Summary | |
---|---|
MixedFluxomeV1(java.util.Map<java.lang.String,? extends ChemRxn> rxns)
Constructs a new mixed fluxome from the provided internal and exchange reactions. |
|
MixedFluxomeV1(java.util.Map<java.lang.String,? extends ChemRxn> rxns,
java.util.Map<java.lang.String,Or<And<java.lang.String>>> catalysts)
Constructs a new mixed fluxome from the provided internal and exchange reactions and catalysts. |
Method Summary | |
---|---|
int |
addedConstraints()
Returns the total number of constraints added to this fluxome. |
boolean |
areReqCatalysts(java.util.Collection<java.lang.String> catalysts,
java.lang.String rxnName)
Indicates if the reaction with the provided name could function if each of the catalysts in the provided collection were simultaneously absent. |
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 |
catalysts()
Returns the total number of catalysts contained in this fluxome. |
void |
checkCatalyst(java.lang.String catalyst)
Ensures the provided string is a valid catalyst. |
void |
checkRxnName(java.lang.String reactionName)
Ensures the provided string is a valid reaction name. |
void |
checkRxnNames(java.util.Collection<java.lang.String> rxnNames)
Ensures each element of the provided collection is a valid reaction name. |
int |
exchangeRxns()
Returns the total number of exchange reactions contained in this fluxome. |
Or<And<java.lang.String>> |
getCatalystRule(java.lang.String rxnName)
Returns the boolean logic statement for the catalysts of the reaction with the provided name. |
java.util.Map<java.lang.String,Or<And<java.lang.String>>> |
getCatalystRules()
Returns all of the boolean logic statements regarding reaction catalysis. |
java.util.Set<java.lang.String> |
getCatalysts()
Returns the set of names of all catalysts contained in this fluxome. |
java.util.Set<java.lang.String> |
getCatalyzedRxnNames(java.lang.String catalyst)
Returns the names of the reactions catalyzed by the provided catalyst. |
java.util.Map<java.lang.String,ChemRxn> |
getCatalyzedRxns(java.lang.String catalyst)
Returns all of the internal reactions contained in this fluxome that are catalyzed by the provided catalyst. |
FluxConstraints |
getConstraints()
Returns all constraints in this fluxome. |
ExchangeRxn |
getExchangeRxn(java.lang.String reactionName)
Returns the exchange reaction in this fluxome with the provided name. |
java.util.Set<java.lang.String> |
getExchangeRxnNames()
Returns the set of names of all exchange reactions in this fluxome. |
java.util.Map<java.lang.String,ExchangeRxn> |
getExchangeRxns()
Returns all of the exchange reactions contained in this fluxome. |
java.util.Map<java.lang.String,ExchangeRxn> |
getExchangeRxns(java.util.Collection<java.lang.String> rxnNames)
Returns the exchange reactions with the provided names. |
Interval |
getFluxConstraint(java.lang.String reactionName)
Returns the flux constraint for the provided reaction. |
java.util.Map<java.lang.String,Interval> |
getFluxConstraints()
Returns the constraints on each flux in this fluxome. |
ChemRxn |
getInternalRxn(java.lang.String reactionName)
Returns the internal reaction in this fluxome with the provided name. |
java.util.Set<java.lang.String> |
getInternalRxnNames()
Returns the set of names of all internal reactions in this fluxome. |
java.util.Map<java.lang.String,ChemRxn> |
getInternalRxns()
Returns all of the internal reactions in this fluxome. |
java.util.Map<java.lang.String,ChemRxn> |
getInternalRxns(java.util.Collection<java.lang.String> rxnNames)
Returns the internal reactions whose names appear in the provided collection of reaction names. |
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 associated with the expression provided. |
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 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 |
isCatalyst(java.lang.String s)
Indicates if the provided string is the name of an catalyst 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> fluxValues,
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 |
isReqCatalyst(java.lang.String catalyst,
java.lang.String rxnName)
Indicates if the specified catalyst is required for the reaction with the specified name. |
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 c,
java.lang.String rxnName,
double tolerance)
Indicates if the provided interval is a valid flux constraint for the reaction having the provided name. |
static MixedFluxomeV1 |
make(java.util.Collection<java.lang.String> reactionNames,
MixedFluxome fluxome)
Returns a mixed fluxome composed of the reactions in the provided fluxome with the names in the provided collection. |
MixedFluxomeV1 |
replaceConstraints(FluxConstraints fluxConstraints,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Interval IRREV
public static final Interval REV
public static final Interval OFF
Constructor Detail |
---|
public MixedFluxomeV1(java.util.Map<java.lang.String,? extends ChemRxn> rxns, java.util.Map<java.lang.String,Or<And<java.lang.String>>> catalysts)
rxns
- reaction names mapped to the internal and exchange reactions
to be contained in this fluxome.catalysts
- the names of internal reactions mapped to the boolean logic
rules governing their catalysis. Only the names of catalyzed
reactions need to be present as keys in this map.public MixedFluxomeV1(java.util.Map<java.lang.String,? extends ChemRxn> rxns)
rxns
- reaction names mapped to the internal and exchange reactions
to be contained in this fluxome.Method Detail |
---|
public void checkRxnNames(java.util.Collection<java.lang.String> rxnNames)
checkRxnNames
in interface MixedFluxome
rxnNames
- a collection of strings.
java.lang.IllegalArgumentException
- if any element of this collection
is not a valid reaction name.public void checkRxnName(java.lang.String reactionName)
checkRxnName
in interface MixedFluxome
reactionName
- a potential reaction name.
java.lang.IllegalArgumentException
- if the provided string
is not a valid reaction name.public void checkCatalyst(java.lang.String catalyst)
catalyst
- a potential catalyst.
java.lang.IllegalArgumentException
- if the provided string
is not a valid catalyst.public MixedFluxomeV1 replaceConstraints(FluxConstraints fluxConstraints, double constraintTolerance)
>= 0
. The remaining
flux bounds can be any values except NaN
, lower bounds cannot be
Double.POSITIVE_INFINITY
, and upper bounds cannot be
Double.NEGATIVE_INFINITY
.
replaceConstraints
in interface CatalyzedFluxome
replaceConstraints
in interface Fluxome
replaceConstraints
in interface MixedFluxome
fluxConstraints
- the new set of constraints.constraintTolerance
- the allowed amount by which constraints can violate their
maximum defined intervals.
isValid(Interval, String, double)
public FluxConstraints getConstraints()
getConstraints
in interface Fluxome
public java.util.Map<java.lang.String,Interval> getFluxConstraints()
public Interval getFluxConstraint(java.lang.String reactionName)
getFluxConstraint
in interface Fluxome
reactionName
- the name of the reaction whose
flux constraint will be returned.
public Interval getRxnExprConstraint(MathExpr<java.lang.String> rxnNameExpr)
getRxnExprConstraint
in interface Fluxome
rxnNameExpr
- the mathematical expression of reaction names
whose constraint is to be returned.
public java.util.Map<java.lang.String,ExchangeRxn> getExchangeRxns()
getExchangeRxns
in interface Fluxome
getExchangeRxns
in interface MixedFluxome
public java.util.Map<java.lang.String,ChemRxn> getCatalyzedRxns(java.lang.String catalyst)
getCatalyzedRxns
in interface CatalyzedFluxome
catalyst
- the name of the catalyst whose reactions
are to be returned.
java.lang.IllegalArgumentException
- if the provided catalyst
does not exist in this fluxome.public java.util.Map<java.lang.String,ChemRxn> getRxns()
getRxns
in interface Fluxome
getInternalRxns()
,
getExchangeRxns()
public java.util.Map<java.lang.String,ChemRxn> getRxns(java.util.Collection<java.lang.String> rxnNames)
getRxns
in interface Fluxome
rxnNames
- the names of the reactions to be returned.
java.lang.IllegalArgumentException
- if any of the provided names are invalid.public ChemRxn getRxn(java.lang.String reactionName)
getRxn
in interface Fluxome
reactionName
- the name of the chemical reaction to be returned.
java.lang.IllegalArgumentException
- if the provided string is not
a valid reaction name.getInternalRxn(String)
,
getExchangeRxn(String)
public ExchangeRxn getExchangeRxn(java.lang.String reactionName)
getExchangeRxn
in interface MixedFluxome
reactionName
- the name of the exchange reaction to be returned.
java.lang.IllegalArgumentException
- if the provided string is not
the name of an exchange reaction in this fluxome.public ChemRxn getInternalRxn(java.lang.String reactionName)
getInternalRxn
in interface MixedFluxome
reactionName
- the name of the internal reaction to be returned.
java.lang.IllegalArgumentException
- if the provided string is not
the name of an internal reaction in this fluxome.public java.util.Set<java.lang.String> getCatalyzedRxnNames(java.lang.String catalyst)
getCatalyzedRxnNames
in interface CatalyzedFluxome
catalyst
- the name of a catalyst in this fluxome.
java.lang.IllegalArgumentException
- if the provided string is not
the name of a catalyst in this fluxome.public java.util.Set<java.lang.String> getRxnNames()
getRxnNames
in interface Fluxome
getInternalRxnNames()
,
getExchangeRxnNames()
public java.util.Set<java.lang.String> getInternalRxnNames()
getInternalRxnNames
in interface Fluxome
public java.util.Map<java.lang.String,ChemRxn> getInternalRxns()
getInternalRxns
in interface Fluxome
getInternalRxns
in interface MixedFluxome
public java.util.Set<java.lang.String> getExchangeRxnNames()
getExchangeRxnNames
in interface Fluxome
public java.util.Map<java.lang.String,ExchangeRxn> getExchangeRxns(java.util.Collection<java.lang.String> rxnNames)
getExchangeRxns
in interface MixedFluxome
rxnNames
- the names of the reactions to be returned.
java.lang.IllegalArgumentException
- if an invalid name is provided.public int rxns()
rxns
in interface Fluxome
public int internalRxns()
internalRxns
in interface Fluxome
public int exchangeRxns()
exchangeRxns
in interface Fluxome
public int addedConstraints()
addedConstraints
in interface Fluxome
replaceConstraints(FluxConstraints, double)
public int catalysts()
catalysts
in interface CatalyzedFluxome
public int species()
species
in interface Fluxome
public java.util.Set<java.lang.String> getCatalysts()
getCatalysts
in interface CatalyzedFluxome
public java.util.Set<java.lang.String> getSpecies()
getSpecies
in interface Fluxome
public boolean isSpecies(java.lang.String s)
isSpecies
in interface Fluxome
s
- the string to test.
true
if the string is the name of a chemical species
contained in this fluxome; false
otherwise.public boolean isCatalyst(java.lang.String s)
isCatalyst
in interface CatalyzedFluxome
s
- the string to test.
true
if the string is the name of a catalyst contained in
this fluxome; false
otherwise.public boolean isRxnName(java.lang.String s)
isRxnName
in interface Fluxome
s
- the string to test.
true
if the string is the name of a reaction contained in
this fluxome; false
otherwise.public boolean isInternalRxnName(java.lang.String s)
isInternalRxnName
in interface Fluxome
s
- the string to test.
true
if the string is a valid internal reaction name;
false
otherwise.public boolean isExchangeRxnName(java.lang.String s)
isExchangeRxnName
in interface Fluxome
s
- the string to test.
true
if the string is a valid exchange reaction name;
false
otherwise.public boolean areRxnNames(java.util.Collection<java.lang.String> c)
areRxnNames
in interface Fluxome
c
- a collection of strings.
true
if every string is a valid reaction name;
false
otherwise.public boolean isValid(Interval c, java.lang.String rxnName, double tolerance)
>= 0
. The remaining
flux bounds can be any values except NaN
, lower bounds cannot be
Double.POSITIVE_INFINITY
, and upper bounds cannot be
Double.NEGATIVE_INFINITY
.
isValid
in interface Fluxome
c
- the flux constraint to test.rxnName
- the name of the reaction.tolerance
- the allowed amount by which constraints can violate their
maximum defined intervals.
true
if the provided constraint lies within it
maximum defined limits; false
otherwise.
java.lang.IllegalArgumentException
- if the provided reaction
name does not exist in this fluxome; or if the provided
tolerance is < 0, NaN, or infinite.
java.lang.NullPointerException
- if the provided constraint
is null
public SparseDoubleMatrix<java.lang.String,java.lang.String> getStoichMatrix()
getStoichMatrix
in interface Fluxome
public boolean isFluxVector(java.util.Map<java.lang.String,java.lang.Double> fluxValues, double tolerance)
isFluxVector
in interface Fluxome
fluxValues
- reaction names mapped to flux values.tolerance
- the numerical tolerance.
true
if the vector satisfies all constraints;
false
otherwise.public static MixedFluxomeV1 make(java.util.Collection<java.lang.String> reactionNames, MixedFluxome fluxome)
reactionNames
- the names of reactions in the provided fluxome used to compose
the returned fluxome.fluxome
- the fluxome used to compose the returned fluxome.
public java.util.Map<java.lang.String,Or<And<java.lang.String>>> getCatalystRules()
getCatalystRules
in interface CatalyzedFluxome
getCatalystRules
in interface MixedFluxome
public Or<And<java.lang.String>> getCatalystRule(java.lang.String rxnName)
getCatalystRule
in interface CatalyzedFluxome
getCatalystRule
in interface MixedFluxome
rxnName
- the name of the reaction for which the catalyst rules
are to be returned.
public java.util.Map<java.lang.String,ChemRxn> getInternalRxns(java.util.Collection<java.lang.String> rxnNames)
getInternalRxns
in interface MixedFluxome
rxnNames
- a collection of reaction names.
rxnNames
mapped to their corresponding reaction.
java.lang.IllegalArgumentException
- if a string in rxnNames
is not
the name of a reaction in this fluxome.public boolean isReqCatalyst(java.lang.String catalyst, java.lang.String rxnName)
isReqCatalyst
in interface CatalyzedFluxome
catalyst
- the catalyst.rxnName
- the name of the reaction.
true
if the provided catalyst is required by the reaction
with the provided name; false
otherwise.
java.lang.IllegalArgumentException
- if rxnName
is not a valid reaction name.public boolean areReqCatalysts(java.util.Collection<java.lang.String> catalysts, java.lang.String rxnName)
areReqCatalysts
in interface CatalyzedFluxome
catalysts
- the collection of catalysts.rxnName
- the name of the reaction.
true
if the provided catalysts are required for the
specified reaction to function; false
otherwise.
java.lang.IllegalArgumentException
- if rxnName
is not a valid reaction name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |