int column;
int aaMax = aa_annotations.length - 1;
+
+ /**
+ * TODO Should really set this using a constant local to AlignmentAnnotation
+ * in the same way as the cDNA and rna structure profiles are typed
+ */
+ boolean _aa_is_dssp3 = _aa.autoCalculated && _aa.label
+ .startsWith(Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL);
+
while (x < eRes - sRes)
{
column = sRes + x;
// just try to draw the logo if profl is not null
if (profl != null && profl[2] != 0)
{
+ // TODO do we ever have different profiles for different columns ? Move up to where we set _aa_is_dssp3
boolean isStructureProfile = profl[0] == AlignmentAnnotation.STRUCTURE_PROFILE;
boolean isCdnaProfile = profl[0] == AlignmentAnnotation.CDNA_PROFILE;
float ht = normaliseProfile ? y - _aa.graphHeight : y1;
.codonTranslate(s);
colour = profcolour.findColour(codonTranslation.charAt(0),
column, null);
- }
- if(_aa.label.startsWith(Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL)) {
+ } else if(_aa_is_dssp3) {
+ // TODO - would be nice to get rid of the special 'findSSColour' here ?
colour = profcolour.findSSColour(dc[0], column);
}
else
{
-
colour = profcolour.findColour(dc[0], column, null);
-
}
g.setColor(colour == Color.white ? Color.lightGray : colour);