Package org.snpeff.reactome
Class Entity
- java.lang.Object
-
- org.snpeff.reactome.Entity
-
- All Implemented Interfaces:
java.lang.Comparable<Entity>
- Direct Known Subclasses:
Compartment,Event
public class Entity extends java.lang.Object implements java.lang.Comparable<Entity>
A reactome basic entity (e.g. anything in reactome database derives fro this object)- Author:
- pcingola
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntity.TransferFunction
-
Field Summary
Fields Modifier and Type Field Description static doubleBETAprotected Compartmentcompartmentstatic booleandebugprotected doublefixedOutputprotected java.util.HashSet<java.lang.String>geneIdsprotected intidprotected java.lang.Stringnameprotected doubleoutputstatic Entity.TransferFunctionTRANSFER_FUNCTIONprotected doubleweight
-
Constructor Summary
Constructors Constructor Description Entity(int id, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGeneId(java.lang.String geneId)Add a geneIddoublecalc()doublecalc(java.util.HashSet<Entity> doneEntities)Calculate entities.intcompareTo(Entity e)CompartmentgetCompartment()java.util.Collection<java.lang.String>getGeneIds()intgetId()java.lang.StringgetName()doublegetOutput()doublegetWeight()booleanhasOutput()booleanisFixed()booleanisReaction()voidreset()voidsetCompartment(Compartment compartment)voidsetFixedOutput(double fixedOutput)voidsetWeight(double weight)java.lang.StringtoString()java.lang.StringtoString(int tabs, java.util.HashSet<Entity> done)java.lang.StringtoStringSimple()protected doubletransferFunction(double x)Transfer function
-
-
-
Field Detail
-
debug
public static boolean debug
-
TRANSFER_FUNCTION
public static Entity.TransferFunction TRANSFER_FUNCTION
-
BETA
public static double BETA
-
id
protected int id
-
name
protected java.lang.String name
-
compartment
protected Compartment compartment
-
output
protected double output
-
weight
protected double weight
-
fixedOutput
protected double fixedOutput
-
geneIds
protected java.util.HashSet<java.lang.String> geneIds
-
-
Method Detail
-
addGeneId
public void addGeneId(java.lang.String geneId)
Add a geneId- Parameters:
geneId-
-
calc
public double calc()
-
calc
public double calc(java.util.HashSet<Entity> doneEntities)
Calculate entities. Make sure we don't calculate twice (keep 'doneEntities' set up to date)- Parameters:
doneEntities-- Returns:
-
compareTo
public int compareTo(Entity e)
- Specified by:
compareToin interfacejava.lang.Comparable<Entity>
-
getCompartment
public Compartment getCompartment()
-
getGeneIds
public java.util.Collection<java.lang.String> getGeneIds()
-
getId
public int getId()
-
getName
public java.lang.String getName()
-
getOutput
public double getOutput()
-
getWeight
public double getWeight()
-
hasOutput
public boolean hasOutput()
-
isFixed
public boolean isFixed()
-
isReaction
public boolean isReaction()
-
reset
public void reset()
-
setCompartment
public void setCompartment(Compartment compartment)
-
setFixedOutput
public void setFixedOutput(double fixedOutput)
-
setWeight
public void setWeight(double weight)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(int tabs, java.util.HashSet<Entity> done)
-
toStringSimple
public java.lang.String toStringSimple()
-
transferFunction
protected double transferFunction(double x)
Transfer function- Parameters:
x-- Returns:
-
-