Clover icon

Coverage Report

  1. Project Clover database Thu Jun 4 2026 14:16:38 BST
  2. Package jalview.gui

File StructureChooserTest.java

 
 

Code metrics

30
177
17
1
560
433
38
0.21
10.41
17
2.24

Classes

Class Line # Actions
StructureChooserTest 70 177 38
0.7008928770.1%
 

Contributing tests

This file is covered by 12 tests. .

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.gui;
22   
23    import static org.testng.Assert.assertEquals;
24    import static org.testng.Assert.fail;
25    import static org.testng.AssertJUnit.assertNotNull;
26    import static org.testng.AssertJUnit.assertTrue;
27   
28    import java.io.File;
29    import java.io.IOException;
30    import java.util.Collection;
31    import java.util.List;
32    import java.util.Vector;
33   
34    import org.junit.Assert;
35    import org.testng.annotations.AfterMethod;
36    import org.testng.annotations.BeforeClass;
37    import org.testng.annotations.BeforeMethod;
38    import org.testng.annotations.DataProvider;
39    import org.testng.annotations.Test;
40   
41    import jalview.api.AlignViewportI;
42    import jalview.bin.Cache;
43    import jalview.bin.Jalview;
44    import jalview.datamodel.AlignmentAnnotation;
45    import jalview.datamodel.AlignmentI;
46    import jalview.datamodel.DBRefEntry;
47    import jalview.datamodel.PDBEntry;
48    import jalview.datamodel.Sequence;
49    import jalview.datamodel.SequenceI;
50    import jalview.fts.api.FTSData;
51    import jalview.fts.core.FTSRestClient;
52    import jalview.fts.service.pdb.PDBFTSRestClient;
53    import jalview.fts.service.pdb.PDBFTSRestClientTest;
54    import jalview.fts.service.threedbeacons.TDBeaconsFTSRestClient;
55    import jalview.fts.threedbeacons.TDBeaconsFTSRestClientTest;
56    import jalview.gui.StructureViewer.ViewerType;
57    import jalview.gui.structurechooser.PDBStructureChooserQuerySource;
58    import jalview.io.DataSourceType;
59    import jalview.io.FileFormatException;
60    import jalview.io.FileFormatI;
61    import jalview.io.FileLoader;
62    import jalview.io.IdentifyFile;
63    import jalview.jbgui.FilterOption;
64    import jalview.structure.StructureImportSettings.TFType;
65    import jalview.structure.StructureMapping;
66    import jalview.structure.StructureSelectionManager;
67    import junit.extensions.PA;
68   
69    @Test(singleThreaded = true)
 
