revised shmr service
[jalview.git] / src / jalview / ws / rest / RestClient.java
index 04c9561..df9050b 100644 (file)
@@ -175,14 +175,17 @@ public class RestClient extends WSClient implements WSClientI,
    */
   protected boolean isAlignmentModified()
   {
-    if (undoredo == null)
+    if (undoredo == null || av==null || av.getAlignment()==null)
     {
+      // always return modified if we don't have access to live GUI elements anymore.
       return true;
     }
     if (av.isUndoRedoHashModified(undoredo))
     {
-
+      // alignment has been modified in some way. 
+      return true;
     }
+    // TODO: look deeper into modification of selection state, etc that may affect RestJobThread.realiseResults(boolean merge); 
     return false;
 
   }
@@ -278,7 +281,7 @@ public class RestClient extends WSClient implements WSClientI,
 
   public static RestClient makeShmmrRestClient()
   {
-    String action = "Analyse", description = "Sequence Harmony and Multi-Relief", name = "SHMR";
+    String action = "Analyse", description = "Sequence Harmony and Multi-Relief (UNSTABLE!)", name = "Sequence Harmony";
     Hashtable<String, InputType> iparams = new Hashtable<String, InputType>();
     jalview.ws.rest.params.JobConstant toolp;
     //toolp = new jalview.ws.rest.JobConstant("tool","jalview");
@@ -293,10 +296,13 @@ public class RestClient extends WSClient implements WSClientI,
     iparams.put(toolp.token, toolp);
     
     jalview.ws.rest.params.Alignment aliinput = new jalview.ws.rest.params.Alignment();
-    aliinput.token = "ali_file";
-    aliinput.writeAsFile=true;
-    iparams.put("ali_file", aliinput);
+    aliinput.token = "ali";//_file";
+    aliinput.writeAsFile=false;//true;
+    //aliinput.token = "ali_file";
+    //aliinput.writeAsFile=true;
+    iparams.put(aliinput.token, aliinput);
     jalview.ws.rest.params.SeqGroupIndexVector sgroups = new jalview.ws.rest.params.SeqGroupIndexVector();
+    sgroups.minsize=2;
     iparams.put("groups", sgroups);
     sgroups.token = "groups";
     sgroups.sep = " ";