1 package jalview.ws.dbsources;
3 import java.io.FileInputStream;
5 import org.junit.Assert;
6 import org.testng.annotations.BeforeClass;
7 import org.testng.annotations.DataProvider;
8 import org.testng.annotations.Test;
10 import jalview.datamodel.Sequence;
11 import jalview.gui.JvOptionPane;
12 import jalview.ws.datamodel.alphafold.PAEContactMatrix;
14 public class EBIAlphaFoldTest
17 @BeforeClass(alwaysRun = true)
18 public void setUpJvOptionPane()
20 JvOptionPane.setInteractiveMode(false);
21 JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
24 @DataProvider(name = "getExamplePAEfiles")
25 public Object[][] getExamplePAEfiles()
27 return new String[][] { {
28 "examples/test_fab41.result/test_fab41_predicted_aligned_error_v1.json" },
29 { "examples/AlphaFold/AF-A0A1U8FD60-F1-predicted_aligned_error_v4.json" },
30 { "examples/AlphaFold/AF-Q5VSL9-F1-predicted_aligned_error_v4.json" },
31 { "examples/AlphaFold/AF-Q5VSL9-F1-predicted_aligned_error_v4_2023.json" } ,
32 { "examples/AlphaFold/AF-Q5VSL9-F1-predicted_aligned_error_v4B.json" } };
35 @Test(groups = { "Functional" }, dataProvider = "getExamplePAEfiles")
36 public void checkPAEimport(String paeFile) throws Exception
38 PAEContactMatrix cm = new PAEContactMatrix(
39 new Sequence("Dummy/1-2000", "ASDASDA"),
40 EBIAlfaFold.parseJSONtoPAEContactMatrix(
41 new FileInputStream(paeFile)));
42 Assert.assertNotEquals("No data from " + paeFile, cm.getMax(), 0);