* the consensus data for each column
*/
private ProfilesI consensus;
+
+ /*
+ * the consensus data for each column
+ */
+ private ProfilesI ssConsensus;
+
+
+ public ProfilesI getSsConsensus()
+ {
+ return ssConsensus;
+ }
+
+ public void setSsConsensus(ProfilesI ssConsensus)
+ {
+ this.ssConsensus = ssConsensus;
+ }
/*
* if true, apply shading of colour by conservation
this.conservationIncrement = rs.conservationIncrement;
this.ignoreGaps = rs.ignoreGaps;
this.pidThreshold = rs.pidThreshold;
+ this.ssConsensus = rs.ssConsensus;
}
/**
public void setConsensus(ProfilesI cons)
{
consensus = cons;
+
}
/**
return colour;
}
+
+ @Override
+ public Color findSSColour(char symbol, int position, SequenceI seq)
+ {
+ if (colourScheme == null)
+ {
+ return Color.white; // Colour is 'None'
+ }
+
+ /*
+ * get 'base' colour
+ */
+ ProfileI profile = ssConsensus == null ? null : ssConsensus.get(position);
+ String modalSS = profile == null ? null
+ : profile.getModalSS();
+ float pid = profile == null ? 0f
+ : profile.getSSPercentageIdentity(ignoreGaps);
+ Color colour = colourScheme.findColour(symbol, position, seq,
+ modalSS, pid);
+
+ /*
+ * apply PID threshold and consensus fading if in force
+ */
+ if (!Comparison.isGap(symbol))
+ {
+ colour = adjustColour(symbol, position, colour);
+ }
+
+ return colour;
+ }
/**
* Adjusts colour by applying thresholding or conservation shading, if in