70    public class StructureChooserTest
71    {
72   
 
73  1 toggle @BeforeClass(alwaysRun = true)
74    public void setUpJvOptionPane()
75    {
76  1 JvOptionPane.setInteractiveMode(false);
77  1 JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
78    }
79   
80    Sequence seq, upSeq, upSeq_nocanonical;
81   
 
82  12 toggle @BeforeMethod(alwaysRun = true)
83    public void setUp() throws Exception
84    {
85  12 seq = new Sequence("PDB|4kqy|4KQY|A", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1,
86    26);
87  12 seq.createDatasetSequence();
88  60 for (int x = 1; x < 5; x++)
89    {
90  48 DBRefEntry dbRef = new DBRefEntry();
91  48 dbRef.setAccessionId("XYZ_" + x);
92  48 seq.addDBRef(dbRef);
93    }
94   
95  12 PDBEntry dbRef = new PDBEntry();
96  12 dbRef.setId("1tim");
97   
98  12 Vector<PDBEntry> pdbIds = new Vector<>();
99  12 pdbIds.add(dbRef);
100   
101  12 seq.setPDBId(pdbIds);
102   
103    // Uniprot sequence for 3D-Beacons mocks
104  12 upSeq = new Sequence("P38398",
105    "MDLSALRVEEVQNVINAMQKILECPICLELIKEPVSTKCDHIFCKFCMLKLLNQKKGPSQCPLCKNDITKRS\n"
106    + "LQESTRFSQLVEELLKIICAFQLDTGLEYANSYNFAKKENNSPEHLKDEVSIIQSMGYRNRAKRLLQSEPEN\n"
107    + "PSLQETSLSVQLSNLGTVRTLRTKQRIQPQKTSVYIELGSDSSEDTVNKATYCSVGDQELLQITPQGTRDEI\n"
108    + "SLDSAKKAACEFSETDVTNTEHHQPSNNDLNTTEKRAAERHPEKYQGSSVSNLHVEPCGTNTHASSLQHENS\n"
109    + "SLLLTKDRMNVEKAEFCNKSKQPGLARSQHNRWAGSKETCNDRRTPSTEKKVDLNADPLCERKEWNKQKLPC\n"
110    + "SENPRDTEDVPWITLNSSIQKVNEWFSRSDELLGSDDSHDGESESNAKVADVLDVLNEVDEYSGSSEKIDLL\n"
111    + "ASDPHEALICKSERVHSKSVESNIEDKIFGKTYRKKASLPNLSHVTENLIIGAFVTEPQIIQERPLTNKLKR\n"
112    + "KRRPTSGLHPEDFIKKADLAVQKTPEMINQGTNQTEQNGQVMNITNSGHENKTKGDSIQNEKNPNPIESLEK\n"
113    + "ESAFKTKAEPISSSISNMELELNIHNSKAPKKNRLRRKSSTRHIHALELVVSRNLSPPNCTELQIDSCSSSE\n"
114    + "EIKKKKYNQMPVRHSRNLQLMEGKEPATGAKKSNKPNEQTSKRHDSDTFPELKLTNAPGSFTKCSNTSELKE\n"
115    + "FVNPSLPREEKEEKLETVKVSNNAEDPKDLMLSGERVLQTERSVESSSISLVPGTDYGTQESISLLEVSTLG\n"
116    + "KAKTEPNKCVSQCAAFENPKGLIHGCSKDNRNDTEGFKYPLGHEVNHSRETSIEMEESELDAQYLQNTFKVS\n"
117    + "KRQSFAPFSNPGNAEEECATFSAHSGSLKKQSPKVTFECEQKEENQGKNESNIKPVQTVNITAGFPVVGQKD\n"
118    + "KPVDNAKCSIKGGSRFCLSSQFRGNETGLITPNKHGLLQNPYRIPPLFPIKSFVKTKCKKNLLEENFEEHSM\n"
119    + "SPEREMGNENIPSTVSTISRNNIRENVFKEASSSNINEVGSSTNEVGSSINEIGSSDENIQAELGRNRGPKL\n"
120    + "NAMLRLGVLQPEVYKQSLPGSNCKHPEIKKQEYEEVVQTVNTDFSPYLISDNLEQPMGSSHASQVCSETPDD\n"
121    + "LLDDGEIKEDTSFAENDIKESSAVFSKSVQKGELSRSPSPFTHTHLAQGYRRGAKKLESSEENLSSEDEELP\n"
122    + "CFQHLLFGKVNNIPSQSTRHSTVATECLSKNTEENLLSLKNSLNDCSNQVILAKASQEHHLSEETKCSASLF\n"
123    + "SSQCSELEDLTANTNTQDPFLIGSSKQMRHQSESQGVGLSDKELVSDDEERGTGLEENNQEEQSMDSNLGEA\n"
124    + "ASGCESETSVSEDCSGLSSQSDILTTQQRDTMQHNLIKLQQEMAELEAVLEQHGSQPSNSYPSIISDSSALE\n"
125    + "DLRNPEQSTSEKAVLTSQKSSEYPISQNPEGLSADKFEVSADSSTSKNKEPGVERSSPSKCPSLDDRWYMHS\n"
126    + "CSGSLQNRNYPSQEELIKVVDVEEQQLEESGPHDLTETSYLPRQDLEGTPYLESGISLFSDDPESDPSEDRA\n"
127    + "PESARVGNIPSSTSALKVPQLKVAESAQSPAAAHTTDTAGYNAMEESVSREKPELTASTERVNKRMSMVVSG\n"
128    + "LTPEEFMLVYKFARKHHITLTNLITEETTHVVMKTDAEFVCERTLKYFLGIAGGKWVVSYFWVTQSIKERKM\n"
129    + "LNEHDFEVRGDVVNGRNHQGPKRARESQDRKIFRGLEICCYGPFTNMPTDQLEWMVQLCGASVVKELSSFTL\n"
130    + "GTGVHPIVVVQPDAWTEDNGFHAIGQMCEAPVVTREWVLDSVALYQCQELDTYLIPQIPHSHY\n"
131    + "",
132    1, 1863);
133  12 upSeq.setDescription("Breast cancer type 1 susceptibility protein");
134  12 upSeq_nocanonical = new Sequence(upSeq);
135  12 upSeq.createDatasetSequence();
136  12 upSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "P38398", null, true));
137   
138  12 upSeq_nocanonical.createDatasetSequence();
139    // not a canonical reference
140  12 upSeq_nocanonical.addDBRef(new DBRefEntry("UNIPROT","0","P38398",null,false));
141    }
142   
 
