package jalview.schemes;
import jalview.analysis.Conservation;
-import jalview.analysis.Profile;
import jalview.datamodel.AnnotatedCollectionI;
+import jalview.datamodel.ProfileI;
+import jalview.datamodel.ProfilesI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
import jalview.util.ColorUtils;
/*
* Consensus data indexed by column
*/
- Profile[] consensus;
+ ProfilesI consensus;
/*
* Conservation string as a char array
residue -= ('a' - 'A');
}
- if (consensus == null || consensus.length < column
- || consensus[column] == null)
+ if (consensus == null)
{
return false;
}
+ ProfileI profile = consensus.get(column);
+
/*
* test whether this is the consensus (or joint consensus) residue
*/
- if (consensus[column].getModalResidue().contains(
- String.valueOf(residue)))
+ if (profile != null
+ && profile.getModalResidue().contains(String.valueOf(residue)))
{
- if (consensus[column].getPercentageIdentity(ignoreGaps) >= threshold)
+ if (profile.getPercentageIdentity(ignoreGaps) >= threshold)
{
return true;
}
* DOCUMENT ME!
*/
@Override
- public void setConsensus(Profile[] consensus)
+ public void setConsensus(ProfilesI consensus)
{
if (consensus == null)
{