sbrt.shell.text.fba
Class IrrevRxnFormatV1

java.lang.Object
  extended by sbrt.shell.text.fba.IrrevRxnFormatV1
All Implemented Interfaces:
Format, Formatter<ChemRxn>, Parser<ChemRxn>, SimpleFormat<ChemRxn>

public final class IrrevRxnFormatV1
extends java.lang.Object
implements SimpleFormat<ChemRxn>

This class is used to format irreversible reactions for use in flux balance analysis.

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

Field Summary
static java.lang.String ARROW
          The arrow used to signify an irreversible reaction.
static java.lang.String SURR
          The string used to denote the surroundings.
 
Constructor Summary
IrrevRxnFormatV1()
          Constructs a new irreversible reaction format.
 
Method Summary
 java.lang.String format(ChemRxn rxn)
          Returns a formatted string representation of the provided irreversible chemical reaction.
 java.lang.String format(IrrevRxn rxn)
          Returns a formatted string representation of the provided irreversible chemical reaction.
 java.lang.String format(SinkRxn sink)
          Returns a formatted string representation of the provided sink.
 java.lang.String format(SourceRxn source)
          Returns a formatted string representation of the provided source.
 ChemSpeciesFormatV1 getChemSpeciesFormat()
          Returns the format used for chemical species.
 LinearCombFormatV1<java.lang.String> getLinearCombFormat()
          Returns the format used for stoichiometric expressions.
 ChemRxn parse(java.lang.String reaction)
          Parses the provided string and returns its corresponding chemical reaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SURR

public static final java.lang.String SURR
The string used to denote the surroundings. This is used as a pseudo-species when representing exchange reactions.

See Also:
Constant Field Values

ARROW

public static final java.lang.String ARROW
The arrow used to signify an irreversible reaction.

See Also:
Constant Field Values
Constructor Detail

IrrevRxnFormatV1

public IrrevRxnFormatV1()
Constructs a new irreversible reaction format.

Method Detail

getChemSpeciesFormat

public ChemSpeciesFormatV1 getChemSpeciesFormat()
Returns the format used for chemical species.

Returns:
the format used for chemical species.

getLinearCombFormat

public LinearCombFormatV1<java.lang.String> getLinearCombFormat()
Returns the format used for stoichiometric expressions.

Returns:
the format used for stoichiometric expressions.

format

public java.lang.String format(ChemRxn rxn)
Returns a formatted string representation of the provided irreversible chemical reaction.

Specified by:
format in interface Formatter<ChemRxn>
Parameters:
rxn - the reaction to be formatted.
Returns:
a formatted string representation of the provided irreversible chemical reaction.
Throws:
java.lang.IllegalArgumentException - if rxn is not an IrrevRxn, SourceRxn, or SinkRxn.

format

public java.lang.String format(IrrevRxn rxn)
Returns a formatted string representation of the provided irreversible chemical reaction.

Parameters:
rxn - the reaction to be formatted.
Returns:
a formatted string representation of the provided irreversible chemical reaction.

format

public java.lang.String format(SourceRxn source)
Returns a formatted string representation of the provided source.

Parameters:
source - the reaction to be formatted.
Returns:
a formatted string representation of the provided source.

format

public java.lang.String format(SinkRxn sink)
Returns a formatted string representation of the provided sink.

Parameters:
sink - the reaction to be formatted.
Returns:
a formatted string representation of the provided sink.

parse

public ChemRxn parse(java.lang.String reaction)
Parses the provided string and returns its corresponding chemical reaction.

Specified by:
parse in interface Parser<ChemRxn>
Parameters:
reaction - the string to be parsed.
Returns:
the chemical reaction corresponding to the provided string. The type of this reaction will be either IrrevRxn, SourceRxn, or SinkRxn.