git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-998 fixed empty tooltip bug when only one sequence feature is present
[jalview.git]
/
src
/
jalview
/
ws
/
jws2
/
RNAalifoldClient.java
diff --git
a/src/jalview/ws/jws2/RNAalifoldClient.java
b/src/jalview/ws/jws2/RNAalifoldClient.java
index
126266b
..
253a797
100644
(file)
--- a/
src/jalview/ws/jws2/RNAalifoldClient.java
+++ b/
src/jalview/ws/jws2/RNAalifoldClient.java
@@
-37,6
+37,7
@@
import java.util.TreeSet;
import java.util.regex.Pattern;
import compbio.data.sequence.RNAStructReader.AlifoldResult;
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;
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
/**
* Client for the JABA RNA Alifold Service
+ *
* @author daluke - Daniel Barton
* @author daluke - Daniel Barton
- *
+ *
*/
*/
-public class RNAalifoldClient extends JabawsAlignCalcWorker implements
+public class RNAalifoldClient extends JabawsCalcWorker implements
AlignCalcWorkerI
{
AlignCalcWorkerI
{
@@
-64,24
+66,21
@@
public class RNAalifoldClient extends JabawsAlignCalcWorker implements
WsParamSetI preset, List<Argument> paramset)
{
super(sh, alignFrame, preset, paramset);
WsParamSetI preset, List<Argument> paramset)
{
super(sh, alignFrame, preset, paramset);
-
- //if (arguments == null)
- // arguments = new ArrayList<Argument>();
-
af = alignFrame;
methodName = sh.serviceType;
af = alignFrame;
methodName = sh.serviceType;
- alignedSeqs=true;
- submitGaps=true;
+ alignedSeqs = true;
+ submitGaps = true;
nucleotidesAllowed = true;
proteinAllowed = false;
initViewportParams();
}
nucleotidesAllowed = true;
proteinAllowed = false;
initViewportParams();
}
-
+
public String getCalcId()
{
return CALC_ID;
}
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()
{
public static AlignAnalysisUIText getAlignAnalysisUITest()
{
@@
-107,6
+106,12
@@
public class RNAalifoldClient extends JabawsAlignCalcWorker implements
}
@Override
}
@Override
+ boolean checkValidInputSeqs(boolean dynamic, List<FastaSequence> seqs)
+ {
+ return (seqs.size() > 1);
+ }
+
+ @Override
public void updateResultAnnotation(boolean immediate)
{
public void updateResultAnnotation(boolean immediate)
{
@@
-218,7
+223,8
@@
public class RNAalifoldClient extends JabawsAlignCalcWorker implements
private AlignmentAnnotation constructAnnotationFromScoreHolder(
AlignmentAnnotation annotation, String struct, TreeSet<Score> data)
{
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
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)));
}
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])
{
// skip any gapped columns in the input data
while (!gapMap[ri])
@@
-276,16
+282,16
@@
public class RNAalifoldClient extends JabawsAlignCalcWorker implements
}
else if (data == null || data.size() == 1)
{
}
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
{
// skip any gapped columns in the input data
- while (!gapMap[ri] && ri<gapMap.length)
+ while (!gapMap[ri] && ri < gapMap.length)
{
ri++;
}
{
ri++;
}
- if (ri==gapMap.length)
+ if (ri == gapMap.length)
{
break;
}
{
break;
}