import java.awt.event.*;\r
\r
import java.util.*;\r
+import javax.swing.JOptionPane;\r
\r
\r
/**\r
*/\r
public void run()\r
{\r
- pca = new PCA(seqs);\r
- pca.run();\r
-\r
- // Now find the component coordinates\r
- int ii = 0;\r
-\r
- while ((ii < seqs.length) && (seqs[ii] != null))\r
- {\r
- ii++;\r
- }\r
-\r
- double[][] comps = new double[ii][ii];\r
-\r
- for (int i = 0; i < ii; i++)\r
- {\r
- if (pca.getEigenvalue(i) > 1e-4)\r
- {\r
- comps[i] = pca.component(i);\r
- }\r
- }\r
-\r
- //////////////////\r
- xCombobox.setSelectedIndex(0);\r
- yCombobox.setSelectedIndex(1);\r
- zCombobox.setSelectedIndex(2);\r
-\r
- top = pca.getM().rows - 1;\r
-\r
- Vector points = new Vector();\r
- float[][] scores = pca.getComponents(top - 1, top - 2, top - 3, 100);\r
-\r
- for (int i = 0; i < pca.getM().rows; i++)\r
- {\r
- SequencePoint sp = new SequencePoint(seqs[i], scores[i]);\r
- points.addElement(sp);\r
- }\r
-\r
- rc.setPoints(points, pca.getM().rows);\r
- rc.repaint();\r
- seqs = null;\r
+ try{\r
+ pca = new PCA(seqs);\r
+ pca.run();\r
+\r
+ // Now find the component coordinates\r
+ int ii = 0;\r
+\r
+ while ( (ii < seqs.length) && (seqs[ii] != null))\r
+ {\r
+ ii++;\r
+ }\r
+\r
+ double[][] comps = new double[ii][ii];\r
+\r
+ for (int i = 0; i < ii; i++)\r
+ {\r
+ if (pca.getEigenvalue(i) > 1e-4)\r
+ {\r
+ comps[i] = pca.component(i);\r
+ }\r
+ }\r
+\r
+ //////////////////\r
+ xCombobox.setSelectedIndex(0);\r
+ yCombobox.setSelectedIndex(1);\r
+ zCombobox.setSelectedIndex(2);\r
+\r
+ top = pca.getM().rows - 1;\r
+\r
+ Vector points = new Vector();\r
+ float[][] scores = pca.getComponents(top - 1, top - 2, top - 3, 100);\r
+\r
+ for (int i = 0; i < pca.getM().rows; i++)\r
+ {\r
+ SequencePoint sp = new SequencePoint(seqs[i], scores[i]);\r
+ points.addElement(sp);\r
+ }\r
+\r
+ rc.setPoints(points, pca.getM().rows);\r
+ rc.repaint();\r
+ seqs = null;\r
+ }\r
+ catch(OutOfMemoryError er)\r
+ { JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory calculating PCA!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ JOptionPane.WARNING_MESSAGE);\r
+ System.out.println("PCAPanel: "+er);\r
+\r
+ }\r
+\r
}\r
\r
/**\r
{\r
}\r
}\r
+ catch (OutOfMemoryError er)\r
+ {\r
+ jobComplete = true;\r
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory handling result!!"\r
+ +\r
+ "\nSee help files for increasing Java Virtual Machine memory."\r
+ , "Out of memory",\r
+ JOptionPane.WARNING_MESSAGE);\r
+ System.out.println("JPredClient: "+er);\r
+ }\r
}\r
if (result!=null)\r
if (! (result.isJobFailed() || result.isServerError()))\r
{\r
if (result.getStatus() != null)\r
{\r
- wsInfo.setProgressText(OutputHeader + "\n" +\r
- result.getStatus());\r
+ System.out.println("result "+result.getStatus().length());\r
+ wsInfo.setProgressText(OutputHeader + "\n" );\r
+ // result.getStatus());\r
}\r
if (result.isServerError())\r
{\r
{\r
}\r
}\r
+ catch(OutOfMemoryError er)\r
+ {\r
+ jobComplete = true;\r
+ wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR);\r
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+ "Out of memory handling result!!"\r
+ +"\nSee help files for increasing Java Virtual Machine memory."\r
+ ,"Out of memory", JOptionPane.WARNING_MESSAGE );\r
+ System.out.println("MsaWSClient: "+er);\r
+ }\r
}\r
\r
if (allowedServerExceptions == 0)\r
\r
if (result.getStatus() != null)\r
{\r
- OutputHeader += ("\n" + result.getStatus());\r
+ System.out.println("get status " +result.getStatus().length());\r
+ // OutputHeader += ("\n" + result.getStatus());\r
}\r
\r
if (result.getMsa() != null)\r
{\r
- OutputHeader += "\nAlignment Object Method Notes\n";\r
+ System.out.println("get msa");\r
+ // OutputHeader += "\nAlignment Object Method Notes\n";\r
\r
String[] lines = result.getMsa().getMethod();\r
\r
+System.out.println("lines "+lines.length);\r
for (int line = 0; line < lines.length; line++)\r
{\r
- OutputHeader += (lines[line] + "\n");\r
+ // OutputHeader += (lines[line] + "\n");\r
}\r
\r
// JBPNote The returned files from a webservice could be hidden behind icons in the monitor window that, when clicked, pop up their corresponding data\r