1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ext.rbvi.chimera; |
22 |
|
|
23 |
|
import static org.testng.Assert.assertEquals; |
24 |
|
import static org.testng.Assert.assertFalse; |
25 |
|
import static org.testng.Assert.assertNotNull; |
26 |
|
import static org.testng.Assert.assertTrue; |
27 |
|
|
28 |
|
import java.io.File; |
29 |
|
import java.io.IOException; |
30 |
|
import java.util.List; |
31 |
|
import java.util.Vector; |
32 |
|
|
33 |
|
import org.testng.annotations.AfterClass; |
34 |
|
import org.testng.annotations.AfterMethod; |
35 |
|
import org.testng.annotations.BeforeClass; |
36 |
|
import org.testng.annotations.Test; |
37 |
|
|
38 |
|
import jalview.api.FeatureRenderer; |
39 |
|
import jalview.api.structures.JalviewStructureDisplayI; |
40 |
|
import jalview.bin.Cache; |
41 |
|
import jalview.bin.Jalview; |
42 |
|
import jalview.datamodel.AlignmentI; |
43 |
|
import jalview.datamodel.DBRefEntry; |
44 |
|
import jalview.datamodel.PDBEntry; |
45 |
|
import jalview.datamodel.Sequence; |
46 |
|
import jalview.datamodel.SequenceFeature; |
47 |
|
import jalview.datamodel.SequenceI; |
48 |
|
import jalview.gui.AlignFrame; |
49 |
|
import jalview.gui.Desktop; |
50 |
|
import jalview.gui.JvOptionPane; |
51 |
|
import jalview.gui.Preferences; |
52 |
|
import jalview.gui.StructureViewer; |
53 |
|
import jalview.gui.StructureViewer.ViewerType; |
54 |
|
import jalview.io.DataSourceType; |
55 |
|
import jalview.io.FileLoader; |
56 |
|
import jalview.structure.StructureCommand; |
57 |
|
import jalview.structure.StructureMapping; |
58 |
|
import jalview.structure.StructureSelectionManager; |
59 |
|
import jalview.ws.sifts.SiftsClient; |
60 |
|
import jalview.ws.sifts.SiftsException; |
61 |
|
import jalview.ws.sifts.SiftsSettings; |
62 |
|
|
63 |
|
@Test(singleThreaded = true) |
|
|
| 0% |
Uncovered Elements: 198 (198) |
Complexity: 24 |
Complexity Density: 0.14 |
|
64 |
|
public class JalviewChimeraView |
65 |
|
{ |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
67 |
0 |
@BeforeClass(alwaysRun = true)... |
68 |
|
public void setUpJvOptionPane() |
69 |
|
{ |
70 |
0 |
JvOptionPane.setInteractiveMode(false); |
71 |
0 |
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); |
72 |
|
} |
73 |
|
|
74 |
|
private JalviewStructureDisplayI chimeraViewer; |
75 |
|
|
76 |
|
|
77 |
|
@throws |
78 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
79 |
0 |
@BeforeClass(alwaysRun = true)... |
80 |
|
public static void setUpBeforeClass() throws Exception |
81 |
|
{ |
82 |
0 |
Jalview.main( |
83 |
|
new String[] |
84 |
|
{ "--noquestionnaire", "--nonews", "--props", |
85 |
|
"test/jalview/ext/rbvi/chimera/testProps.jvprops" }); |
86 |
0 |
Cache.setProperty(Preferences.STRUCTURE_DISPLAY, |
87 |
|
ViewerType.CHIMERA.name()); |
88 |
0 |
Cache.setProperty("SHOW_ANNOTATIONS", "false"); |
89 |
0 |
Cache.setProperty(Preferences.STRUCT_FROM_PDB, "false"); |
90 |
0 |
Cache.setProperty(Preferences.STRUCTURE_DISPLAY, |
91 |
|
ViewerType.CHIMERA.name()); |
92 |
0 |
Cache.setProperty("MAP_WITH_SIFTS", "true"); |
93 |
|
|
94 |
0 |
SiftsSettings.setMapWithSifts(true); |
95 |
|
} |
96 |
|
|
97 |
|
|
98 |
|
@throws |
99 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
100 |
0 |
@AfterClass(alwaysRun = true)... |
101 |
|
public static void tearDownAfterClass() throws Exception |
102 |
|
{ |
103 |
0 |
if (Desktop.instance != null) |
104 |
0 |
Desktop.instance.closeAll_actionPerformed(null); |
105 |
|
} |
106 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
107 |
0 |
@AfterMethod(alwaysRun = true)... |
108 |
|
public void tearDownAfterTest() throws Exception |
109 |
|
{ |
110 |
0 |
SiftsClient.setMockSiftsFile(null); |
111 |
0 |
if (chimeraViewer != null) |
112 |
|
{ |
113 |
0 |
chimeraViewer.closeViewer(true); |
114 |
|
} |
115 |
|
} |
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
|
|
| 0% |
Uncovered Elements: 37 (37) |
Complexity: 6 |
Complexity Density: 0.18 |
4-
|
|
123 |
0 |
@Test(groups = { "External" })... |
124 |
|
public void testSingleSeqViewChimera() |
125 |
|
{ |
126 |
|
|
127 |
0 |
String inFile = "examples/1gaq.txt"; |
128 |
0 |
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(inFile, |
129 |
|
DataSourceType.FILE); |
130 |
0 |
assertNotNull(af, "Failed to create AlignFrame"); |
131 |
0 |
SequenceI sq = af.getViewport().getAlignment().getSequenceAt(0); |
132 |
0 |
assertEquals(sq.getName(), "1GAQ|A"); |
133 |
0 |
SequenceI dsq = sq.getDatasetSequence(); |
134 |
0 |
Vector<PDBEntry> pdbIds = dsq.getAllPDBEntries(); |
135 |
0 |
assertEquals(pdbIds.size(), 1); |
136 |
0 |
PDBEntry pdbEntry = pdbIds.get(0); |
137 |
0 |
assertEquals(pdbEntry.getId(), "1GAQ"); |
138 |
0 |
StructureViewer structureViewer = new StructureViewer( |
139 |
|
af.getViewport().getStructureSelectionManager()); |
140 |
0 |
chimeraViewer = structureViewer.viewStructures(pdbEntry, |
141 |
|
new SequenceI[] |
142 |
|
{ sq }, af.getCurrentView().getAlignPanel()); |
143 |
0 |
JalviewChimeraBinding binding = (JalviewChimeraBinding) chimeraViewer |
144 |
|
.getBinding(); |
145 |
|
|
146 |
|
|
147 |
|
|
148 |
|
|
149 |
0 |
do |
150 |
|
{ |
151 |
0 |
try |
152 |
|
{ |
153 |
0 |
Thread.sleep(500); |
154 |
|
} catch (InterruptedException e) |
155 |
|
{ |
156 |
|
} |
157 |
0 |
} while (!binding.isFinishedInit() || !chimeraViewer.isVisible()); |
158 |
|
|
159 |
0 |
assertTrue(binding.isViewerRunning(), "Failed to start Chimera"); |
160 |
|
|
161 |
0 |
assertEquals(chimeraViewer.getBinding().getPdbCount(), 1); |
162 |
0 |
assertTrue(chimeraViewer.hasViewerActionsMenu()); |
163 |
|
|
164 |
|
|
165 |
|
|
166 |
0 |
AlignmentI al = af.getViewport().getAlignment(); |
167 |
0 |
PDBEntry xpdb = al.getSequenceAt(0).getPDBEntry("1GAQ"); |
168 |
0 |
sq = new Sequence("1GAQ", |
169 |
|
al.getSequenceAt(0).getSequence(25, 95).toString()); |
170 |
0 |
al.addSequence(sq); |
171 |
0 |
structureViewer.viewStructures(new PDBEntry[] { xpdb }, |
172 |
|
new SequenceI[] |
173 |
|
{ sq }, af.getCurrentView().getAlignPanel()); |
174 |
|
|
175 |
|
|
176 |
|
|
177 |
|
|
178 |
0 |
do |
179 |
|
{ |
180 |
0 |
try |
181 |
|
{ |
182 |
0 |
Thread.sleep(1500); |
183 |
|
} catch (InterruptedException q) |
184 |
|
{ |
185 |
|
} |
186 |
0 |
; |
187 |
0 |
} while (!binding.isLoadingFinished()); |
188 |
|
|
189 |
|
|
190 |
0 |
assertEquals(chimeraViewer.getBinding().getPdbCount(), 1); |
191 |
|
|
192 |
0 |
assertTrue(chimeraViewer.hasViewerActionsMenu()); |
193 |
|
|
194 |
0 |
chimeraViewer.closeViewer(true); |
195 |
0 |
chimeraViewer = null; |
196 |
0 |
return; |
197 |
|
} |
198 |
|
|
199 |
|
|
200 |
|
|
201 |
|
|
202 |
|
|
203 |
|
|
204 |
|
@throws |
205 |
|
@throws |
206 |
|
|
207 |
|
|
|
|
| 0% |
Uncovered Elements: 78 (78) |
Complexity: 4 |
Complexity Density: 0.05 |
4-
|
|
208 |
0 |
@Test(groups = { "External" })... |
209 |
|
public void testTransferFeatures() throws IOException, SiftsException |
210 |
|
{ |
211 |
0 |
String inFile = "examples/uniref50.fa"; |
212 |
0 |
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(inFile, |
213 |
|
DataSourceType.FILE); |
214 |
0 |
assertNotNull(af, "Failed to create AlignFrame"); |
215 |
0 |
SequenceI sq = af.getViewport().getAlignment().findName("FER2_ARATH"); |
216 |
0 |
assertNotNull(sq, "Didn't find FER2_ARATH"); |
217 |
|
|
218 |
|
|
219 |
|
|
220 |
|
|
221 |
0 |
sq.addDBRef(new DBRefEntry("UNIPROT", "0", "P16972", null)); |
222 |
|
|
223 |
|
|
224 |
|
|
225 |
|
|
226 |
0 |
String pdbFilePath = new File("test/jalview/ext/rbvi/chimera/4zho.pdb") |
227 |
|
.getPath(); |
228 |
0 |
PDBEntry pdbEntry = new PDBEntry("4ZHO", null, null, pdbFilePath); |
229 |
0 |
String siftsFilePath = new File( |
230 |
|
"test/jalview/ext/rbvi/chimera/4zho.xml.gz").getPath(); |
231 |
0 |
SiftsClient.setMockSiftsFile(new File(siftsFilePath)); |
232 |
|
|
233 |
0 |
StructureViewer structureViewer = new StructureViewer( |
234 |
|
af.getViewport().getStructureSelectionManager()); |
235 |
0 |
chimeraViewer = structureViewer.viewStructures(pdbEntry, |
236 |
|
new SequenceI[] |
237 |
|
{ sq }, af.getCurrentView().getAlignPanel()); |
238 |
|
|
239 |
0 |
JalviewChimeraBinding binding = (JalviewChimeraBinding) chimeraViewer |
240 |
|
.getBinding(); |
241 |
0 |
do |
242 |
|
{ |
243 |
0 |
try |
244 |
|
{ |
245 |
0 |
Thread.sleep(500); |
246 |
|
} catch (InterruptedException e) |
247 |
|
{ |
248 |
|
} |
249 |
0 |
} while (!binding.isFinishedInit()); |
250 |
|
|
251 |
0 |
assertTrue(binding.isViewerRunning(), "Failed to launch Chimera"); |
252 |
|
|
253 |
0 |
assertEquals(binding.getPdbCount(), 1); |
254 |
|
|
255 |
|
|
256 |
|
|
257 |
|
|
258 |
|
|
259 |
0 |
StructureSelectionManager ssm = binding.getSsm(); |
260 |
0 |
String pdbFile = binding.getStructureFiles()[0]; |
261 |
0 |
StructureMapping[] mappings = ssm.getMapping(pdbFile); |
262 |
0 |
assertTrue(mappings[0].getMappingDetailsOutput().contains("SIFTS"), |
263 |
|
"Failed to perform SIFTS mapping"); |
264 |
0 |
assertEquals(mappings.length, 2); |
265 |
0 |
assertEquals(mappings[0].getChain(), "A"); |
266 |
0 |
assertEquals(mappings[0].getPDBResNum(53), 2); |
267 |
0 |
assertEquals(mappings[0].getPDBResNum(145), 94); |
268 |
0 |
assertEquals(mappings[1].getChain(), "B"); |
269 |
0 |
assertEquals(mappings[1].getPDBResNum(53), 2); |
270 |
0 |
assertEquals(mappings[1].getPDBResNum(145), 94); |
271 |
|
|
272 |
|
|
273 |
|
|
274 |
|
|
275 |
|
|
276 |
0 |
sq.addSequenceFeature(new SequenceFeature("transit peptide", |
277 |
|
"chloroplast", 1, 51, Float.NaN, null)); |
278 |
|
|
279 |
0 |
sq.addSequenceFeature(new SequenceFeature("domain", |
280 |
|
"2Fe-2S ferredoxin-type", 55, 145, Float.NaN, null)); |
281 |
|
|
282 |
0 |
sq.addSequenceFeature(new SequenceFeature("metal ion-binding site", |
283 |
|
"Iron-Sulfur (2Fe-2S)", 91, 91, Float.NaN, null)); |
284 |
0 |
sq.addSequenceFeature(new SequenceFeature("metal ion-binding site", |
285 |
|
"Iron-Sulfur (2Fe-2S)", 96, 96, Float.NaN, null)); |
286 |
|
|
287 |
0 |
sq.addSequenceFeature( |
288 |
|
new SequenceFeature("helix", null, 50, 60, Float.NaN, null)); |
289 |
|
|
290 |
0 |
sq.addSequenceFeature( |
291 |
|
new SequenceFeature("chain", null, 50, 70, Float.NaN, null)); |
292 |
|
|
293 |
0 |
sq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 62, |
294 |
|
62, -2.1f, null)); |
295 |
0 |
sq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 65, |
296 |
|
65, 3.6f, null)); |
297 |
0 |
sq.addSequenceFeature(new SequenceFeature("RESNUM", "ALA: 2 4zhoA", |
298 |
|
53, 53, Float.NaN, null)); |
299 |
|
|
300 |
|
|
301 |
|
|
302 |
|
|
303 |
0 |
af.setShowSeqFeatures(true); |
304 |
0 |
FeatureRenderer fr = af.getFeatureRenderer(); |
305 |
0 |
fr.setVisible("transit peptide"); |
306 |
0 |
fr.setVisible("domain"); |
307 |
0 |
fr.setVisible("metal ion-binding site"); |
308 |
0 |
fr.setVisible("helix"); |
309 |
0 |
fr.setVisible("kd"); |
310 |
0 |
fr.setVisible("RESNUM"); |
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
|
315 |
|
|
316 |
|
|
317 |
|
|
318 |
0 |
binding.sendFeaturesToViewer(af.getViewport().getAlignPanel()); |
319 |
|
|
320 |
|
|
321 |
|
|
322 |
|
|
323 |
0 |
try |
324 |
|
{ |
325 |
0 |
Thread.sleep(1000); |
326 |
|
} catch (InterruptedException e) |
327 |
|
{ |
328 |
|
} |
329 |
|
|
330 |
|
|
331 |
|
|
332 |
|
|
333 |
0 |
List<String> reply = binding |
334 |
|
.executeCommand(new StructureCommand("list resattr"), true); |
335 |
|
|
336 |
0 |
assertTrue(reply.contains("resattr jv_domain")); |
337 |
0 |
assertTrue(reply.contains("resattr jv_metal_ion_binding_site")); |
338 |
0 |
assertTrue(reply.contains("resattr jv_helix")); |
339 |
0 |
assertTrue(reply.contains("resattr jv_kd")); |
340 |
0 |
assertTrue(reply.contains("resattr jv_RESNUM")); |
341 |
|
|
342 |
0 |
assertFalse(reply.contains("resattr jv_transit_peptide")); |
343 |
|
|
344 |
0 |
assertFalse(reply.contains("resattr jv_chain")); |
345 |
|
|
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
|
350 |
0 |
reply = binding.executeCommand( |
351 |
|
new StructureCommand("list resi att jv_metal_ion_binding_site"), |
352 |
|
true); |
353 |
0 |
assertEquals(reply.size(), 4); |
354 |
0 |
assertTrue(reply.contains( |
355 |
|
"residue id #0:40.A jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 40")); |
356 |
0 |
assertTrue(reply.contains( |
357 |
|
"residue id #0:45.A jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 45")); |
358 |
0 |
assertTrue(reply.contains( |
359 |
|
"residue id #0:40.B jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 40")); |
360 |
0 |
assertTrue(reply.contains( |
361 |
|
"residue id #0:45.B jv_metal_ion_binding_site \"Iron-Sulfur (2Fe-2S)\" index 45")); |
362 |
|
|
363 |
|
|
364 |
|
|
365 |
|
|
366 |
|
|
367 |
0 |
reply = binding.executeCommand( |
368 |
|
new StructureCommand("list resi att jv_kd"), true); |
369 |
0 |
assertEquals(reply.size(), 4); |
370 |
0 |
assertTrue(reply.contains("residue id #0:11.A jv_kd -2.1 index 11")); |
371 |
0 |
assertTrue(reply.contains("residue id #0:14.A jv_kd 3.6 index 14")); |
372 |
0 |
assertTrue(reply.contains("residue id #0:11.B jv_kd -2.1 index 11")); |
373 |
0 |
assertTrue(reply.contains("residue id #0:14.B jv_kd 3.6 index 14")); |
374 |
|
|
375 |
|
|
376 |
|
|
377 |
|
|
378 |
0 |
reply = binding.executeCommand( |
379 |
|
new StructureCommand("list resi spec :*/jv_kd>0 attr jv_kd"), |
380 |
|
true); |
381 |
0 |
assertEquals(reply.size(), 2); |
382 |
0 |
assertTrue(reply.contains("residue id #0:14.A jv_kd 3.6 index 14")); |
383 |
0 |
assertTrue(reply.contains("residue id #0:14.B jv_kd 3.6 index 14")); |
384 |
|
|
385 |
0 |
SiftsClient.setMockSiftsFile(null); |
386 |
0 |
chimeraViewer.closeViewer(true); |
387 |
0 |
chimeraViewer = null; |
388 |
|
} |
389 |
|
|
390 |
|
|
391 |
|
|
392 |
|
|
393 |
|
|
394 |
|
|
395 |
|
@throws |
396 |
|
@throws |
397 |
|
|
398 |
|
|
|
|
| 0% |
Uncovered Elements: 49 (49) |
Complexity: 7 |
Complexity Density: 0.18 |
4-
|
|
399 |
0 |
@Test(groups = { "External" })... |
400 |
|
public void testGetAttributes() throws IOException, SiftsException |
401 |
|
{ |
402 |
0 |
String inFile = "examples/uniref50.fa"; |
403 |
0 |
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(inFile, |
404 |
|
DataSourceType.FILE); |
405 |
0 |
assertNotNull(af, "Failed to create AlignFrame"); |
406 |
0 |
SequenceI fer2Arath = af.getViewport().getAlignment() |
407 |
|
.findName("FER2_ARATH"); |
408 |
0 |
assertNotNull(fer2Arath, "Didn't find FER2_ARATH"); |
409 |
|
|
410 |
|
|
411 |
|
|
412 |
|
|
413 |
0 |
fer2Arath.addDBRef(new DBRefEntry("UNIPROT", "0", "P16972", null)); |
414 |
|
|
415 |
|
|
416 |
|
|
417 |
|
|
418 |
0 |
String pdbFilePath = new File("test/jalview/ext/rbvi/chimera/4zho.pdb") |
419 |
|
.getPath(); |
420 |
0 |
PDBEntry pdbEntry = new PDBEntry("4ZHO", null, null, pdbFilePath); |
421 |
0 |
String siftsFilePath = new File( |
422 |
|
"test/jalview/ext/rbvi/chimera/4zho.xml.gz").getPath(); |
423 |
0 |
SiftsClient.setMockSiftsFile(new File(siftsFilePath)); |
424 |
|
|
425 |
0 |
StructureViewer structureViewer = new StructureViewer( |
426 |
|
af.getViewport().getStructureSelectionManager()); |
427 |
0 |
chimeraViewer = structureViewer.viewStructures(pdbEntry, |
428 |
|
new SequenceI[] |
429 |
|
{ fer2Arath }, af.getCurrentView().getAlignPanel()); |
430 |
|
|
431 |
0 |
JalviewChimeraBinding binding = (JalviewChimeraBinding) chimeraViewer |
432 |
|
.getBinding(); |
433 |
0 |
do |
434 |
|
{ |
435 |
0 |
try |
436 |
|
{ |
437 |
0 |
Thread.sleep(500); |
438 |
|
} catch (InterruptedException e) |
439 |
|
{ |
440 |
|
} |
441 |
0 |
} while (!binding.isFinishedInit()); |
442 |
|
|
443 |
0 |
assertTrue(binding.isViewerRunning(), "Failed to launch Chimera"); |
444 |
|
|
445 |
0 |
assertEquals(binding.getPdbCount(), 1); |
446 |
|
|
447 |
|
|
448 |
|
|
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
|
453 |
0 |
binding.copyStructureAttributesToFeatures("isHelix", |
454 |
|
af.getViewport().getAlignPanel()); |
455 |
|
|
456 |
|
|
457 |
|
|
458 |
|
|
459 |
|
|
460 |
0 |
af.setShowSeqFeatures(true); |
461 |
0 |
FeatureRenderer fr = af.getFeatureRenderer(); |
462 |
0 |
fr.setVisible("isHelix"); |
463 |
0 |
for (int res = 75; res <= 83; res++) |
464 |
|
{ |
465 |
0 |
checkFeaturesAtRes(fer2Arath, fr, res, "isHelix"); |
466 |
|
} |
467 |
0 |
for (int res = 117; res <= 123; res++) |
468 |
|
{ |
469 |
0 |
checkFeaturesAtRes(fer2Arath, fr, res, "isHelix"); |
470 |
|
} |
471 |
0 |
for (int res = 129; res <= 131; res++) |
472 |
|
{ |
473 |
0 |
checkFeaturesAtRes(fer2Arath, fr, res, "isHelix"); |
474 |
|
} |
475 |
0 |
for (int res = 143; res <= 145; res++) |
476 |
|
{ |
477 |
0 |
checkFeaturesAtRes(fer2Arath, fr, res, "isHelix"); |
478 |
|
} |
479 |
|
|
480 |
|
|
481 |
|
|
482 |
|
|
483 |
0 |
binding.copyStructureAttributesToFeatures("phi", |
484 |
|
af.getViewport().getAlignPanel()); |
485 |
0 |
fr.setVisible("phi"); |
486 |
0 |
List<SequenceFeature> fs = fer2Arath.getFeatures().findFeatures(54, 54, |
487 |
|
"phi"); |
488 |
0 |
assertEquals(fs.size(), 2); |
489 |
0 |
assertTrue(fs.contains(new SequenceFeature("phi", "A", 54, 54, |
490 |
|
-131.0713f, "Chimera"))); |
491 |
0 |
assertTrue(fs.contains(new SequenceFeature("phi", "B", 54, 54, |
492 |
|
-127.39512f, "Chimera"))); |
493 |
|
|
494 |
|
|
495 |
|
|
496 |
|
|
497 |
0 |
SiftsClient.setMockSiftsFile(null); |
498 |
0 |
chimeraViewer.closeViewer(true); |
499 |
0 |
chimeraViewer = null; |
500 |
|
} |
501 |
|
|
502 |
|
|
503 |
|
|
504 |
|
|
505 |
|
@param |
506 |
|
@param |
507 |
|
@param |
508 |
|
@param |
509 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
|
510 |
0 |
protected void checkFeaturesAtRes(SequenceI seq, FeatureRenderer fr,... |
511 |
|
int res, String featureType) |
512 |
|
{ |
513 |
0 |
String where = "at position " + res; |
514 |
0 |
List<SequenceFeature> fs = seq.getFeatures().findFeatures(res, res, |
515 |
|
featureType); |
516 |
|
|
517 |
0 |
assertEquals(fs.size(), 1, where); |
518 |
0 |
SequenceFeature sf = fs.get(0); |
519 |
0 |
assertEquals(sf.getType(), featureType, where); |
520 |
0 |
assertEquals(sf.getFeatureGroup(), "Chimera", where); |
521 |
0 |
assertEquals(sf.getDescription(), "True", where); |
522 |
0 |
assertEquals(sf.getScore(), Float.NaN, where); |
523 |
|
} |
524 |
|
} |