X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fws%2FJPredClient.java;h=6fd0a4a702b638ab129dbf6400040c77dc3b8c90;hb=01cc9bf86a687fa7c8a741128264b23eb7feba9b;hp=9fe7e27aa2dc976699279ea637aca34eb912ea90;hpb=d16f364a9df0e2abe0d41889eb4b696bbeb3ca31;p=jalview.git diff --git a/src/jalview/ws/JPredClient.java b/src/jalview/ws/JPredClient.java index 9fe7e27..6fd0a4a 100755 --- a/src/jalview/ws/JPredClient.java +++ b/src/jalview/ws/JPredClient.java @@ -26,6 +26,7 @@ import ext.vamsas.*; import jalview.analysis.*; import jalview.datamodel.*; import jalview.gui.*; +import jalview.io.FormatAdapter; public class JPredClient extends WSClient @@ -56,6 +57,7 @@ public class JPredClient wsInfo = setWebService(); SequenceI seq = msf[0]; + altitle = "JNet prediction on " + seq.getName() + " using alignment from " + title; @@ -64,8 +66,10 @@ public class JPredClient AlignSeq.extractGaps("-. ", seq.getSequence()) + "\n"); SequenceI aln[] = new SequenceI[msf.length]; - for (int i=0,j=msf.length; i-1) { + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR); + wsInfo.setProgressText( + "Failed to submit the prediction. (Just close the window)\n" + + + "It is most likely that there is a problem with the server.\n"); + System.err.println( + "JPredWS Client: Failed to submit the prediction. Quite possibly because of a server error - see below)\n" + + e.getMessage() + "\n"); + + jalview.bin.Cache.log.warn("Server Exception",e); + } else { + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR); + // JBPNote - this could be a popup informing the user of the problem. + wsInfo.setProgressText("Failed to submit the prediction:\n" + +e.getMessage()+ + wsInfo.getProgressText()); + + jalview.bin.Cache.log.debug("Failed Submission",e); + + } allowedServerExceptions = -1; jobComplete = true; - wsInfo.setProgressText("Failed to submit the prediction. (Just close the window)\n" - + ((e.getMessage().indexOf("Exception")>-1) ? ( - "It is most likely that there is a problem with the server.\n") - : e.getMessage()) - +wsInfo.getProgressText()); - System.err.println( - "JPredWS Client: Failed to submit the prediction (Possibly a server error - see below)\n" + - e.getMessage() + "\n"); - - jalview.bin.Cache.log.debug("Failed Submission",e); } } - private void addFloatAnnotations(Alignment al, int[] gapmap, + /* private void addFloatAnnotations(Alignment al, int[] gapmap, Vector values, String Symname, String Visname, float min, float max, int winLength) @@ -339,7 +353,7 @@ public class JPredClient al.addAnnotation(new AlignmentAnnotation(Symname, Visname, annotations, min, max, winLength)); - } + }*/ void parseResult() { @@ -390,18 +404,19 @@ public class JPredClient if (jalview.io.FormatAdapter.formats.contains(format)) { - al = new Alignment(jalview.io.FormatAdapter.readFile( + al = new Alignment(new FormatAdapter().readFile( result.getAligfile(), "Paste", format)); + SequenceI sqs[] = new SequenceI[al.getHeight()]; for (int i=0, j=al.getHeight(); i