nct.networkblast.graph.compatibility
Class AdditiveCompatibilityCalculator
java.lang.Object
nct.networkblast.graph.compatibility.AdditiveCompatibilityCalculator
- All Implemented Interfaces:
- CompatibilityCalculator
public class AdditiveCompatibilityCalculator
- extends java.lang.Object
- implements CompatibilityCalculator
This class creates the compatibility edge score by summing the edge
weights of the interaction edges that comprise the compatibility node.
Method Summary |
boolean |
calculate(Graph<java.lang.String,java.lang.Double> compatGraph,
java.util.List<? extends DistanceGraph<java.lang.String,java.lang.Double>> partitionGraphs,
java.lang.String[] nodeBase,
java.lang.String[] nodeBranch)
The method that determines which nodes to add, adds them
if appropriate, and calculates the edge score. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
orthologyThreshold
protected double orthologyThreshold
scoreModel
protected ScoreModel<java.lang.String,java.lang.Double> scoreModel
allowZero
protected boolean allowZero
AdditiveCompatibilityCalculator
public AdditiveCompatibilityCalculator(double orthologyThreshold,
ScoreModel<java.lang.String,java.lang.Double> scoreModel,
boolean allowZero)
- Parameters:
orthologyThreshold
- The orthology threshold for determining if
a compatibility edge weight is sufficient for inclusion.scoreModel
- The ScoreModel used to calculate edge weights.allowZero
- Whether or not edges of 0 distance (i.e. potential compat nodes
where a constituent node is the same for both potential compat nodes).
AdditiveCompatibilityCalculator
public AdditiveCompatibilityCalculator(double orthologyThreshold,
ScoreModel<java.lang.String,java.lang.Double> scoreModel)
- Parameters:
orthologyThreshold
- The orthology threshold for determining if
a compatibility edge weight is sufficient for inclusion.scoreModel
- The ScoreModel used to calculate edge weights.
calculate
public boolean calculate(Graph<java.lang.String,java.lang.Double> compatGraph,
java.util.List<? extends DistanceGraph<java.lang.String,java.lang.Double>> partitionGraphs,
java.lang.String[] nodeBase,
java.lang.String[] nodeBranch)
- The method that determines which nodes to add, adds them
if appropriate, and calculates the edge score.
- Specified by:
calculate
in interface CompatibilityCalculator
- Parameters:
compatGraph
- The compatibility graph that appropriate
compatibility nodes and edges are added to.partitionGraphs
- Possibly used tonodeBase
- An array of nodes from the respective
partition graphs that form a potential compatibility node.nodeBranch
- An array of nodes from the respective
partition graphs that form a potential compatibility node.