*/
public static ProfilesI calculateHMMProfiles(final HiddenMarkovModel hmm,
int width, int start, int end, boolean saveFullProfile,
- boolean removeBelowBackground)
+ boolean removeBelowBackground, boolean infoLetterHeight)
{
ProfileI[] result = new ProfileI[width];
int symbolCount = hmm.getNumberOfSymbols();
for (char symbol : hmm.getSymbols())
{
int value = getAnalogueCount(hmm, column, symbol,
- removeBelowBackground);
+ removeBelowBackground, infoLetterHeight);
counts.put(symbol, value);
}
int maxCount = counts.getModalCount();
* @param nseq
* number of sequences
*/
- public static void completeInformation(AlignmentAnnotation information,
- ProfilesI profiles, int startCol, int endCol,
- boolean ignoreBelowBackground,
- boolean showSequenceLogo, long nseq)
+ public static float completeInformation(AlignmentAnnotation information,
+ ProfilesI profiles, int startCol, int endCol, long nseq,
+ Float currentMax)
{
// long now = System.currentTimeMillis();
if (information == null || information.annotations == null
* called with a bad alignment annotation row
* wait for it to be initialised properly
*/
- return;
+ return 0;
}
Float max = 0f;
* shorter than alignment width
*/
information.annotations[i] = null;
- return;
+ return 0;
}
HiddenMarkovModel hmm;
.toUpperCase(hmm.getConsensusAtAlignColumn(i))),
description, ' ', value);
}
- information.graphMax = max;
- // long elapsed = System.currentTimeMillis() - now;
- // System.out.println(-elapsed);
+ if (max > currentMax)
+ {
+ information.graphMax = max;
+ return max;
+ }
+ else
+ {
+ information.graphMax = currentMax;
+ return currentMax;
+ }
}
/**
* @return
*/
public static int[] extractHMMProfile(HiddenMarkovModel hmm, int column,
- boolean removeBelowBackground)
+ boolean removeBelowBackground, boolean infoHeight)
{
if (hmm != null)
char symbol = charList.get(i);
symbols[i] = symbol;
int value = getAnalogueCount(hmm, column, symbol,
- removeBelowBackground);
+ removeBelowBackground, infoHeight);
values[i] = value;
totalCount += value;
}
* @return
*/
static int getAnalogueCount(HiddenMarkovModel hmm, int column,
- char symbol, boolean removeBelowBackground)
+ char symbol, boolean removeBelowBackground, boolean infoHeight)
{
Double value;
return 0;
}
+ if (infoHeight)
+ {
+ value = value * (Math.log(value / freq) / Math.log(2));
+ }
+
value = value * 10000;
return Math.round(value.floatValue());
}