JAL-3878 Add annotation operations to slivka discoverer.
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Tue, 19 Oct 2021 13:40:22 +0000 (15:40 +0200)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Tue, 19 Oct 2021 13:40:22 +0000 (15:40 +0200)
src/jalview/ws2/slivka/SlivkaWSDiscoverer.java

index b55035b..c0c7502 100644 (file)
@@ -9,6 +9,7 @@ import java.util.concurrent.*;
 import jalview.bin.Cache;
 import jalview.ws2.*;
 import jalview.ws2.operations.AlignmentOperation;
+import jalview.ws2.operations.AnnotationOperation;
 import jalview.ws2.operations.Operation;
 import uk.ac.dundee.compbio.slivkaclient.SlivkaClient;
 import uk.ac.dundee.compbio.slivkaclient.SlivkaService;
@@ -166,11 +167,26 @@ public class SlivkaWSDiscoverer implements WebServiceDiscoverer
             Operation op = null;
             switch (path[path.length - 1].toLowerCase())
             {
+            case "sequence alignment analysis (conservation)":
+              AnnotationOperation anop;
+              op = anop = new AnnotationOperation(instance,
+                  instance::getAnnotations, instance::getFeaturesFile, "Conservation");
+              anop.setAlignmentAnalysis(true);
+              anop.setInteractive(true);
+              break;
+            case "protein sequence analysis":
+              op = new AnnotationOperation(instance, instance::getAnnotations,
+                  instance::getFeaturesFile, "Protein Disorder");
+              break;
             case "multiple sequence alignment":
               op = new AlignmentOperation(instance, instance::getAlignment);
+              break;
             }
             if (op != null)
+            {
               instance.addOperation(op);
+              break;
+            }
           }
         }
         if (instance.operations.size() > 0)