Package org.biopax.paxtools.controller
Class Integrator
java.lang.Object
org.biopax.paxtools.controller.Integrator
This class is intended to merge and to integrate BioPAX Level2 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the threshold value (the smallest score for integrating two conversions)Integrates target and source(s) and returns a sorted (desc) list of conversion scores.integrate(List<ConversionScore> alternativeScores) Does the integration using user-provided scores list.voidsetNormalizeModels(boolean normalizeModels) Fixes some of the known Open Controlled Vocabullary issues in the models.voidsetOnlyMapping(boolean mapping) Enables/disables integration.voidsetScoresOver(double scoresOver) A score between two conversions is in the interval (0, 1].voidsetSelfRemove(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.voidsetThreshold(Double threshold) Sets the threshold value (the smallest score for integrating two conversions)
-
Constructor Details
-
Integrator
- Parameters:
editorMap- map to be used in order to initialize mergertarget- target model into which integration will be donesources- targets that are going to be integrated into target- See Also:
-
-
Method Details
-
setThreshold
Sets the threshold value (the smallest score for integrating two conversions)- Parameters:
threshold- value- See Also:
-
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:
-
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
Integrates target and source(s) and returns a sorted (desc) list of conversion scores.- Returns:
- a sorted list of ConversionScores
- See Also:
-
integrate
Does the integration using user-provided scores list.- Parameters:
alternativeScores- alternative scores, can be null- Returns:
- a sorted list of ConversionScores
- See Also:
-