org.biopax.paxtools.controller
Class Integrator

java.lang.Object
  extended by org.biopax.paxtools.controller.Integrator

public class Integrator
extends java.lang.Object

This class is intended to merge and to integrate biopax models not necessarily from the same resource - if models allow such a thing. This class has very similar functionality to the controller.Merger but it differs in means of merging/integrating methodology. Integrator iterates all the conversions in from the target and source model(s), and assigns scores indicating their similarity. After the scoring process is completed, it then starts integrating conversions having the highest score until it reaches the threshold value. After this conversion based integration is accomplished, all the models are merged into the target. Please note that this class is in its beta state.


Constructor Summary
Integrator(EditorMap editorMap, Model target, Model... sources)
           
 
Method Summary
 java.lang.Double getThreshold()
          Returns the threshold value (the smallest score for integrating two conversions)
 java.util.List<ConversionScore> integrate()
          Integrates target and source(s) and returns a sorted (desc) list of conversion scores.
 java.util.List<ConversionScore> integrate(java.util.List<ConversionScore> alternativeScores)
          Does the integration using user-provided scores list.
 void setNormalizeModels(boolean normalizeModels)
          Fixes some of the known Open Controlled Vocabullary issues in the models.
 void setOnlyMapping(boolean mapping)
          Enables/disables integration.
 void setScoresOver(double scoresOver)
          A score between two conversions is in the interval (0, 1].
 void setSelfRemove(boolean selfRemove)
          Enables removal of elements from the target if they are contained both in source and target, and have a match with another conversion.
 void setThreshold(java.lang.Double threshold)
          Sets the threshold value (the smallest score for integrating two conversions)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Integrator

public Integrator(EditorMap editorMap,
                  Model target,
                  Model... sources)
Parameters:
editorMap - map to be used in order to initialize merger
target - target model into which integration will be done
sources - targets that are going to be integrated into target
See Also:
Merger
Method Detail

setThreshold

public void setThreshold(java.lang.Double threshold)
Sets the threshold value (the smallest score for integrating two conversions)

Parameters:
threshold - value
See Also:
setScoresOver(double)

getThreshold

public java.lang.Double getThreshold()
Returns the threshold value (the smallest score for integrating two conversions)

Returns:
a double value (default: 100.0)

setOnlyMapping

public void setOnlyMapping(boolean mapping)
Enables/disables integration. If only mapping feature is set to true, integrator will only assign scores to conversion and exits. This option may help to build interactive programs.

Parameters:
mapping - true for skipping integration
See Also:
integrate()

setSelfRemove

public void setSelfRemove(boolean selfRemove)
Enables removal of elements from the target if they are contained both in source and target, and have a match with another conversion. Useful for integrating of a model by itself. Default is false.

Parameters:
selfRemove - true for enabling removal, false otherwise

setNormalizeModels

public void setNormalizeModels(boolean normalizeModels)
Fixes some of the known Open Controlled Vocabullary issues in the models. It is best to try integration with this option enabled (true) and disabled (false) to see which gives a better result. Default is false.

Parameters:
normalizeModels - true for normalization of OCVs

setScoresOver

public void setScoresOver(double scoresOver)
A score between two conversions is in the interval (0, 1]. Setting a scoresOver value will the map this range to (0, scoresOver]. Default value is 100.0, so the default score range is (0,100]. This setting does not alter the integration process. It only multiplies the scores with the given value.

Parameters:
scoresOver - a double score

integrate

public java.util.List<ConversionScore> integrate()
Integrates target and source(s) and returns a sorted (desc) list of conversion scores.

Returns:
a sorted list of ConversionScores
See Also:
setNormalizeModels(boolean), setOnlyMapping(boolean), setScoresOver(double), setSelfRemove(boolean), setThreshold(Double)

integrate

public java.util.List<ConversionScore> integrate(java.util.List<ConversionScore> alternativeScores)
Does the integration using user-provided scores list.

Parameters:
alternativeScores - alternative scores, can be null
Returns:
a sorted list of ConversionScores
See Also:
integrate()


Copyright © 2011 BioPAX. All Rights Reserved.