JAL-2629 adjust placement and optionality of arguments/options
[jalview.git] / src / jalview / schemes / HmmerColourScheme.java
index 9ea468d..0f81ec1 100644 (file)
@@ -8,6 +8,7 @@ import jalview.util.ColorUtils;
 import jalview.util.Comparison;
 
 import java.awt.Color;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -45,15 +46,15 @@ public abstract class HmmerColourScheme extends ResidueColourScheme
   private Map<Character, Float> frequencies;
 
   /**
-   * Constructor given a Hidden Markov Model consensus sequence. This provides
-   * the HMM profile from which we can read the emission probabilities that
-   * determine the colour.
+   * Constructor given a list of Hidden Markov Model consensus sequences. The
+   * first sequence provides the HMM profile from which we can read the emission
+   * probabilities that determine the colour.
    * 
-   * @param consensusSeq
+   * @param hmmSeqs
    */
-  public HmmerColourScheme(SequenceI consensusSeq)
+  public HmmerColourScheme(List<SequenceI> hmmSeqs)
   {
-    hmmSeq = consensusSeq;
+    hmmSeq = hmmSeqs.isEmpty() ? null : hmmSeqs.get(0);
     hmm = hmmSeq == null ? null : hmmSeq.getHMM();
   }
 
@@ -171,7 +172,7 @@ public abstract class HmmerColourScheme extends ResidueColourScheme
   @Override
   public boolean isApplicableTo(AnnotatedCollectionI ac)
   {
-    return ac.getHmmConsensus() != null;
+    return !ac.getHmmSequences().isEmpty();
   }
 
   protected Map<Character, Float> getFrequencies()