From dc2e21ef0092f0e79c1837fc76a81710bc74e3a0 Mon Sep 17 00:00:00 2001 From: Mateusz Warowny Date: Wed, 17 Nov 2021 14:08:55 +0100 Subject: [PATCH] JAL-3878 Add RNAalifold service discovery. --- .../ws2/operations/AnnotationOperation.java | 24 ++++++++++++++++---- src/jalview/ws2/slivka/SlivkaWSDiscoverer.java | 10 +++++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/jalview/ws2/operations/AnnotationOperation.java b/src/jalview/ws2/operations/AnnotationOperation.java index 6518733..f927b2b 100644 --- a/src/jalview/ws2/operations/AnnotationOperation.java +++ b/src/jalview/ws2/operations/AnnotationOperation.java @@ -48,6 +48,10 @@ public class AnnotationOperation implements Operation boolean interactive = false; + private boolean isProtOperation = true; + + private boolean isNucOperation = true; + /* * Is it fine to get rid of AlignAnalysisUIText? */ @@ -67,7 +71,7 @@ public class AnnotationOperation implements Operation { return service.getName(); } - + @Override public String getDescription() { @@ -85,13 +89,13 @@ public class AnnotationOperation implements Operation { return service.getHostName(); } - + @Override public boolean hasParameters() { return service.hasParameters(); } - + @Override public ParamDatastoreI getParamStore() { @@ -119,13 +123,23 @@ public class AnnotationOperation implements Operation @Override public boolean isProteinOperation() { - return true; + return isProtOperation; + } + + public void setProteinOperation(boolean value) + { + isProtOperation = value; } @Override public boolean isNucleotideOperation() { - return true; + return isNucOperation; + } + + public void setNucleotideOperation(boolean value) + { + isNucOperation = value; } @Override diff --git a/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java b/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java index 8534f06..ee3ddf9 100644 --- a/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java +++ b/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java @@ -169,10 +169,18 @@ public class SlivkaWSDiscoverer implements WebServiceDiscoverer { switch (path[path.length - 1].toLowerCase()) { - case "sequence alignment analysis (conservation)": + case "rna secondary structure prediction": AnnotationOperation anop; op = anop = new AnnotationOperation(instance, instance::getAnnotations, instance::getFeaturesFile, + "Secondary Structure Prediction"); + anop.setInteractive(true); + anop.setAlignmentAnalysis(true); + anop.setProteinOperation(false); + break; + case "sequence alignment analysis (conservation)": + op = anop = new AnnotationOperation(instance, + instance::getAnnotations, instance::getFeaturesFile, "Conservation"); anop.setAlignmentAnalysis(true); anop.setInteractive(true); -- 1.7.10.2