import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
import jalview.analysis.CrossRef;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
import jalview.util.DBRefUtils;
import jalview.ws.DBRefFetcher;
import jalview.ws.SequenceFetcher;
+import jalview.ws.dbsources.EBIAlfaFold;
import jalview.ws.dbsources.Pdb;
import jalview.ws.dbsources.Uniprot;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
/**
* @author jimp
*
assertEquals(dr.get(0).getSource() + "|" + dr.get(0).getAccessionId(),
proteinSeq.getName());
}
+
+ /**
+ * Tests retrieval of one entry from EMBLCDS. Test is dependent on
+ * availability of network and the EMBLCDS service.
+ *
+ * @throws Exception
+ */
+ @Test(groups = { "External" })
+ public void testAlphaFoldClien() throws Exception
+ {
+ DbSourceProxy alphafold = new EBIAlfaFold();
+ AlignmentI resp = alphafold
+ .getSequenceRecords(alphafold.getTestQuery());
+ assertNotNull(resp);
+ assertEquals("One sequence only", resp.getHeight(), 1);
+ for (AlignmentAnnotation aa : resp.getAlignmentAnnotation())
+ {
+ if (aa.graph == AlignmentAnnotation.CUSTOMRENDERER)
+ {
+ assertTrue("Contact map didn't provide valid contact",
+ resp.getContactListFor(aa, 1).getContactAt(1) != -1d);
+ // test passes
+ return;
+ }
+ }
+ Assert.fail("No pAE matrix found for alphafold structure.");
+ }
+
}