X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FRNAalifoldClient.java;h=55ade6628524888d7b2ee96b99a3eabcacbb881a;hb=ad15cff29620f960119f80176f1fd443da9f6763;hp=126266bafdcbebdd7bc9b97fbca6e129f72130a6;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/ws/jws2/RNAalifoldClient.java b/src/jalview/ws/jws2/RNAalifoldClient.java index 126266b..55ade66 100644 --- a/src/jalview/ws/jws2/RNAalifoldClient.java +++ b/src/jalview/ws/jws2/RNAalifoldClient.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -37,6 +37,7 @@ import java.util.TreeSet; import java.util.regex.Pattern; import compbio.data.sequence.RNAStructReader.AlifoldResult; +import compbio.data.sequence.FastaSequence; import compbio.data.sequence.RNAStructScoreManager; import compbio.data.sequence.Range; import compbio.data.sequence.Score; @@ -44,11 +45,12 @@ import compbio.metadata.Argument; /** * Client for the JABA RNA Alifold Service + * * @author daluke - Daniel Barton - * + * */ -public class RNAalifoldClient extends JabawsAlignCalcWorker implements +public class RNAalifoldClient extends JabawsCalcWorker implements AlignCalcWorkerI { @@ -64,24 +66,21 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements WsParamSetI preset, List paramset) { super(sh, alignFrame, preset, paramset); - - //if (arguments == null) - // arguments = new ArrayList(); - af = alignFrame; methodName = sh.serviceType; - alignedSeqs=true; - submitGaps=true; + alignedSeqs = true; + submitGaps = true; nucleotidesAllowed = true; proteinAllowed = false; initViewportParams(); } - + public String getCalcId() { return CALC_ID; } - private static String CALC_ID="jalview.ws.jws2.RNAalifoldClient"; + + private static String CALC_ID = "jalview.ws.jws2.RNAalifoldClient"; public static AlignAnalysisUIText getAlignAnalysisUITest() { @@ -107,6 +106,12 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements } @Override + boolean checkValidInputSeqs(boolean dynamic, List seqs) + { + return (seqs.size() > 1); + } + + @Override public void updateResultAnnotation(boolean immediate) { @@ -218,7 +223,8 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements private AlignmentAnnotation constructAnnotationFromScoreHolder( AlignmentAnnotation annotation, String struct, TreeSet data) { - Annotation[] anns = new Annotation[gapMap!= null ? gapMap.length+1 : struct.length()]; + Annotation[] anns = new Annotation[gapMap != null ? gapMap.length + 1 + : struct.length()]; if (data != null && data.size() > 1 @@ -236,10 +242,10 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements basePairs.put(score.getRanges().first(), new Float(score .getScores().get(0))); } - - for (int i = 0,ri=0,iEnd=struct.length();i