JAL-2629 fix for addHMMConsensus failing if no HMM sequences found
authortzvanaalten <tzvanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Wed, 23 Aug 2017 14:36:07 +0000 (15:36 +0100)
committertzvanaalten <tzvanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Wed, 23 Aug 2017 14:36:07 +0000 (15:36 +0100)
src/jalview/hmmer/HMMERCommands.java

index 6a538fc..913eee8 100644 (file)
@@ -160,6 +160,10 @@ public class HMMERCommands
   public void addHMMConsensusSequences(AlignFrame af)
   {
     AlignmentI al = af.getViewport().getAlignment();
+    if (hmmSeqs == null || hmmSeqs.size() < 1)
+    {
+      return;
+    }
     for (SequenceI seq : hmmSeqs)
     {
       Integer position = seq.getPreviousPosition();
@@ -169,6 +173,7 @@ public class HMMERCommands
     af.alignPanel.adjustAnnotationHeight();
     af.getViewport().updateSequenceIdColours();
     af.buildSortByAnnotationScoresMenu();
+    af.getViewport().initInformation();
   }
 
   /**