*/
package jalview.schemes;
+import jalview.datamodel.ProfileI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.util.Comparison;
c -= ('a' - 'A');
}
- if (consensus == null || j >= consensus.length || consensus[j] == null)
+ if (consensus == null || consensus.get(j) == null)
{
return Color.white;
}
double sc = 0;
- if (consensus.length <= j)
- {
- return Color.white;
- }
/*
* test whether this is the consensus (or joint consensus) residue
*/
- boolean matchesConsensus = consensus[j].getModalResidue().contains(
+ ProfileI profile = consensus.get(j);
+ boolean matchesConsensus = profile.getModalResidue().contains(
String.valueOf(c));
if (matchesConsensus)
{
- sc = consensus[j].getPercentageIdentity(ignoreGaps);
+ sc = profile.getPercentageIdentity(ignoreGaps);
if (!Comparison.isGap(c))
{