Map<Character, Double> backgroundFrequencies = new HashMap();
+ ProfilesI profiles;
+
final static String YES = "yes";
return value;
}
- public char getConsensus(int columnIndex)
+ public char getConsensusAtAlignColumn(int columnIndex)
{
char value;
Integer index = findNodeIndex(columnIndex + 1);
{
Annotation[] annotations = new Annotation[length];
float max = 0f;
- for (int i = 0; i < length; i++)
+ for (int alignPos = 0; alignPos < length; alignPos++)
{
- Float content = getInformationContent(i);
+ Float content = getInformationContent(alignPos);
if (content > max)
{
max = content;
}
+
+ Character cons;
+ cons = getConsensusAtAlignColumn(alignPos);
+ cons = Character.toUpperCase(cons);
+
String description = String.format("%.3f", content);
description += " bits";
- annotations[i] = new Annotation(null, description, ' ', content);
+ annotations[alignPos] = new Annotation(cons.toString(), description,
+ ' ',
+ content);
}
AlignmentAnnotation annotation = new AlignmentAnnotation(
return informationContent;
}
+
}