sbrt.kernel.fba.proc
Class RandConstGeneratorV1<F extends Fluxome>

java.lang.Object
  extended by sbrt.kernel.fba.proc.FbaProcess<F,java.util.Map<java.lang.String,Interval>>
      extended by sbrt.kernel.fba.proc.RandConstGeneratorV1<F>
Type Parameters:
F - the fluxome type.
All Implemented Interfaces:
KernelProcess<java.util.Map<java.lang.String,Interval>>, MonitoredProcess<java.util.Map<java.lang.String,Interval>>

public final class RandConstGeneratorV1<F extends Fluxome>
extends FbaProcess<F,java.util.Map<java.lang.String,Interval>>
implements MonitoredProcess<java.util.Map<java.lang.String,Interval>>

This class is used to generate random flux constraints.

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

Constructor Summary
RandConstGeneratorV1(F fluxome)
          Constructs a new random constraint generator.
 
Method Summary
 int getActiveFluxes()
          Returns the number of active fluxes in each set of randomly generated flux constraints.
 F getFluxome()
          Returns the fluxome for which random constraints are to be generated.
 Interval getInactive()
          Returns the constraint used for inactive reactions.
 Interval getIrrevConstraint()
          Returns the constraint used for active irreversible reactions.
 int getIterations()
          Returns the number of sets of random constraints to be generated.
 ProgressMonitor getProgress()
          Returns a progress monitor for this process.
 Interval getRevConstraint()
          Returns the constraint used for active reversible reactions.
 void run(ResultsManager<java.util.Map<java.lang.String,Interval>> resultsManager)
          Generates sets of random flux constraints and adds them to the provided results manager.
 void setActiveFluxes(int activeFluxes)
          Sets the total number of active fluxes to be contained in each randomly generated set of flux constraints.
 void setInactive(Interval inactive)
          Sets the constraint used for inactive reactions.
 void setIrrevConstraint(Interval constraint)
          Sets the constraint used for active irreversible reactions.
 void setIterations(int iterations)
          Sets the number of sets of random flux constraints to be produced.
 void setRandom(java.util.Random random)
          Sets the random number generator to the one provided.
 void setReactions(java.util.Set<java.lang.String> reactionNames)
          Sets the reaction names for which random constraints are to be generated.
 void setRevConstraint(Interval constraint)
          Sets the constraint used for active reversible reactions.
 
Methods inherited from class sbrt.kernel.fba.proc.FbaProcess
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RandConstGeneratorV1

public RandConstGeneratorV1(F fluxome)
Constructs a new random constraint generator.

Parameters:
fluxome - the fluxome for which random flux constraints are to be generated.
Method Detail

getFluxome

public F getFluxome()
Returns the fluxome for which random constraints are to be generated.

Specified by:
getFluxome in class FbaProcess<F extends Fluxome,java.util.Map<java.lang.String,Interval>>
Returns:
the fluxome for which random constraints are to be generated.

getIterations

public int getIterations()
Returns the number of sets of random constraints to be generated.

Returns:
the number of sets of random constraints to be generated.

setIterations

public void setIterations(int iterations)
Sets the number of sets of random flux constraints to be produced.

Parameters:
iterations - the number of random flux constraints to be produced.

getActiveFluxes

public int getActiveFluxes()
Returns the number of active fluxes in each set of randomly generated flux constraints.

Returns:
the number of active fluxes in each set of randomly generated flux constraints.

setActiveFluxes

public void setActiveFluxes(int activeFluxes)
Sets the total number of active fluxes to be contained in each randomly generated set of flux constraints.

Parameters:
activeFluxes - the total number of active fluxes to be contained in each randomly generated set of flux constraints.

setReactions

public void setReactions(java.util.Set<java.lang.String> reactionNames)
Sets the reaction names for which random constraints are to be generated.

Parameters:
reactionNames - the reaction names for which random constraints are to be generated.

setRandom

public void setRandom(java.util.Random random)
Sets the random number generator to the one provided.

Parameters:
random - the random number generator to use.

getIrrevConstraint

public Interval getIrrevConstraint()
Returns the constraint used for active irreversible reactions.

Returns:
the constraint used for active irreversible reactions.

getRevConstraint

public Interval getRevConstraint()
Returns the constraint used for active reversible reactions.

Returns:
the constraint used for active reversible reactions.

getInactive

public Interval getInactive()
Returns the constraint used for inactive reactions.

Returns:
the constraint used for inactive reactions.

setIrrevConstraint

public void setIrrevConstraint(Interval constraint)
Sets the constraint used for active irreversible reactions.

Parameters:
constraint - the constraint used for active irreversible reactions.

setRevConstraint

public void setRevConstraint(Interval constraint)
Sets the constraint used for active reversible reactions.

Parameters:
constraint - the constraint used for active reversible reactions.

setInactive

public void setInactive(Interval inactive)
Sets the constraint used for inactive reactions.

Parameters:
inactive - the constraint used for inactive reactions.

run

public void run(ResultsManager<java.util.Map<java.lang.String,Interval>> resultsManager)
Generates sets of random flux constraints and adds them to the provided results manager. Each set of random constraints contains a constant number of active and inactive constraints, and it is the assignment of these constraints to reaction names that is random.

Specified by:
run in interface KernelProcess<java.util.Map<java.lang.String,Interval>>
Parameters:
resultsManager - the results manager to which reaction names mapped to their randomly assigned constraint is added.

getProgress

public ProgressMonitor getProgress()
Returns a progress monitor for this process.

Specified by:
getProgress in interface MonitoredProcess<java.util.Map<java.lang.String,Interval>>
Returns:
a progress monitor for this process.