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 class
Entity.TransferFunction
-
Field Summary
Fields Modifier and Type Field Description static double
BETA
protected Compartment
compartment
static boolean
debug
protected double
fixedOutput
protected java.util.HashSet<java.lang.String>
geneIds
protected int
id
protected java.lang.String
name
protected double
output
static Entity.TransferFunction
TRANSFER_FUNCTION
protected double
weight
-
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 void
addGeneId(java.lang.String geneId)
Add a geneIddouble
calc()
double
calc(java.util.HashSet<Entity> doneEntities)
Calculate entities.int
compareTo(Entity e)
Compartment
getCompartment()
java.util.Collection<java.lang.String>
getGeneIds()
int
getId()
java.lang.String
getName()
double
getOutput()
double
getWeight()
boolean
hasOutput()
boolean
isFixed()
boolean
isReaction()
void
reset()
void
setCompartment(Compartment compartment)
void
setFixedOutput(double fixedOutput)
void
setWeight(double weight)
java.lang.String
toString()
java.lang.String
toString(int tabs, java.util.HashSet<Entity> done)
java.lang.String
toStringSimple()
protected double
transferFunction(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:
compareTo
in 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:
toString
in 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:
-
-