X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=81e55644b6b34e941aa0fc24f6970fd085d1dc30;hb=refs%2Fheads%2FvamsasDemo;hp=8c31ed0df7734b0f317e24409177a1455f4dc221;hpb=91d9dd665cd82447439e23df334a59e93647a8d0;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 8c31ed0..81e5564 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2208,7 +2208,16 @@ public class AlignFrame { SequenceI seq = null; SequenceI[] msa = null; +/* + if (predictindex==-1) { + JOptionPane.showInternalMessageDialog(Desktop.desktop, + "The alignment contains no columns or residues usable for prediction!", + "Invalid Alignment Selection", JOptionPane.WARNING_MESSAGE); + this. + return; + } +*/ if ( (viewport.getSelectionGroup() != null) && (viewport.getSelectionGroup().getSize() > 0)) { @@ -2439,7 +2448,18 @@ public class AlignFrame { public void actionPerformed(ActionEvent e) { - SequenceI[] msa = gatherSeqOrMsaForSecStrPrediction(); + SequenceI[] msa = SeqsetUtils.getNonEmptySequenceSet(gatherSeqOrMsaForSecStrPrediction()); + if (msa==null) { + JOptionPane.showInternalMessageDialog(Desktop.desktop, + "There are no columns or residues usable for prediction!\n" + +"There must be valid residues in at least one\n" + +"of the sequences in the alignment,\n" + +"or in the currently selected region.", + "Invalid Input for Secondary Structure Prediction", + JOptionPane.WARNING_MESSAGE); + return; + } + if (msa.length == 1) { // Single Sequence prediction @@ -2449,7 +2469,7 @@ public class AlignFrame { if (msa.length > 1) { - // Single Sequence prediction + // Aligned Sequences prediction jalview.ws.JPredClient ct = new jalview.ws.JPredClient(sh, title, msa); }