From d4db66b0d4d89405bc90aa999e15debc7bf85659 Mon Sep 17 00:00:00 2001 From: tzvanaalten Date: Wed, 23 Aug 2017 15:36:07 +0100 Subject: [PATCH] JAL-2629 fix for addHMMConsensus failing if no HMM sequences found --- src/jalview/hmmer/HMMERCommands.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index 6a538fc..913eee8 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -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(); } /** -- 1.7.10.2