143  12 toggle @AfterMethod(alwaysRun = true)
144    public void tearDown() throws Exception
145    {
146  12 seq = null;
147  12 upSeq = null;
148  12 upSeq_nocanonical = null;
149    }
150   
 
151  1 toggle @Test(groups = { "Functional" })
152    public void populateFilterComboBoxTest() throws InterruptedException
153    {
154  1 TDBeaconsFTSRestClientTest.setMock();
155  1 PDBFTSRestClientTest.setMock();
156   
157  1 SequenceI[] selectedSeqs = new SequenceI[] { seq };
158  1 StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
159  1 ThreadwaitFor(200, sc);
160   
161    // if structures are not discovered then don't
162    // populate filter options
163  1 sc.populateFilterComboBox(false, false);
164  1 int optionsSize = sc.getCmbFilterOption().getItemCount();
165  1 System.out.println("Items (no data, no cache): ");
166  1 StringBuilder items = new StringBuilder();
167  3 for (int p = 0; p < optionsSize; p++)
168    {
169  2 items.append("- ")
170    .append(sc.getCmbFilterOption().getItemAt(p).getName())
171    .append("\n");
172   
173    }
174    // report items when this fails - seems to be a race condition
175  1 Assert.assertEquals(items.toString(), optionsSize, 2);
176   
177  1 sc.populateFilterComboBox(true, false);
178  1 optionsSize = sc.getCmbFilterOption().getItemCount();
179  1 assertTrue(optionsSize > 3); // if structures are found, filter options
180    // should be populated
181   
182  1 sc.populateFilterComboBox(true, true);
183  1 assertTrue(sc.getCmbFilterOption().getSelectedItem() != null);
184  1 FilterOption filterOpt = (FilterOption) sc.getCmbFilterOption()
185    .getSelectedItem();
186  1 assertEquals("Cached Structures", filterOpt.getName());
187  1 FTSRestClient
188    .unMock((FTSRestClient) TDBeaconsFTSRestClient.getInstance());
189  1 FTSRestClient.unMock((FTSRestClient) PDBFTSRestClient.getInstance());
190   
191    }
192   
 
193  1 toggle @Test(groups = { "Functional" })
194    public void displayTDBQueryTest() throws InterruptedException
195    {
196  1 TDBeaconsFTSRestClientTest.setMock();
197  1 PDBFTSRestClientTest.setMock();
198   
199  1 SequenceI[] selectedSeqs = new SequenceI[] { upSeq_nocanonical };
200  1 StructureChooser sc = new StructureChooser(selectedSeqs,
201    upSeq_nocanonical, null);
202    // mock so should be quick. Exceptions from mocked PDBFTS are expected too
203  1 ThreadwaitFor(500, sc);
204   
205  1 assertTrue(sc.isCanQueryTDB() && sc.isNotQueriedTDBYet());
206    }
207   
 
208  0 toggle @Test(groups = { "Network" })
209    public void fetchStructuresInfoTest()
210    {
211  0 FTSRestClient
212    .unMock((FTSRestClient) TDBeaconsFTSRestClient.getInstance());
213  0 PDBFTSRestClient.unMock((FTSRestClient) PDBFTSRestClient.getInstance());
214  0 SequenceI[] selectedSeqs = new SequenceI[] { seq };
215  0 StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
216    // not mocked, wait for 2s
217  0 ThreadwaitFor(2000, sc);
218   
219  0 sc.fetchStructuresMetaData();
220  0 Collection<FTSData> ss = (Collection<FTSData>) PA.getValue(sc,
221    "discoveredStructuresSet");
222  0 assertNotNull(ss);
223  0 assertTrue(ss.size() > 0);
224    }
225   
 
