Package org.biojava.bio.dp.twohead
Class EmissionCache
java.lang.Object
org.biojava.bio.dp.twohead.EmissionCache
- All Implemented Interfaces:
Serializable
Cache for columns of emission probabilities in pair-wise alignment
algorithms.
- Author:
- Matthew Pocock, David Huen (fixes for magical state)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
final double[]
getEmissions
(List symList) final double[]
getEmissions
(List symList, boolean exorcise) Retrieve the emission scores from the cache for every EmissionState for the specified symbols.
-
Constructor Details
-
EmissionCache
-
-
Method Details
-
getEmissions
- Throws:
IllegalSymbolException
-
getEmissions
Retrieve the emission scores from the cache for every EmissionState for the specified symbols. The scores will be computed and cached if not already available.The correct behaviour should be to exclude emission from the MagicalState except at the origin and bottom-right of the DP matrix. As such, the emission vector is only cached when it it is computed for exorcise set to true. The vector is computed afresh every time when exorcise is false. it should be noted that if exorcise is NOT set to false with the emission vector at the ends of the matrix, the model will fail as the start and and end transitions become impossible.
- Parameters:
symList
- a list of the symbols in each head that require a lookup for emission probabilities.exorcise
- Prevents emission from the MagicalState.- Throws:
IllegalSymbolException
-
clear
-