|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.kernel.fba.IrrevRxnFluxomeV1
public final class IrrevRxnFluxomeV1
This class is a concrete implementation of IrrevRxnFluxome
.
Instances of this class are immutable.
Field Summary | |
---|---|
static Interval |
OFF
The constraint used by default for all source reactions: [0, 0]. |
static Interval |
ON
The constraint used by default for all internal and sink reactions: [0, Infinity). |
Constructor Summary | |
---|---|
IrrevRxnFluxomeV1(java.util.Map<java.lang.String,? extends ChemRxn> rxns)
Constructs a new irreversible reaction fluxome from the provided internal and exchange reactions. |
|
IrrevRxnFluxomeV1(java.util.Map<java.lang.String,? extends ChemRxn> rxns,
java.util.Map<java.lang.String,Or<And<java.lang.String>>> catalysts)
Constructs a new irreversible reaction fluxome from the provided internal and exchange reactions and catalysts. |
|
IrrevRxnFluxomeV1(java.util.Map<java.lang.String,IrrevRxn> internalRxns,
java.util.Map<java.lang.String,SourceRxn> sourceRxns,
java.util.Map<java.lang.String,SinkRxn> sinkRxns)
Constructs a new irreversible reaction fluxome from the provided internal and exchange reactions. |
|
IrrevRxnFluxomeV1(java.util.Map<java.lang.String,IrrevRxn> internalRxns,
java.util.Map<java.lang.String,SourceRxn> sourceRxns,
java.util.Map<java.lang.String,SinkRxn> sinkRxns,
java.util.Map<java.lang.String,Or<And<java.lang.String>>> catalysts)
Constructs a new irreversible reaction 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,IrrevRxn> |
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. |
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. |
IrrevRxn |
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,IrrevRxn> |
getInternalRxns()
Returns all of the internal reactions in this fluxome. |
java.util.Map<java.lang.String,IrrevRxn> |
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. |
SinkRxn |
getSinkRxn(java.lang.String reactionName)
Returns the sink reaction in this fluxome with the provided name. |
java.util.Set<java.lang.String> |
getSinkRxnNames()
Returns the set of names of all sinks in this fluxome. |
java.util.Map<java.lang.String,SinkRxn> |
getSinkRxns()
Returns all of the sinks in this fluxome. |
java.util.Map<java.lang.String,SinkRxn> |
getSinkRxns(java.util.Collection<java.lang.String> rxnNames)
Returns the sink reactions whose names appear in the provided collection of reaction names. |
SourceRxn |
getSourceRxn(java.lang.String reactionName)
Returns the source reaction in this fluxome with the provided name. |
java.util.Set<java.lang.String> |
getSourceRxnNames()
Returns the set of names of all sources in this fluxome. |
java.util.Map<java.lang.String,SourceRxn> |
getSourceRxns()
Returns all of the sources in this fluxome. |
java.util.Map<java.lang.String,SourceRxn> |
getSourceRxns(java.util.Collection<java.lang.String> rxnNames)
Returns the source reactions whose names appear in the provided collection of reaction 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 |
isSinkRxnName(java.lang.String s)
Indicates if the provided string is the name of a sink reaction contained in this fluxome. |
boolean |
isSourceRxnName(java.lang.String s)
Indicates if the provided string is the name of a source 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 IrrevRxnFluxomeV1 |
make(java.util.Collection<java.lang.String> reactionNames,
IrrevRxnFluxome fluxome)
Returns an irreversible reaction fluxome composed of the reactions in the provided fluxome with the names in the provided collection. |
IrrevRxnFluxomeV1 |
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 |
sinkRxns()
Returns the total number of sink reactions contained in this fluxome. |
int |
sourceRxns()
Returns the total number of source 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 ON
public static final Interval OFF
Constructor Detail |
---|
public IrrevRxnFluxomeV1(java.util.Map<java.lang.String,IrrevRxn> internalRxns, java.util.Map<java.lang.String,SourceRxn> sourceRxns, java.util.Map<java.lang.String,SinkRxn> sinkRxns, java.util.Map<java.lang.String,Or<And<java.lang.String>>> catalysts)
internalRxns
- reaction names mapped to the internal reactions
to be contained in this fluxome.sourceRxns
- reaction names mapped to the sources to be
contained in this fluxome.sinkRxns
- reaction names mapped to the sinks 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 IrrevRxnFluxomeV1(java.util.Map<java.lang.String,IrrevRxn> internalRxns, java.util.Map<java.lang.String,SourceRxn> sourceRxns, java.util.Map<java.lang.String,SinkRxn> sinkRxns)
internalRxns
- reaction names mapped to the internal reactions
to be contained in this fluxome.sourceRxns
- reaction names mapped to the sources to be
contained in this fluxome.sinkRxns
- reaction names mapped to the sinks to be contained
in this fluxome.public IrrevRxnFluxomeV1(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 IrrevRxnFluxomeV1(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 IrrevRxnFluxome
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 IrrevRxnFluxome
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 IrrevRxnFluxomeV1 replaceConstraints(FluxConstraints fluxConstraints, double constraintTolerance)
replaceConstraints
in interface CatalyzedFluxome
replaceConstraints
in interface Fluxome
replaceConstraints
in interface IrrevRxnFluxome
fluxConstraints
- the new set of constraints.constraintTolerance
- the amount by which a lower or upper
bound from a provided constraint can violate the constraint
[0, Infinity)
.
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
getSourceRxns()
,
getSinkRxns()
public java.util.Map<java.lang.String,IrrevRxn> 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()
,
getSourceRxns()
,
getSinkRxns()
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)
,
getSourceRxn(String)
,
getSinkRxn(String)
public ExchangeRxn getExchangeRxn(java.lang.String reactionName)
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.getSourceRxn(String)
,
getSinkRxn(String)
public IrrevRxn getInternalRxn(java.lang.String reactionName)
getInternalRxn
in interface IrrevRxnFluxome
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()
,
getSinkRxnNames()
,
getSourceRxnNames()
public java.util.Set<java.lang.String> getInternalRxnNames()
getInternalRxnNames
in interface Fluxome
public java.util.Map<java.lang.String,IrrevRxn> getInternalRxns()
getInternalRxns
in interface Fluxome
getInternalRxns
in interface IrrevRxnFluxome
public java.util.Set<java.lang.String> getExchangeRxnNames()
getExchangeRxnNames
in interface Fluxome
getSourceRxnNames()
,
getSinkRxnNames()
public java.util.Set<java.lang.String> getSourceRxnNames()
getSourceRxnNames
in interface IrrevRxnFluxome
public java.util.Set<java.lang.String> getSinkRxnNames()
getSinkRxnNames
in interface IrrevRxnFluxome
public java.util.Map<java.lang.String,SourceRxn> getSourceRxns()
getSourceRxns
in interface IrrevRxnFluxome
public java.util.Map<java.lang.String,SinkRxn> getSinkRxns()
getSinkRxns
in interface IrrevRxnFluxome
public SourceRxn getSourceRxn(java.lang.String reactionName)
getSourceRxn
in interface IrrevRxnFluxome
reactionName
- the name of the source reaction to be returned.
java.lang.IllegalArgumentException
- if the provided string is not
the name of a source reaction in this fluxome.public SinkRxn getSinkRxn(java.lang.String reactionName)
getSinkRxn
in interface IrrevRxnFluxome
reactionName
- the name of the sink reaction to be returned.
java.lang.IllegalArgumentException
- if the provided string is not
the name of a sink reaction in this fluxome.public int rxns()
rxns
in interface Fluxome
public int internalRxns()
internalRxns
in interface Fluxome
public int exchangeRxns()
exchangeRxns
in interface Fluxome
public int sourceRxns()
sourceRxns
in interface IrrevRxnFluxome
public int sinkRxns()
sinkRxns
in interface IrrevRxnFluxome
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 isSourceRxnName(java.lang.String s)
isSourceRxnName
in interface IrrevRxnFluxome
s
- the string to test.
true
if the string is a valid source reaction name;
false
otherwise.public boolean isSinkRxnName(java.lang.String s)
isSinkRxnName
in interface IrrevRxnFluxome
s
- the string to test.
true
if the string is a valid sink 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)
isValid
in interface Fluxome
c
- the flux constraint to test.rxnName
- the name of the reaction.tolerance
- the numerical tolerance.
c.getLower() >= -1 * tolerance &&
!Double.isInfinite(c.getLower())
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 IrrevRxnFluxomeV1 make(java.util.Collection<java.lang.String> reactionNames, IrrevRxnFluxome 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 IrrevRxnFluxome
public Or<And<java.lang.String>> getCatalystRule(java.lang.String rxnName)
getCatalystRule
in interface CatalyzedFluxome
getCatalystRule
in interface IrrevRxnFluxome
rxnName
- the name of the reaction for which the catalyst rules
are to be returned.
public java.util.Map<java.lang.String,IrrevRxn> getInternalRxns(java.util.Collection<java.lang.String> rxnNames)
getInternalRxns
in interface IrrevRxnFluxome
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 java.util.Map<java.lang.String,SinkRxn> getSinkRxns(java.util.Collection<java.lang.String> rxnNames)
getSinkRxns
in interface IrrevRxnFluxome
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 java.util.Map<java.lang.String,SourceRxn> getSourceRxns(java.util.Collection<java.lang.String> rxnNames)
getSourceRxns
in interface IrrevRxnFluxome
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 |