226  1 toggle @Test(groups = { "Functional" })
227    public void fetchStructuresInfoMockedTest()
228    {
229  1 TDBeaconsFTSRestClientTest.setMock();
230  1 PDBFTSRestClientTest.setMock();
231  1 SequenceI[] selectedSeqs = new SequenceI[] { upSeq };
232  1 StructureChooser sc = new StructureChooser(selectedSeqs, seq, null);
233  1 ThreadwaitFor(500, sc);
234   
235  1 sc.fetchStructuresMetaData();
236  1 Collection<FTSData> ss = (Collection<FTSData>) PA.getValue(sc,
237    "discoveredStructuresSet");
238  1 assertNotNull(ss);
239  1 assertTrue(ss.size() > 0);
240    }
241   
 
242  3 toggle private void ThreadwaitFor(int i, StructureChooser sc)
243    {
244  3 long timeout = i + System.currentTimeMillis();
245  12 while (!sc.isDialogVisible() && timeout > System.currentTimeMillis())
246    {
247  9 try
248    {
249  9 Thread.sleep(50);
250    } catch (InterruptedException x)
251    {
252   
253    }
254    }
255    }
 
256  1 toggle @Test(groups = { "Functional" })
257    public void sanitizeSeqNameTest()
258    {
259  1 String name = "ab_cdEF|fwxyz012349";
260  1 assertEquals(name,
261    PDBStructureChooserQuerySource.sanitizeSeqName(name));
262   
263    // remove a [nn] substring
264  1 name = "abcde12[345]fg";
265  1 assertEquals("abcde12fg",
266    PDBStructureChooserQuerySource.sanitizeSeqName(name));
267   
268    // remove characters other than a-zA-Z0-9 | or _
269  1 name = "ab[cd],.\t£$*!- \\\"@:e";
270  1 assertEquals("abcde",
271    PDBStructureChooserQuerySource.sanitizeSeqName(name));
272   
273  1 name = "abcde12[345a]fg";
274  1 assertEquals("abcde12345afg",
275    PDBStructureChooserQuerySource.sanitizeSeqName(name));
276    }
277   
 
278  8 toggle private void setupOSFforSequenceTest(String propsFile) {
279  8 Cache.loadProperties(
280  8 propsFile == null ? "test/jalview/io/testProps.jvprops"
281    : propsFile);
282   
283  8 Jalview.main(
284  8 propsFile == null ? null : new String[]
285    { "--props", propsFile });
286  8 if (Desktop.getInstance() != null)
287  8 Desktop.getInstance().closeAll_actionPerformed(null);
288  8 JvOptionPane.setInteractiveMode(false);
289  8 JvOptionPane.setMockResponse(JvOptionPane.OK_OPTION);
290   
291   
292    }
 
293  6 toggle @Test(groups = { "Functional" }, dataProvider = "openStructureFileParams")
294    public void openStructureFileForSequenceTest(String alfile, String seqid,
295    String sFilename, TFType tft, String paeFilename,
296    boolean showRefAnnotations, boolean doXferSettings,
297    ViewerType viewerType, int seqNum, int annNum, int viewerNum,
298    String propsFile)
299    {
300  6 setupOSFforSequenceTest(propsFile);
301  6 FileLoader fileLoader = new FileLoader(true);
302  6 FileFormatI format = null;
303  6 File alFile = new File(alfile);
304  6 try
305    {
306  6 format = new IdentifyFile().identify(alFile, DataSourceType.FILE);
307    } catch (FileFormatException e1)
308    {
309  0 Assert.fail(
310    "Unknown file format for '" + alFile.getAbsolutePath() + "'");
311    }
312   
313  6 AlignFrame af = fileLoader.LoadFileWaitTillLoaded(alFile,
314    DataSourceType.FILE, format);
315  6 AlignmentPanel ap = af.alignPanel;
316  6 Assert.assertNotNull("No alignPanel", ap);
317   
318  6 AlignmentI al = ap.getAlignment();
319  6 Assert.assertNotNull(al);
320   
321  6 SequenceI seq = al.findName(seqid);
322  6 Assert.assertNotNull("Sequence '" + seqid + "' not found in alignment",
323    seq);
324   
325  6 StructureChooser.openStructureFileForSequence(null, null, ap, seq,
326    false, sFilename, tft, paeFilename, false, showRefAnnotations,
327    doXferSettings, viewerType);
328   
329  6 OSFforSeqValidate(af, ap, al, seqNum, annNum, viewerNum);
330    // af left open so we could do more tests (see MultiChain test)
331    // for this test we did enough.
332  6 closeAf(af);
333    }
334   
 
