sbrt.kernel.fba.proc
Class RevRxnBreakerProcess

java.lang.Object
  extended by sbrt.kernel.fba.proc.RevRxnBreakerProcess
All Implemented Interfaces:
KernelProcess<java.util.Map<java.lang.String,ChemRxn>>

public final class RevRxnBreakerProcess
extends java.lang.Object
implements KernelProcess<java.util.Map<java.lang.String,ChemRxn>>

This class is used to break reversible reactions into pairs of irreversible reactions. Reactions of type RevRxn are broken apart into a pair of "forward" and "reverse" reactions of type IrrevRxn. Reactions of type RevExchRxn are broken apart in a pair of "source" and "sink" reactions of types SourceRxn and SinkRxn.

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

Field Summary
static java.lang.String FORWARD_SUFFIX
          The default suffix added to the names or IDs of forward reactions.
static java.lang.String REVERSE_SUFFIX
          The default suffix added to the names or IDs of reverse reactions.
static java.lang.String SINK_SUFFIX
          The default suffix added to the names or IDs of sink reactions.
static java.lang.String SOURCE_SUFFIX
          The default suffix added to the names or IDs of source reactions.
 
Constructor Summary
RevRxnBreakerProcess()
          Constructs a new reversible reaction breaker process.
 
Method Summary
 java.util.Map<java.lang.String,ExchangeRxn> breakRxn(java.lang.String rxnId, RevExchRxn rxn)
          Breaks a reversible exchange reaction into a pair of irreversible source and sink exchange reactions.
 java.util.Map<java.lang.String,IrrevRxn> breakRxn(java.lang.String rxnId, RevRxn rxn)
          Breaks a reversible reaction into a pair of irreversible reactions.
 java.util.Map<java.lang.String,ChemRxn> breakRxns(java.util.Map<java.lang.String,ChemRxn> rxns)
          Breaks reversible reactions into pairs of irreversible reactions.
 void run(ResultsManager<java.util.Map<java.lang.String,ChemRxn>> resultsManager)
          Breaks the reversible reactions supplied to this process and adds the result to the provided manager.
 void setForwardSuffix(java.lang.String suffix)
          Sets the forward suffix if a non-default value is desired.
 void setReverseSuffix(java.lang.String suffix)
          Sets the reverse suffix if a non-default value is desired.
 void setRxns(java.util.Map<java.lang.String,? extends ChemRxn> rxns)
          Sets the reactions for which reversible reactions will be broken.
 void setSinkSuffix(java.lang.String suffix)
          Sets the sink suffix if a non-default value is desired.
 void setSourceSuffix(java.lang.String suffix)
          Sets the source suffix if a non-default value is desired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORWARD_SUFFIX

public static final java.lang.String FORWARD_SUFFIX
The default suffix added to the names or IDs of forward reactions.

See Also:
Constant Field Values

REVERSE_SUFFIX

public static final java.lang.String REVERSE_SUFFIX
The default suffix added to the names or IDs of reverse reactions.

See Also:
Constant Field Values

SOURCE_SUFFIX

public static final java.lang.String SOURCE_SUFFIX
The default suffix added to the names or IDs of source reactions.

See Also:
Constant Field Values

SINK_SUFFIX

public static final java.lang.String SINK_SUFFIX
The default suffix added to the names or IDs of sink reactions.

See Also:
Constant Field Values
Constructor Detail

RevRxnBreakerProcess

public RevRxnBreakerProcess()
Constructs a new reversible reaction breaker process.

Method Detail

setForwardSuffix

public void setForwardSuffix(java.lang.String suffix)
Sets the forward suffix if a non-default value is desired.

Parameters:
suffix - the string to be appended to the names of forward reactions.

setReverseSuffix

public void setReverseSuffix(java.lang.String suffix)
Sets the reverse suffix if a non-default value is desired.

Parameters:
suffix - the string to be appended to the names of reverse reactions.

setSourceSuffix

public void setSourceSuffix(java.lang.String suffix)
Sets the source suffix if a non-default value is desired.

Parameters:
suffix - the string to be appended to the names of source reactions.

setSinkSuffix

public void setSinkSuffix(java.lang.String suffix)
Sets the sink suffix if a non-default value is desired.

Parameters:
suffix - the string to be appended to the names of sink reactions.

setRxns

public void setRxns(java.util.Map<java.lang.String,? extends ChemRxn> rxns)
Sets the reactions for which reversible reactions will be broken.

Parameters:
rxns - reactions names mapped to their corresponding reaction.

run

public void run(ResultsManager<java.util.Map<java.lang.String,ChemRxn>> resultsManager)
Breaks the reversible reactions supplied to this process and adds the result to the provided manager. Irreversible reactions are unaffected, and are also supplied to the results manager.

Specified by:
run in interface KernelProcess<java.util.Map<java.lang.String,ChemRxn>>
Parameters:
resultsManager - the results manager to which all reactions will be added.

breakRxns

public java.util.Map<java.lang.String,ChemRxn> breakRxns(java.util.Map<java.lang.String,ChemRxn> rxns)
Breaks reversible reactions into pairs of irreversible reactions. Irreversible reactions are unaffected, and are also included in the returned result.

Parameters:
rxns - reaction names mapped to their corresponding reaction.
Returns:
reaction names mapped to their corresponding irreversible reaction.

breakRxn

public java.util.Map<java.lang.String,IrrevRxn> breakRxn(java.lang.String rxnId,
                                                         RevRxn rxn)
Breaks a reversible reaction into a pair of irreversible reactions.

Parameters:
rxnId - the reaction name or ID.
rxn - the reversible reaction.
Returns:
reaction names mapped to their corresponding irreversible reaction.

breakRxn

public java.util.Map<java.lang.String,ExchangeRxn> breakRxn(java.lang.String rxnId,
                                                            RevExchRxn rxn)
Breaks a reversible exchange reaction into a pair of irreversible source and sink exchange reactions.

Parameters:
rxnId - the reaction name or ID.
rxn - the reversible exchange reaction.
Returns:
reaction names mapped to their corresponding irreversible exchange reaction.