JAL-2939 check for hmm present when processing groups
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 14 May 2018 08:17:37 +0000 (09:17 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 14 May 2018 08:17:37 +0000 (09:17 +0100)
src/jalview/workers/InformationThread.java

index d719189..d35025b 100644 (file)
@@ -212,10 +212,13 @@ public class InformationThread extends AlignCalcWorker
     for (SequenceGroup group : alignment.getGroups())
     {
       hmmSeqs = group.getHmmSequences();
-      ProfilesI profiles = group.getHmmProfiles();
-      float m = updateInformationAnnotation(hmmSeqs.get(0), profiles, group,
-              infos);
-      maxInformation = Math.max(maxInformation, m);
+      if (!hmmSeqs.isEmpty())
+      {
+        ProfilesI profiles = group.getHmmProfiles();
+        float m = updateInformationAnnotation(hmmSeqs.get(0), profiles,
+                group, infos);
+        maxInformation = Math.max(maxInformation, m);
+      }
     }
 
     /*