335  0 toggle @Test(groups = { "Functional" }, dataProvider = "openStructureFileMChainParams", singleThreaded=true)
336    public void openStructureFileForSequenceMultiChainTest(String alfile, String seqid,
337    String sFilename, TFType tft, String[] chains, String paeFilename,
338    boolean showRefAnnotations, boolean doXferSettings,
339    ViewerType viewerType, int seqNum, int annNum, int viewerNum,
340    String propsFile) throws IOException
341    {
342  0 setupOSFforSequenceTest(propsFile);
343  0 FileLoader fileLoader = new FileLoader(true);
344  0 FileFormatI format = null;
345  0 File alFile = new File(alfile);
346  0 try
347    {
348  0 format = new IdentifyFile().identify(alFile, DataSourceType.FILE);
349    } catch (FileFormatException e1)
350    {
351  0 Assert.fail(
352    "Unknown file format for '" + alFile.getAbsolutePath() + "'");
353    }
354   
355  0 AlignFrame af = fileLoader.LoadFileWaitTillLoaded(alFile,
356    DataSourceType.FILE, format);
357  0 AlignmentPanel ap = af.alignPanel;
358  0 Assert.assertNotNull("No alignPanel", ap);
359   
360  0 AlignmentI al = ap.getAlignment();
361  0 Assert.assertNotNull(al);
362   
363  0 SequenceI seq = al.findName(seqid);
364  0 Assert.assertNotNull("Sequence '" + seqid + "' not found in alignment",
365    seq);
366   
367  0 StructureChooser.openStructureForASequence(null, null, ap, seq, false, sFilename, DataSourceType.FILE, chains, tft, paeFilename, false, showRefAnnotations, doXferSettings, viewerType);
368   
369    // check viewer (includes wait to avoid race condition)
370  0 Test failure here OSFforSeqValidate(af, ap, al, seqNum, annNum, viewerNum);
371   
372    // now check all mappings are as expected
373  0 String canonicalFile = null;
374  0 int found=0;
375  0 String failedToFind="";
376  0 int passes=0;
377  0 canonicalFile = new File(sFilename).getCanonicalPath();
378  0 do
379    {
380  0 owait(125);
381  0 StructureMapping[] smappings = Desktop.getStructureSelectionManager()
382    .getMapping(canonicalFile);
383  0 assertNotNull(smappings);
384  0 Test failure here assertTrue(smappings.length >= 1);
385  0 if (chains != null)
386    {
387  0 found=0;
388  0 failedToFind="";
389  0 assertEquals(smappings.length, chains.length);
390  0 for (StructureMapping sm : smappings)
391    {
392  0 for (String ch : chains)
393    {
394  0 if (ch.equals(sm.getChain()))
395    {
396  0 found++;
397    } else {
398  0 failedToFind+=("Didn't find a mapping for chain '"+sm.getChain()+"'");
399    }
400    }
401    }
402    }
403  0 } while (found<1 && passes++ < 3);
404  0 if (found<1)
405    {
406  0 fail(failedToFind);
407    }
408  0 closeAf(af);
409    }
 
410  17 toggle private void owait(long ms)
411    {
412  17 try
413    {
414  17 Thread.sleep(ms);
415    } catch (InterruptedException e)
416    {
417    // TODO Auto-generated catch block
418  0 e.printStackTrace();
419    }
420   
421    }
 
422  8 toggle private void OSFforSeqValidate(AlignFrame af, AlignmentPanel ap, AlignmentI al, int seqNum, int annNum, int viewerNum) {
423   
424  8 owait(150);
425  8 List<SequenceI> seqs = al.getSequences();
426  8 Assert.assertNotNull(seqs);
427   
428  8 Assert.assertEquals("Wrong number of sequences", seqNum, seqs.size());
429   
430  8 AlignViewportI av = ap.getAlignViewport();
431  8 Assert.assertNotNull(av);
432   
433  8 AlignmentAnnotation[] aas = al.getAlignmentAnnotation();
434  8 int visibleAnn = 0;
435  8 for (AlignmentAnnotation aa : aas)
436    {
437  68 if (aa.visible)
438  68 visibleAnn++;
439    }
440  8 Assert.assertEquals("Wrong number of viewed annotations", annNum,
441    visibleAnn);
442   
443  8 if (viewerNum > -1)
444    {
445  8 owait(150);
446  8 List<StructureViewerBase> openViewers = Desktop.getInstance()
447    .getStructureViewers(ap, null);
448  8 Assert.assertNotNull(openViewers);
449  8 int count = 0;
450  8 int mappedCount = 0;
451  8 for (StructureViewerBase svb : openViewers)
452    {
453  5 if (svb.isVisible()) {
454  5 count++;
455  5 for (SequenceI[] sqm: svb.getBinding().getSequence()) {
456  5 for (SequenceI sq:sqm) {
457  5 if (sq!=null) {
458  5 mappedCount++;
459    }
460    }
461    }
462  5 assertTrue(mappedCount==1);
463  5 Test failure here assertTrue(svb.getBinding().getMappedStructureCount()>0);
464    }
465    }
466  7 Assert.assertEquals("Wrong number of structure viewers opened",
467    viewerNum, count);
468   
469    }
470    }
 
