+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.ws.jws2;
import jalview.api.AlignCalcWorkerI;
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;
/**
* Client for the JABA RNA Alifold Service
+ *
* @author daluke - Daniel Barton
- *
+ *
*/
-public class RNAalifoldClient extends JabawsAlignCalcWorker implements
+public class RNAalifoldClient extends JabawsCalcWorker implements
AlignCalcWorkerI
{
WsParamSetI preset, List<Argument> paramset)
{
super(sh, alignFrame, preset, paramset);
-
- //if (arguments == null)
- // arguments = new ArrayList<Argument>();
-
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()
{
}
@Override
+ boolean checkValidInputSeqs(boolean dynamic, List<FastaSequence> seqs)
+ {
+ return (seqs.size() > 1);
+ }
+
+ @Override
public void updateResultAnnotation(boolean immediate)
{
private AlignmentAnnotation constructAnnotationFromScoreHolder(
AlignmentAnnotation annotation, String struct, TreeSet<Score> 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
basePairs.put(score.getRanges().first(), new Float(score
.getScores().get(0)));
}
-
- for (int i = 0,ri=0,iEnd=struct.length();i<iEnd; i++,ri++)
+
+ for (int i = 0, ri = 0, iEnd = struct.length(); i < iEnd; i++, ri++)
{
- if (gapMap!=null)
+ if (gapMap != null)
{
// skip any gapped columns in the input data
while (!gapMap[ri])
}
else if (data == null || data.size() == 1)
{
- for (int i = 0,ri=0,iEnd=struct.length();i<iEnd; i++,ri++)
+ for (int i = 0, ri = 0, iEnd = struct.length(); i < iEnd; i++, ri++)
{
- if (gapMap!=null)
+ if (gapMap != null)
{
// skip any gapped columns in the input data
- while (!gapMap[ri] && ri<gapMap.length)
+ while (!gapMap[ri] && ri < gapMap.length)
{
ri++;
}
- if (ri==gapMap.length)
+ if (ri == gapMap.length)
{
break;
}