Submissions for secondary structure prediction are now filtered to remove empty seque... vamsasDemo
authorjprocter <Jim Procter>
Wed, 7 Dec 2005 16:37:26 +0000 (16:37 +0000)
committerjprocter <Jim Procter>
Wed, 7 Dec 2005 16:37:26 +0000 (16:37 +0000)
src/jalview/gui/AlignFrame.java

index 8c31ed0..81e5564 100755 (executable)
@@ -2208,7 +2208,16 @@ public class AlignFrame
   {\r
     SequenceI seq = null;\r
     SequenceI[] msa = null;\r
+/*\r
+         if (predictindex==-1) {\r
 \r
+          JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+                                                "The alignment contains no columns or residues usable for prediction!",\r
+                                                "Invalid Alignment Selection", JOptionPane.WARNING_MESSAGE);\r
+          this.\r
+          return;\r
+        }\r
+*/\r
     if ( (viewport.getSelectionGroup() != null) &&\r
         (viewport.getSelectionGroup().getSize() > 0))\r
     {\r
@@ -2439,7 +2448,18 @@ public class AlignFrame
           {\r
             public void actionPerformed(ActionEvent e)\r
             {\r
-              SequenceI[] msa = gatherSeqOrMsaForSecStrPrediction();\r
+              SequenceI[] msa = SeqsetUtils.getNonEmptySequenceSet(gatherSeqOrMsaForSecStrPrediction());\r
+              if (msa==null) {\r
+                JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+                    "There are no columns or residues usable for prediction!\n"\r
+                    +"There must be valid residues in at least one\n"\r
+                    +"of the sequences in the alignment,\n"\r
+                    +"or in the currently selected region.",\r
+                    "Invalid Input for Secondary Structure Prediction",\r
+                    JOptionPane.WARNING_MESSAGE);\r
+                return;\r
+              }\r
+\r
               if (msa.length == 1)\r
               {\r
                 // Single Sequence prediction\r
@@ -2449,7 +2469,7 @@ public class AlignFrame
               {\r
                 if (msa.length > 1)\r
                 {\r
-                  // Single Sequence prediction\r
+                  // Aligned Sequences prediction\r
                   jalview.ws.JPredClient ct = new jalview.ws.JPredClient(sh,\r
                       title, msa);\r
                 }\r