package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
+import jalview.datamodel.SequenceCollectionI;
/**
* An HMM colour scheme that uses global ('Uniprot') background frequencies for
private static final float MAX_LOG_RATIO = 4.519f;
/**
- * Constructor given a Hidden Markov Model
+ * Constructor given a sequence collection
*
- * @param markov
+ * @param ac
*/
- public HmmerGlobalBackground(AnnotatedCollectionI ac)
+ public HmmerGlobalBackground(SequenceCollectionI ac)
{
- super(ac.getHmmConsensus());
+ super(ac.getHmmSequences());
String alphabetType = getHmm() == null
? ResidueProperties.ALPHABET_AMINO
: getHmm().getAlphabetType();
return MAX_LOG_RATIO;
}
+ /**
+ * Answers a new colour scheme instance based on the HMM of the first sequence
+ * in alignment that has an HMM
+ */
+ @Override
+ public ColourSchemeI getInstance(AlignViewportI viewport,
+ AnnotatedCollectionI ac)
+ {
+ return newInstance(ac);
+ }
+
}