sbrt.shell.mng.fba
Class ObjectiveFunctionManager

java.lang.Object
  extended by sbrt.shell.mng.AbstractProcessManager
      extended by sbrt.shell.mng.fba.FbaManager
          extended by sbrt.shell.mng.fba.ObjectiveFunctionManager
All Implemented Interfaces:
KernelProcessManager<java.lang.String,java.lang.String>, ProcessManager<java.lang.String,java.lang.String>

public final class ObjectiveFunctionManager
extends FbaManager

This class is used to manage objective function processes.

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

Field Summary
static java.lang.String OBJ_FUNCT_FILE
          The keyword used to denote the file containing objective functions.
static java.lang.String OBJ_FUNCT_FILE_FORMAT
          The keyword used to denote the format of the file containing objective functions.
static UnmodifiableSet<java.lang.String> optionalKeywords
          The set of keywords understood, but not required, by instances of this class.
static UnmodifiableSet<java.lang.String> requiredKeywords
          The set of keywords required to be present in the ManagerInput objects supplied to instances of this class.
 
Fields inherited from class sbrt.shell.mng.fba.FbaManager
CONSTRAINT_TOLERANCE, DEFAULT_CONSTRAINT_TOLERANCE, FLUX_VECTOR_FILE, FLUX_VECTOR_FILE_NAME, RXN_CATALYST_FILE, RXN_FILE, SYSTEM_SOLUTION_FILE
 
Fields inherited from class sbrt.shell.mng.AbstractProcessManager
ALGORITHM, COMPLETED, DATA_HEADERS, DEV_NULL, ELAPSED_TIME, FILE_FORMAT, INPUT_FILE, INPUT_FILE_FORMAT, INPUT_FILE_NAME_FILE, ITERATIONS, OUTPUT_FILE_FORMAT, OUTPUT_FILE_NAME, OUTPUT_FILE_NAME_FILE, PERCENT, PERCENT_COMPLETED, SEED, ZERO_CUTOFF
 
Constructor Summary
ObjectiveFunctionManager()
           
 
Method Summary
 void execute(java.io.PrintWriter out)
          Executes the process this process manager controls, and writes the status or results of this process to the provided print writer.
static TextInputFile<LinearComb<java.lang.String>> getInputFile(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out, Fluxome fluxome)
          Returns the file denoted by OBJ_FUNCT_FILE in the provided manager input.
static TextInputFile<LinearComb<java.lang.String>> getInputFile(java.lang.String fileName, FileFormat format, Fluxome fluxome)
          Returns the input file with the provided name.
static TextInputFile<LinearComb<java.lang.String>> getInputFile(java.lang.String fileName, Fluxome fluxome)
          Returns the input file with the provided name.
 UnmodifiableSet<java.lang.String> getOptionalKeys()
          Returns the set of keywords the provided ManagerInput object does not necessarily have to contain.
 ObjFunAnalysis<MixedFluxome> getProcess()
          Returns the process this process manager controls.
 UnmodifiableSet<java.lang.String> getRequiredKeys()
          Returns the set of keywords the provided ManagerInput object must contain.
 void setInput(ManagerInput<java.lang.String,java.lang.String> input, java.io.PrintWriter out)
          Uses the provided input to prepare this process manager for execution.
 
Methods inherited from class sbrt.shell.mng.fba.FbaManager
getCatalysts, getCatalysts, getConstraintTolerance, getConstraintTolerance, getFluxomeSolution, getIrrevRxnFluxome, getIrrevRxnFluxome, getIrrevRxnFluxome, getIrrevRxnFluxome, getIrrevRxnFluxome, getMixedFluxome, getMixedFluxome, getMixedFluxome, getMixedFluxome, getMixedFluxome, getMultiFluxVectorOutputFile, getMultiFluxVectorOutputFile, getRxnNameExprFormat, getRxnNameHeaders, getRxnNameHeaders, getSingleFluxVectorOutputFile, getSingleFluxVectorOutputFile, printFluxomeInfo, writeFluxome, writeFluxome, writeFluxome, writeFluxome
 
Methods inherited from class sbrt.shell.mng.AbstractProcessManager
check, closeFile, closeRm, execute, getFileFormat, getFileFormat, getFileNameSource, getIterations, getSeed, getTextFileFormat, getTextFileFormat, getZeroCutoff, getZeroCutoff, parseInt, parseLong, printProgress, printProgress, printProgress, runProcess, setInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sbrt.shell.mng.ProcessManager
check, execute, setInput
 

Field Detail

OBJ_FUNCT_FILE