471  6 toggle private void closeAf(AlignFrame af)
472    {
473   
474  6 if (af != null)
475    {
476  6 af.setVisible(false);
477  6 af.dispose();
478    }
479   
480    }
 
481  1 toggle @DataProvider(name = "openStructureFileParams")
482    public Object[][] openStructureFileParams()
483    {
484    /*
485    String alFile,
486    String seqid,
487    String structureFilename,
488    TFType tft,
489    String paeFilename,
490    boolean showRefAnnotations,
491    boolean doXferSettings, // false for Commands
492    ViewerType viewerType,
493    int seqNum,
494    int annNum,
495    int viewerNum,
496    String propsFile
497    */
498  1 return new Object[][] {
499    /*
500    */
501    { "examples/uniref50.fa", "FER1_SPIOL",
502    "examples/AlphaFold/AF-P00221-F1-model_v4.cif", TFType.DEFAULT,
503    "examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json",
504    true, false, null, 15, 7, 0, null },
505    { "examples/uniref50.fa", "FER1_SPIOL",
506    "examples/AlphaFold/AF-P00221-F1-model_v4.cif", TFType.PLDDT,
507    "examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json",
508    true, false, null, 15, 7, 0, null },
509    { "examples/uniref50.fa", "FER1_SPIOL",
510    "examples/AlphaFold/AF-P00221-F1-model_v4.cif", TFType.PLDDT,
511    "examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json",
512    false, false, null, 15, 4, 0, null },
513    { "examples/uniref50.fa", "FER1_SPIOL",
514    "examples/AlphaFold/AF-P00221-F1-model_v4.cif", TFType.DEFAULT,
515    "examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json",
516    true, false, ViewerType.JMOL, 15, 7, 1, null },
517    { "examples/uniref50.fa", "FER1_SPIOL",
518    "examples/AlphaFold/AF-P00221-F1-model_v4.cif", TFType.PLDDT,
519    "examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json",
520    true, false, ViewerType.JMOL, 15, 7, 1, null },
521    { "examples/uniref50.fa", "FER1_SPIOL",
522    "examples/AlphaFold/AF-P00221-F1-model_v4.cif", TFType.PLDDT,
523    "examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json",
524    false, false, ViewerType.JMOL, 15, 4, 1, null }, };
525    }
 
526  1 toggle @DataProvider(name = "openStructureFileMChainParams")
527    public Object[][] openStructureFileMChainParams()
528    {
529    /*
530    String alFile,
531    String seqid,
532    String structureFilename,
533    TFType tft,
534    String[] chains,
535    String paeFilename,
536    boolean showRefAnnotations,
537    boolean doXferSettings, // false for Commands
538    ViewerType viewerType,
539    int seqNum,
540    int annNum,
541    int viewerNum,
542    String propsFile
543    */
544  1 return new Object[][] {
545    /*
546    */
547    { "examples/testdata/9CFN.lbn", "9CFN|A[1_555]",
548    "examples/testdata/9CFN.cif", TFType.DEFAULT,
549    new String[] { "A" },
550    null,
551    true, false, ViewerType.JMOL, 2, 16, 1, null },
552    { "examples/testdata/9CFN.lbn", "9CFN|B[1_555]",
553    "examples/testdata/9CFN.cif", TFType.DEFAULT,
554    new String[] { "B" },
555    null,
556    true, false, ViewerType.JMOL, 2, 16, 1, null }
557    };
558    }
559   
560    }