1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ws.jws2; |
22 |
|
|
23 |
|
import jalview.datamodel.AlignmentAnnotation; |
24 |
|
import jalview.gui.AlignFrame; |
25 |
|
import jalview.util.MessageManager; |
26 |
|
import jalview.ws.jws2.jabaws2.Jws2Instance; |
27 |
|
import jalview.ws.params.WsParamSetI; |
28 |
|
import jalview.ws.uimodel.AlignAnalysisUIText; |
29 |
|
|
30 |
|
import java.util.ArrayList; |
31 |
|
import java.util.List; |
32 |
|
import java.util.Map; |
33 |
|
import java.util.Set; |
34 |
|
import java.util.TreeSet; |
35 |
|
|
36 |
|
import compbio.data.sequence.FastaSequence; |
37 |
|
import compbio.data.sequence.Score; |
38 |
|
import compbio.metadata.Argument; |
39 |
|
|
|
|
| 5.7% |
Uncovered Elements: 33 (35) |
Complexity: 12 |
Complexity Density: 0.52 |
|
40 |
|
public class AAConClient extends JabawsCalcWorker |
41 |
|
{ |
42 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
43 |
0 |
public AAConClient(Jws2Instance service, AlignFrame alignFrame,... |
44 |
|
WsParamSetI preset, List<Argument> paramset) |
45 |
|
{ |
46 |
0 |
super(service, alignFrame, preset, paramset); |
47 |
0 |
submitGaps = true; |
48 |
0 |
alignedSeqs = true; |
49 |
0 |
nucleotidesAllowed = false; |
50 |
0 |
proteinAllowed = true; |
51 |
0 |
filterNonStandardResidues = true; |
52 |
0 |
gapMap = new boolean[0]; |
53 |
0 |
initViewportParams(); |
54 |
|
} |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
0 |
@Override... |
57 |
|
public String getServiceActionText() |
58 |
|
{ |
59 |
0 |
return "calculating Amino acid consensus using AACon service"; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 7 |
Complexity Density: 0.64 |
|
67 |
0 |
@Override... |
68 |
|
public void updateResultAnnotation(boolean immediate) |
69 |
|
{ |
70 |
0 |
if (immediate || !calcMan.isWorking(this) && scoremanager != null) |
71 |
|
{ |
72 |
0 |
Map<String, TreeSet<Score>> scoremap = scoremanager.asMap(); |
73 |
0 |
int alWidth = alignViewport.getAlignment().getWidth(); |
74 |
0 |
ArrayList<AlignmentAnnotation> ourAnnot = new ArrayList<>(); |
75 |
0 |
for (String score : scoremap.keySet()) |
76 |
|
{ |
77 |
0 |
Set<Score> scores = scoremap.get(score); |
78 |
0 |
for (Score scr : scores) |
79 |
|
{ |
80 |
0 |
if (scr.getRanges() != null && scr.getRanges().size() > 0) |
81 |
|
{ |
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
} |
92 |
|
else |
93 |
|
{ |
94 |
0 |
createAnnotationRowsForScores(ourAnnot, getCalcId(), alWidth, |
95 |
|
scr); |
96 |
|
} |
97 |
|
} |
98 |
|
} |
99 |
|
|
100 |
0 |
if (ourAnnot.size() > 0) |
101 |
|
{ |
102 |
0 |
updateOurAnnots(ourAnnot); |
103 |
|
} |
104 |
|
} |
105 |
|
} |
106 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
107 |
0 |
@Override... |
108 |
|
boolean checkValidInputSeqs(boolean dynamic, List<FastaSequence> seqs) |
109 |
|
{ |
110 |
0 |
return (seqs.size() > 1); |
111 |
|
} |
112 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
113 |
0 |
@Override... |
114 |
|
public String getCalcId() |
115 |
|
{ |
116 |
0 |
return CALC_ID; |
117 |
|
} |
118 |
|
|
119 |
|
private static String CALC_ID = "jabaws2.AACon"; |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
121 |
1 |
public static AlignAnalysisUIText getAlignAnalysisUITest()... |
122 |
|
{ |
123 |
1 |
return new AlignAnalysisUIText( |
124 |
|
compbio.ws.client.Services.AAConWS.toString(), |
125 |
|
jalview.ws.jws2.AAConClient.class, CALC_ID, false, true, true, |
126 |
|
MessageManager.getString("label.aacon_calculations"), |
127 |
|
MessageManager.getString("tooltip.aacon_calculations"), |
128 |
|
MessageManager.getString("label.aacon_settings"), |
129 |
|
MessageManager.getString("tooltip.aacon_settings")); |
130 |
|
} |
131 |
|
} |