From: jprocter Date: Wed, 7 Dec 2005 16:37:26 +0000 (+0000) Subject: Submissions for secondary structure prediction are now filtered to remove empty seque... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FvamsasDemo;p=jalview.git Submissions for secondary structure prediction are now filtered to remove empty sequences and user is informed if no non-empty sequences exist. --- 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); }