Package org.snpeff.reactome.events
Class Reaction
- java.lang.Object
-
- org.snpeff.reactome.Entity
-
- org.snpeff.reactome.events.Event
-
- org.snpeff.reactome.events.Reaction
-
- All Implemented Interfaces:
java.lang.Comparable<Entity>
- Direct Known Subclasses:
BlackBoxEvent,CatalystActivity,Complex,Depolymerisation,Pathway,Polymerisation
public class Reaction extends Event
A reaction- Author:
- pcingola
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReaction.RegulationTypeReaction regulation types-
Nested classes/interfaces inherited from class org.snpeff.reactome.Entity
Entity.TransferFunction
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashSet<Entity>catalystprotected java.util.HashMap<Entity,java.lang.Double>inputsstatic doubleMAX_WEIGHT_SUMprotected java.util.HashSet<Entity>outputsprotected java.util.HashMap<Entity,Reaction.RegulationType>regulator-
Fields inherited from class org.snpeff.reactome.Entity
BETA, compartment, debug, fixedOutput, geneIds, id, name, output, TRANSFER_FUNCTION, weight
-
-
Constructor Summary
Constructors Constructor Description Reaction(int id, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCatalyst(Entity e)voidaddInput(Entity e)voidaddOutput(Entity e)voidaddRegulator(Entity e, java.lang.String type)voidaddRegulator(Entity e, Reaction.RegulationType type)doublecalc(java.util.HashSet<Entity> doneEntities)Calculate entities.java.util.HashSet<Entity>getCatalyst()java.util.Collection<Entity>getInputs()java.util.HashSet<Entity>getOutputs()java.util.HashMap<Entity,Reaction.RegulationType>getRegulator()booleanisReaction()voidscaleWeights()Scale weights so that they add to 1java.lang.StringtoString()java.lang.StringtoString(int tabs, java.util.HashSet<Entity> done)protected doubletransferFunction(double h, double inCat, double inRegPos, double inRegNeg, double inRegReq)Transfer function-
Methods inherited from class org.snpeff.reactome.Entity
addGeneId, calc, compareTo, getCompartment, getGeneIds, getId, getName, getOutput, getWeight, hasOutput, isFixed, reset, setCompartment, setFixedOutput, setWeight, toStringSimple, transferFunction
-
-
-
-
Field Detail
-
MAX_WEIGHT_SUM
public static final double MAX_WEIGHT_SUM
- See Also:
- Constant Field Values
-
inputs
protected java.util.HashMap<Entity,java.lang.Double> inputs
-
outputs
protected java.util.HashSet<Entity> outputs
-
catalyst
protected java.util.HashSet<Entity> catalyst
-
regulator
protected java.util.HashMap<Entity,Reaction.RegulationType> regulator
-
-
Method Detail
-
addCatalyst
public void addCatalyst(Entity e)
-
addInput
public void addInput(Entity e)
-
addOutput
public void addOutput(Entity e)
-
addRegulator
public void addRegulator(Entity e, Reaction.RegulationType type)
-
addRegulator
public void addRegulator(Entity e, java.lang.String type)
-
calc
public double calc(java.util.HashSet<Entity> doneEntities)
Calculate entities. Make sure we don't calculate twice (keep 'doneEntities' set up to date)
-
getCatalyst
public java.util.HashSet<Entity> getCatalyst()
-
getInputs
public java.util.Collection<Entity> getInputs()
-
getOutputs
public java.util.HashSet<Entity> getOutputs()
-
getRegulator
public java.util.HashMap<Entity,Reaction.RegulationType> getRegulator()
-
isReaction
public boolean isReaction()
- Overrides:
isReactionin classEntity
-
scaleWeights
public void scaleWeights()
Scale weights so that they add to 1
-
toString
public java.lang.String toString(int tabs, java.util.HashSet<Entity> done)
-
transferFunction
protected double transferFunction(double h, double inCat, double inRegPos, double inRegNeg, double inRegReq)Transfer function- Parameters:
h-- Returns:
-
-