{
ProfileI[] result = new ProfileI[width];
int symbolCount = hmm.getNumberOfSymbols();
- String alph = hmm.getAlphabetType();
for (int column = start; column < end; column++)
{
ResidueCount counts = new ResidueCount();
for (char symbol : hmm.getSymbols())
{
- int value = getAnalogueCount(hmm, column, removeBelowBackground,
- alph, symbol);
+ int value = getAnalogueCount(hmm, column, symbol,
+ removeBelowBackground);
counts.put(symbol, value);
}
int maxCount = counts.getModalCount();
if (hmm != null)
{
- String alph = hmm.getAlphabetType();
int size = hmm.getNumberOfSymbols();
char symbols[] = new char[size];
int values[] = new int[size];
{
char symbol = charList.get(i);
symbols[i] = symbol;
- int value = getAnalogueCount(hmm, column, removeBelowBackground,
- alph, symbol);
+ int value = getAnalogueCount(hmm, column, symbol,
+ removeBelowBackground);
values[i] = value;
totalCount += value;
}
* @param hmm
* @param column
* @param removeBelowBackground
- * @param alph
- * The alphabet the HMM is based on
+ * When true, this method returns 0 for any symbols with a match
+ * emission probability less than the background frequency.
* @param symbol
* @return
*/
- private static int getAnalogueCount(HiddenMarkovModel hmm, int column,
- boolean removeBelowBackground, String alph, char symbol)
+ static int getAnalogueCount(HiddenMarkovModel hmm, int column,
+ char symbol, boolean removeBelowBackground)
{
Double value;
value = hmm.getMatchEmissionProbability(column, symbol);
double freq;
- freq = ResidueProperties.backgroundFrequencies.get(alph).get(symbol);
+ freq = ResidueProperties.backgroundFrequencies
+ .get(hmm.getAlphabetType()).get(symbol);
if (value < freq && removeBelowBackground)
{
return 0;