public static final java.lang.String OBJ_FUNCT_FILE
The keyword used to denote the file containing objective functions.

See Also:
Constant Field Values

OBJ_FUNCT_FILE_FORMAT

public static final java.lang.String OBJ_FUNCT_FILE_FORMAT
The keyword used to denote the format of the file containing objective functions.

See Also:
Constant Field Values

requiredKeywords

public static final UnmodifiableSet<java.lang.String> requiredKeywords
The set of keywords required to be present in the ManagerInput objects supplied to instances of this class.


optionalKeywords

public static final UnmodifiableSet<java.lang.String> optionalKeywords
The set of keywords understood, but not required, by instances of this class.

Constructor Detail

ObjectiveFunctionManager

public ObjectiveFunctionManager()
Method Detail

getInputFile

public static TextInputFile<LinearComb<java.lang.String>> getInputFile(ManagerInput<java.lang.String,java.lang.String> input,
                                                                       java.io.PrintWriter out,
                                                                       Fluxome fluxome)
Returns the file denoted by OBJ_FUNCT_FILE in the provided manager input. The format of this file can be specified by the additional keyword OBJ_FUNCT_FILE_FORMAT. The values corresponding to these keywords are parsed and used as arguments to the method getInputFile(String, FileFormat, Fluxome).

Parameters:
input - the input containing a value for OBJ_FUNCT_FILE, and possibly even OBJ_FUNCT_FILE_FORMAT.
out - the print writer to which a status message will be printed.
fluxome - the fluxome to which the objective functions correspond.
Returns:
the file denoted by OBJ_FUNCT_FILE in the provided manager input.
See Also:
AbstractProcessManager.getFileFormat(String)

getInputFile

public static TextInputFile<LinearComb<java.lang.String>> getInputFile(java.lang.String fileName,
                                                                       FileFormat format,
                                                                       Fluxome fluxome)
Returns the input file with the provided name. This file must have been written in either FileFormat.TEXT or FileFormat.GZIP_TEXT formats, and the non-commented lines must be parsable with the default reaction name expression parser. Every variable contained in each objective function must be the name of a reaction in the provided fluxome.

Parameters:
fileName - the name of the file to be opened.
format - the format of the file to be opened. FileFormat.TEXT and FileFormat.GZIP_TEXT are currently the only supported choices.
fluxome - the fluxome to which the objective functions correspond.
Returns:
the input file with the provided name.
See Also:
FbaManager.getRxnNameExprFormat(Fluxome)

getInputFile

public static TextInputFile<LinearComb<java.lang.String>> getInputFile(java.lang.String fileName,
                                                                       Fluxome fluxome)
Returns the input file with the provided name. This file must have been written in FileFormat.TEXT format, and the non-commented lines must be parsable with the default reaction name expression parser. Every variable contained in each objective function must be the name of a reaction in the provided fluxome.

Parameters:
fileName - the name of the file to be opened.
fluxome - the fluxome to which the objective functions correspond.
Returns:
the input file with the provided name.
See Also:
FbaManager.getRxnNameExprFormat(Fluxome)

getRequiredKeys

public UnmodifiableSet<java.lang.String> getRequiredKeys()
Returns the set of keywords the provided ManagerInput object must contain.

Returns:
the set of keywords the provided ManagerInput object must contain.

getOptionalKeys

public UnmodifiableSet<java.lang.String> getOptionalKeys()
Returns the set of keywords the provided ManagerInput object does not necessarily have to contain.

Returns:
the set of keywords the provided ManagerInput object does not necessarily have to contain.

setInput

public void setInput(ManagerInput<java.lang.String,java.lang.String> input,
                     java.io.PrintWriter out)
Uses the provided input to prepare this process manager for execution. As the input is processed, informative messages are printed to the provided print writer.

Parameters:
input - all of the information required to prepare this process manager for execution.
out - the print writer to which all messages will be printed.

getProcess

public ObjFunAnalysis<MixedFluxome> getProcess()
Returns the process this process manager controls.

Returns:
the process this process manager controls.
Throws:
java.lang.IllegalStateException - if no input was provided to this process manager via AbstractProcessManager.setInput(ManagerInput) or setInput(ManagerInput, PrintWriter)

execute

public void execute(java.io.PrintWriter out)
Executes the process this process manager controls, and writes the status or results of this process to the provided print writer.

Parameters:
out - the print writer where status messages will be printed.
Throws:
java.lang.IllegalStateException - if no input was provided to this process manager via AbstractProcessManager.setInput(ManagerInput) or setInput(ManagerInput, PrintWriter)