2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
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.
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.
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.
21 package jalview.fts.service.pdb;
23 import static org.testng.AssertJUnit.assertEquals;
24 import static org.testng.AssertJUnit.assertTrue;
26 import jalview.fts.api.FTSDataColumnI;
27 import jalview.fts.core.FTSRestClient;
28 import jalview.fts.core.FTSRestRequest;
29 import jalview.fts.core.FTSRestResponse;
30 import jalview.gui.JvOptionPane;
32 import java.io.BufferedReader;
33 import java.io.FileReader;
34 import java.io.IOException;
35 import java.util.ArrayList;
36 import java.util.Iterator;
37 import java.util.List;
39 import javax.ws.rs.core.MediaType;
41 import org.json.simple.JSONArray;
42 import org.json.simple.JSONObject;
43 import org.json.simple.parser.JSONParser;
44 import org.json.simple.parser.ParseException;
45 import org.testng.Assert;
46 import org.testng.annotations.AfterMethod;
47 import org.testng.annotations.BeforeClass;
48 import org.testng.annotations.BeforeMethod;
49 import org.testng.annotations.Test;
51 import com.sun.jersey.api.client.Client;
52 import com.sun.jersey.api.client.ClientResponse;
53 import com.sun.jersey.api.client.WebResource;
54 import com.sun.jersey.api.client.config.ClientConfig;
55 import com.sun.jersey.api.client.config.DefaultClientConfig;
57 public class PDBFTSRestClientTest
60 @BeforeClass(alwaysRun = true)
61 public void setUpJvOptionPane()
63 JvOptionPane.setInteractiveMode(false);
64 JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
67 @BeforeMethod(alwaysRun = true)
68 public void setUp() throws Exception
72 @AfterMethod(alwaysRun = true)
73 public void tearDown() throws Exception
77 @Test(groups = { "External", "Network" })
78 public void executeRequestTest()
80 List<FTSDataColumnI> wantedFields = new ArrayList<FTSDataColumnI>();
83 wantedFields.add(PDBFTSRestClient.getInstance()
84 .getDataColumnByNameOrCode("molecule_type"));
85 wantedFields.add(PDBFTSRestClient.getInstance()
86 .getDataColumnByNameOrCode("pdb_id"));
87 wantedFields.add(PDBFTSRestClient.getInstance()
88 .getDataColumnByNameOrCode("genus"));
89 wantedFields.add(PDBFTSRestClient.getInstance()
90 .getDataColumnByNameOrCode("gene_name"));
91 wantedFields.add(PDBFTSRestClient.getInstance()
92 .getDataColumnByNameOrCode("title"));
93 } catch (Exception e1)
97 System.out.println("wantedFields >>" + wantedFields);
100 FTSRestRequest request = new FTSRestRequest();
101 request.setAllowEmptySeq(false);
102 request.setResponseSize(100);
103 request.setFieldToSearchBy("text:");
104 request.setSearchTerm("abc");
105 request.setWantedFields(wantedFields);
107 FTSRestResponse response;
110 response = PDBFTSRestClient.getInstance().executeRequest(request);
111 } catch (Exception e)
114 Assert.fail("Couldn't execute webservice call!");
117 assertTrue(response.getNumberOfItemsFound() > 99);
118 assertTrue(response.getSearchSummary() != null);
119 assertTrue(response.getSearchSummary().size() > 99);
122 @Test(groups = { "Functional" })
123 public void getPDBDocFieldsAsCommaDelimitedStringTest()
125 List<FTSDataColumnI> wantedFields = new ArrayList<FTSDataColumnI>();
128 wantedFields.add(PDBFTSRestClient.getInstance()
129 .getDataColumnByNameOrCode("molecule_type"));
130 wantedFields.add(PDBFTSRestClient.getInstance()
131 .getDataColumnByNameOrCode("pdb_id"));
132 wantedFields.add(PDBFTSRestClient.getInstance()
133 .getDataColumnByNameOrCode("genus"));
134 wantedFields.add(PDBFTSRestClient.getInstance()
135 .getDataColumnByNameOrCode("gene_name"));
136 wantedFields.add(PDBFTSRestClient.getInstance()
137 .getDataColumnByNameOrCode("title"));
138 } catch (Exception e)
143 String expectedResult = "molecule_type,pdb_id,genus,gene_name,title";
144 String actualResult = PDBFTSRestClient.getInstance()
145 .getDataColumnsFieldsAsCommaDelimitedString(wantedFields);
147 assertEquals("", expectedResult, actualResult);
150 @Test(groups = { "External, Network" })
151 public void parsePDBJsonExceptionStringTest()
153 List<FTSDataColumnI> wantedFields = new ArrayList<FTSDataColumnI>();
156 wantedFields.add(PDBFTSRestClient.getInstance()
157 .getDataColumnByNameOrCode("molecule_type"));
158 wantedFields.add(PDBFTSRestClient.getInstance()
159 .getDataColumnByNameOrCode("pdb_id"));
160 wantedFields.add(PDBFTSRestClient.getInstance()
161 .getDataColumnByNameOrCode("genus"));
162 wantedFields.add(PDBFTSRestClient.getInstance()
163 .getDataColumnByNameOrCode("gene_name"));
164 wantedFields.add(PDBFTSRestClient.getInstance()
165 .getDataColumnByNameOrCode("title"));
166 } catch (Exception e1)
168 e1.printStackTrace();
171 FTSRestRequest request = new FTSRestRequest();
172 request.setAllowEmptySeq(false);
173 request.setResponseSize(100);
174 request.setFieldToSearchBy("text:");
175 request.setSearchTerm("abc");
176 request.setWantedFields(wantedFields);
178 String jsonErrorResponse = "";
181 jsonErrorResponse = readJsonStringFromFile("test/jalview/io/pdb_request_json_error.txt");
182 } catch (IOException e)
187 String parsedErrorResponse = PDBFTSRestClient
188 .parseJsonExceptionString(jsonErrorResponse);
190 String expectedErrorMsg = "\n============= PDB Rest Client RunTime error =============\n"
192 + "Message: org.apache.solr.search.SyntaxError: Cannot parse 'text:abc OR text:go:abc AND molecule_sequence:['' TO *]': Encountered \" \":\" \": \"\" at line 1, column 19.\n"
193 + "query: text:abc OR text:go:abc AND molecule_sequence:['' TO *]\n"
196 assertEquals(expectedErrorMsg, parsedErrorResponse);
199 @Test(groups = { "External" }, expectedExceptions = Exception.class)
200 public void testForExpectedRuntimeException() throws Exception
202 // JBPNote: looks like this test fails for no good reason - what exception was supposed to be raised ?
203 List<FTSDataColumnI> wantedFields = new ArrayList<FTSDataColumnI>();
204 wantedFields.add(PDBFTSRestClient.getInstance()
205 .getDataColumnByNameOrCode("pdb_id"));
207 FTSRestRequest request = new FTSRestRequest();
208 request.setFieldToSearchBy("text:");
209 request.setSearchTerm("abc OR text:go:abc");
210 request.setWantedFields(wantedFields);
211 PDBFTSRestClient.getInstance().executeRequest(request);
214 // JBP: Is this actually external ? Looks like it is mocked
215 // JBP looks like the mock is not up to date for this test
216 @Test(groups = { "External" })
217 public void parsePDBJsonResponseTest()
219 List<FTSDataColumnI> wantedFields = new ArrayList<FTSDataColumnI>();
222 wantedFields.add(PDBFTSRestClient.getInstance()
223 .getDataColumnByNameOrCode("molecule_type"));
224 wantedFields.add(PDBFTSRestClient.getInstance()
225 .getDataColumnByNameOrCode("pdb_id"));
226 wantedFields.add(PDBFTSRestClient.getInstance()
227 .getDataColumnByNameOrCode("genus"));
228 wantedFields.add(PDBFTSRestClient.getInstance()
229 .getDataColumnByNameOrCode("gene_name"));
230 wantedFields.add(PDBFTSRestClient.getInstance()
231 .getDataColumnByNameOrCode("title"));
232 } catch (Exception e1)
234 e1.printStackTrace();
237 FTSRestRequest request = new FTSRestRequest();
238 request.setAllowEmptySeq(false);
239 request.setWantedFields(wantedFields);
241 String jsonString = "";
244 jsonString = readJsonStringFromFile("test/jalview/io/pdb_response_json.txt");
245 } catch (IOException e)
249 FTSRestResponse response = PDBFTSRestClient.parsePDBJsonResponse(
250 jsonString, request);
251 assertTrue(response.getSearchSummary() != null);
252 assertTrue(response.getNumberOfItemsFound() == 931);
253 assertTrue(response.getSearchSummary().size() == 14);
254 System.out.println("Search summary : " + response.getSearchSummary());
257 @Test(groups = { "Functional" })
258 public void getPDBIdColumIndexTest()
260 List<FTSDataColumnI> wantedFields = new ArrayList<FTSDataColumnI>();
263 wantedFields.add(PDBFTSRestClient.getInstance()
264 .getDataColumnByNameOrCode("molecule_type"));
265 wantedFields.add(PDBFTSRestClient.getInstance()
266 .getDataColumnByNameOrCode("genus"));
267 wantedFields.add(PDBFTSRestClient.getInstance()
268 .getDataColumnByNameOrCode("gene_name"));
269 wantedFields.add(PDBFTSRestClient.getInstance()
270 .getDataColumnByNameOrCode("title"));
271 wantedFields.add(PDBFTSRestClient.getInstance()
272 .getDataColumnByNameOrCode("pdb_id"));
273 } catch (Exception e)
279 assertEquals(5, PDBFTSRestClient.getInstance()
280 .getPrimaryKeyColumIndex(wantedFields, true));
281 assertEquals(4, PDBFTSRestClient.getInstance()
282 .getPrimaryKeyColumIndex(wantedFields, false));
283 } catch (Exception e)
285 // TODO Auto-generated catch block
290 @Test(groups = { "External" })
291 public void externalServiceIntegrationTest()
293 ClientConfig clientConfig = new DefaultClientConfig();
294 Client client = Client.create(clientConfig);
296 // Build request parameters for the REST Request
297 WebResource webResource = client
298 .resource(PDBFTSRestClient.PDB_SEARCH_ENDPOINT)
299 .queryParam("wt", "json").queryParam("rows", String.valueOf(1))
300 .queryParam("q", "text:abc AND molecule_sequence:['' TO *]");
302 // Execute the REST request
303 ClientResponse clientResponse = webResource.accept(
304 MediaType.APPLICATION_JSON).get(ClientResponse.class);
306 // Get the JSON string from the response object
307 String pdbJsonResponseString = clientResponse.getEntity(String.class);
309 // Check the response status and report exception if one occurs
310 if (clientResponse.getStatus() != 200)
312 Assert.fail("Webservice call failed!!!");
318 JSONParser jsonParser = new JSONParser();
319 JSONObject jsonObj = (JSONObject) jsonParser
320 .parse(pdbJsonResponseString);
321 JSONObject pdbResponse = (JSONObject) jsonObj.get("response");
322 String queryTime = ((JSONObject) jsonObj.get("responseHeader"))
323 .get("QTime").toString();
324 String numFound = pdbResponse.get("numFound").toString();
325 JSONArray docs = (JSONArray) pdbResponse.get("docs");
326 Iterator<JSONObject> docIter = docs.iterator();
328 assertTrue("Couldn't Retrieve 'response' object",
329 pdbResponse != null);
330 assertTrue("Couldn't Retrieve 'QTime' value", queryTime != null);
331 assertTrue("Couldn't Retrieve 'numFound' value", numFound != null);
332 assertTrue("Couldn't Retrieve 'docs' object", docs != null
333 || !docIter.hasNext());
335 JSONObject pdbJsonDoc = docIter.next();
337 for (FTSDataColumnI field : PDBFTSRestClient.getInstance()
338 .getAllFTSDataColumns())
340 if (field.getName().equalsIgnoreCase("ALL"))
344 if (pdbJsonDoc.get(field.getCode()) == null)
346 // System.out.println(">>>\t" + field.getCode());
347 assertTrue(field.getCode()
348 + " has been removed from PDB doc Entity",
349 !pdbJsonResponseString.contains(field.getCode()));
352 } catch (ParseException e)
354 Assert.fail(">>> Test failed due to exception while parsing pdb response json !!!");
361 * reads any string from filePath
364 * @throws IOException
366 public static String readJsonStringFromFile(String filePath) throws IOException
369 BufferedReader br = new BufferedReader(new FileReader(filePath));
372 StringBuilder sb = new StringBuilder();
373 String line = br.readLine();
378 sb.append(System.lineSeparator());
379 line = br.readLine();
381 fileContent = sb.toString();
389 public static void setMock()
391 String[][] mocks = new String[2][];
392 mocks[0] = new String[] {
393 "https://www.ebi.ac.uk/pdbe/search/pdb/select?wt=json&fl=pdb_id,title,experimental_method,resolution&rows=500&start=0&q=(4igk+OR+1t15+OR+4ifi+OR+1t29+OR+3pxb+OR+4y2g+OR+1y98+OR+1jnx+OR+3pxa+OR+3k0h+OR+3k0k+OR+1n5o+OR+3pxc+OR+3pxd+OR+1t2u+OR+3k15+OR+3pxe+OR+3k16+OR+4ofb+OR+3coj+OR+7lyb+OR+1t2v+OR+4y18+OR+4jlu+OR+4u4a+OR+2ing+OR+7jzv+OR+6g2i+OR+1jm7+OR+1oqa)+AND+molecule_sequence:%5B''+TO+*%5D+AND+status:REL&sort=",
394 "{\n" + " \"responseHeader\":{\n" + " \"status\":0,\n"
395 + " \"QTime\":0,\n" + " \"params\":{\n"
396 + " \"q\":\"(4igk OR 1t15 OR 4ifi OR 1t29 OR 3pxb OR 4y2g OR 1y98 OR 1jnx OR 3pxa OR 3k0h OR 3k0k OR 1n5o OR 3pxc OR 3pxd OR 1t2u OR 3k15 OR 3pxe OR 3k16 OR 4ofb OR 3coj OR 7lyb OR 1t2v OR 4y18 OR 4jlu OR 4u4a OR 2ing OR 7jzv OR 6g2i OR 1jm7 OR 1oqa) AND molecule_sequence:['' TO *] AND status:REL\",\n"
397 + " \"fl\":\"pdb_id,title,experimental_method,resolution\",\n"
398 + " \"start\":\"0\",\n" + " \"sort\":\"\",\n"
399 + " \"rows\":\"500\",\n" + " \"wt\":\"json\"}},\n"
400 + " \"response\":{\"numFound\":64,\"start\":0,\"docs\":[\n"
402 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
403 + " \"pdb_id\":\"4ofb\",\n"
404 + " \"resolution\":3.05,\n"
405 + " \"title\":\"Crystal structure of human BRCA1 BRCT in complex with nonphosphopeptide inhibitor\"},\n"
407 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
408 + " \"pdb_id\":\"3pxe\",\n"
409 + " \"resolution\":2.85,\n"
410 + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: E1836K\"},\n"
412 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
413 + " \"pdb_id\":\"4jlu\",\n"
414 + " \"resolution\":3.5,\n"
415 + " \"title\":\"Crystal structure of BRCA1 BRCT with doubly phosphorylated Abraxas\"},\n"
417 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
418 + " \"pdb_id\":\"4y2g\",\n"
419 + " \"resolution\":2.5,\n"
420 + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas single phosphorylated peptide\"},\n"
422 + " \"experimental_method\":[\"Solution NMR\"],\n"
423 + " \"pdb_id\":\"1oqa\",\n"
424 + " \"title\":\"Solution structure of the BRCT-c domain from human BRCA1\"},\n"
426 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
427 + " \"pdb_id\":\"4u4a\",\n"
428 + " \"resolution\":3.51,\n"
429 + " \"title\":\"Complex Structure of BRCA1 BRCT with singly phospho Abraxas\"},\n"
431 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
432 + " \"pdb_id\":\"1t2v\",\n"
433 + " \"resolution\":3.3,\n"
434 + " \"title\":\"Structural basis of phospho-peptide recognition by the BRCT domain of BRCA1, structure with phosphopeptide\"},\n"
436 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
437 + " \"pdb_id\":\"3k15\",\n"
438 + " \"resolution\":2.8,\n"
439 + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n"
441 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
442 + " \"pdb_id\":\"1t15\",\n"
443 + " \"resolution\":1.85,\n"
444 + " \"title\":\"Crystal Structure of the Brca1 BRCT Domains in Complex with the Phosphorylated Interacting Region from Bach1 Helicase\"},\n"
446 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
447 + " \"pdb_id\":\"3k16\",\n"
448 + " \"resolution\":3.0,\n"
449 + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus\"},\n"
451 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
452 + " \"pdb_id\":\"1t29\",\n"
453 + " \"resolution\":2.3,\n"
454 + " \"title\":\"Crystal structure of the BRCA1 BRCT repeats bound to a phosphorylated BACH1 peptide\"},\n"
456 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
457 + " \"pdb_id\":\"1y98\",\n"
458 + " \"resolution\":2.5,\n"
459 + " \"title\":\"Structure of the BRCT repeats of BRCA1 bound to a CtIP phosphopeptide.\"},\n"
461 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
462 + " \"pdb_id\":\"4ifi\",\n"
463 + " \"resolution\":2.2,\n"
464 + " \"title\":\"Structure of human BRCA1 BRCT in complex with BAAT peptide\"},\n"
466 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
467 + " \"pdb_id\":\"3k0k\",\n"
468 + " \"resolution\":2.7,\n"
469 + " \"title\":\"Crystal Structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus.\"},\n"
471 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
472 + " \"pdb_id\":\"3k0h\",\n"
473 + " \"resolution\":2.7,\n"
474 + " \"title\":\"The crystal structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n"
476 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
477 + " \"pdb_id\":\"3pxd\",\n"
478 + " \"resolution\":2.8,\n"
479 + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: R1835P\"},\n"
481 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
482 + " \"pdb_id\":\"3pxc\",\n"
483 + " \"resolution\":2.8,\n"
484 + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: R1699Q\"},\n"
486 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
487 + " \"pdb_id\":\"3pxa\",\n"
488 + " \"resolution\":2.55,\n"
489 + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: G1656D\"},\n"
491 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
492 + " \"pdb_id\":\"1jnx\",\n"
493 + " \"resolution\":2.5,\n"
494 + " \"title\":\"Crystal structure of the BRCT repeat region from the breast cancer associated protein, BRCA1\"},\n"
496 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
497 + " \"pdb_id\":\"4igk\",\n"
498 + " \"resolution\":1.75,\n"
499 + " \"title\":\"Structure of human BRCA1 BRCT in complex with ATRIP peptide\"},\n"
501 + " \"experimental_method\":[\"Solution NMR\"],\n"
502 + " \"pdb_id\":\"1jm7\",\n"
503 + " \"title\":\"Solution structure of the BRCA1/BARD1 RING-domain heterodimer\"},\n"
505 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
506 + " \"pdb_id\":\"4jlu\",\n"
507 + " \"resolution\":3.5,\n"
508 + " \"title\":\"Crystal structure of BRCA1 BRCT with doubly phosphorylated Abraxas\"},\n"
510 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
511 + " \"pdb_id\":\"6g2i\",\n"
512 + " \"resolution\":5.9,\n"
513 + " \"title\":\"Filament of acetyl-CoA carboxylase and BRCT domains of BRCA1 (ACC-BRCT) at 5.9 A resolution\"},\n"
515 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
516 + " \"pdb_id\":\"3coj\",\n"
517 + " \"resolution\":3.21,\n"
518 + " \"title\":\"Crystal Structure of the BRCT Domains of Human BRCA1 in Complex with a Phosphorylated Peptide from Human Acetyl-CoA Carboxylase 1\"},\n"
520 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
521 + " \"pdb_id\":\"3pxb\",\n"
522 + " \"resolution\":2.5,\n"
523 + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: T1700A\"},\n"
525 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
526 + " \"pdb_id\":\"1t2u\",\n"
527 + " \"resolution\":2.8,\n"
528 + " \"title\":\"Structural basis of phosphopeptide recognition by the BRCT domain of BRCA1: structure of BRCA1 missense variant V1809F\"},\n"
530 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
531 + " \"pdb_id\":\"1n5o\",\n"
532 + " \"resolution\":2.8,\n"
533 + " \"title\":\"Structural consequences of a cancer-causing BRCA1-BRCT missense mutation\"},\n"
535 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
536 + " \"pdb_id\":\"4u4a\",\n"
537 + " \"resolution\":3.51,\n"
538 + " \"title\":\"Complex Structure of BRCA1 BRCT with singly phospho Abraxas\"},\n"
540 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
541 + " \"pdb_id\":\"4y2g\",\n"
542 + " \"resolution\":2.5,\n"
543 + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas single phosphorylated peptide\"},\n"
545 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
546 + " \"pdb_id\":\"3pxe\",\n"
547 + " \"resolution\":2.85,\n"
548 + " \"title\":\"Impact of BRCA1 BRCT domain missense substitutions on phospho-peptide recognition: E1836K\"},\n"
550 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
551 + " \"pdb_id\":\"4ofb\",\n"
552 + " \"resolution\":3.05,\n"
553 + " \"title\":\"Crystal structure of human BRCA1 BRCT in complex with nonphosphopeptide inhibitor\"},\n"
555 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
556 + " \"pdb_id\":\"4y18\",\n"
557 + " \"resolution\":3.5,\n"
558 + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas double phosphorylated peptide\"},\n"
560 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
561 + " \"pdb_id\":\"2ing\",\n"
562 + " \"resolution\":3.6,\n"
563 + " \"title\":\"X-ray Structure of the BRCA1 BRCT mutant M1775K\"},\n"
565 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
566 + " \"pdb_id\":\"1t29\",\n"
567 + " \"resolution\":2.3,\n"
568 + " \"title\":\"Crystal structure of the BRCA1 BRCT repeats bound to a phosphorylated BACH1 peptide\"},\n"
570 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
571 + " \"pdb_id\":\"1t2v\",\n"
572 + " \"resolution\":3.3,\n"
573 + " \"title\":\"Structural basis of phospho-peptide recognition by the BRCT domain of BRCA1, structure with phosphopeptide\"},\n"
575 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
576 + " \"pdb_id\":\"1t15\",\n"
577 + " \"resolution\":1.85,\n"
578 + " \"title\":\"Crystal Structure of the Brca1 BRCT Domains in Complex with the Phosphorylated Interacting Region from Bach1 Helicase\"},\n"
580 + " \"experimental_method\":[\"Solution NMR\"],\n"
581 + " \"pdb_id\":\"1jm7\",\n"
582 + " \"title\":\"Solution structure of the BRCA1/BARD1 RING-domain heterodimer\"},\n"
584 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
585 + " \"pdb_id\":\"4ifi\",\n"
586 + " \"resolution\":2.2,\n"
587 + " \"title\":\"Structure of human BRCA1 BRCT in complex with BAAT peptide\"},\n"
589 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
590 + " \"pdb_id\":\"4igk\",\n"
591 + " \"resolution\":1.75,\n"
592 + " \"title\":\"Structure of human BRCA1 BRCT in complex with ATRIP peptide\"},\n"
594 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
595 + " \"pdb_id\":\"1y98\",\n"
596 + " \"resolution\":2.5,\n"
597 + " \"title\":\"Structure of the BRCT repeats of BRCA1 bound to a CtIP phosphopeptide.\"},\n"
599 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
600 + " \"pdb_id\":\"3k15\",\n"
601 + " \"resolution\":2.8,\n"
602 + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n"
604 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
605 + " \"pdb_id\":\"3k0k\",\n"
606 + " \"resolution\":2.7,\n"
607 + " \"title\":\"Crystal Structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus.\"},\n"
609 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
610 + " \"pdb_id\":\"3k16\",\n"
611 + " \"resolution\":3.0,\n"
612 + " \"title\":\"Crystal Structure of BRCA1 BRCT D1840T in complex with a minimal recognition tetrapeptide with a free carboxy C-terminus\"},\n"
614 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
615 + " \"pdb_id\":\"3k0h\",\n"
616 + " \"resolution\":2.7,\n"
617 + " \"title\":\"The crystal structure of BRCA1 BRCT in complex with a minimal recognition tetrapeptide with an amidated C-terminus\"},\n"
619 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
620 + " \"pdb_id\":\"4y18\",\n"
621 + " \"resolution\":3.5,\n"
622 + " \"title\":\"Structure of BRCA1 BRCT domains in complex with Abraxas double phosphorylated peptide\"},\n"
624 + " \"experimental_method\":[\"X-ray diffraction\"],\n"
625 + " \"pdb_id\":\"3coj\",\n"
626 + " \"resolution\":3.21,\n"
627 + " \"title\":\"Crystal Structure of the BRCT Domains of Human BRCA1 in Complex with a Phosphorylated Peptide from Human Acetyl-CoA Carboxylase 1\"},\n"
629 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
630 + " \"pdb_id\":\"7jzv\",\n"
631 + " \"resolution\":3.9,\n"
632 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
634 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
635 + " \"pdb_id\":\"7jzv\",\n"
636 + " \"resolution\":3.9,\n"
637 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
639 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
640 + " \"pdb_id\":\"7lyb\",\n"
641 + " \"resolution\":3.28,\n"
642 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
644 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
645 + " \"pdb_id\":\"7lyb\",\n"
646 + " \"resolution\":3.28,\n"
647 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
649 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
650 + " \"pdb_id\":\"7lyb\",\n"
651 + " \"resolution\":3.28,\n"
652 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
654 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
655 + " \"pdb_id\":\"7jzv\",\n"
656 + " \"resolution\":3.9,\n"
657 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
659 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
660 + " \"pdb_id\":\"7lyb\",\n"
661 + " \"resolution\":3.28,\n"
662 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
664 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
665 + " \"pdb_id\":\"7jzv\",\n"
666 + " \"resolution\":3.9,\n"
667 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
669 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
670 + " \"pdb_id\":\"7lyb\",\n"
671 + " \"resolution\":3.28,\n"
672 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
674 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
675 + " \"pdb_id\":\"7jzv\",\n"
676 + " \"resolution\":3.9,\n"
677 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
679 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
680 + " \"pdb_id\":\"7lyb\",\n"
681 + " \"resolution\":3.28,\n"
682 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
684 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
685 + " \"pdb_id\":\"7lyb\",\n"
686 + " \"resolution\":3.28,\n"
687 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
689 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
690 + " \"pdb_id\":\"7lyb\",\n"
691 + " \"resolution\":3.28,\n"
692 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
694 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
695 + " \"pdb_id\":\"7jzv\",\n"
696 + " \"resolution\":3.9,\n"
697 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
699 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
700 + " \"pdb_id\":\"6g2i\",\n"
701 + " \"resolution\":5.9,\n"
702 + " \"title\":\"Filament of acetyl-CoA carboxylase and BRCT domains of BRCA1 (ACC-BRCT) at 5.9 A resolution\"},\n"
704 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
705 + " \"pdb_id\":\"7jzv\",\n"
706 + " \"resolution\":3.9,\n"
707 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"},\n"
709 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
710 + " \"pdb_id\":\"7lyb\",\n"
711 + " \"resolution\":3.28,\n"
712 + " \"title\":\"Cryo-EM structure of the human nucleosome core particle in complex with BRCA1-BARD1-UbcH5c\"},\n"
714 + " \"experimental_method\":[\"Electron Microscopy\"],\n"
715 + " \"pdb_id\":\"7jzv\",\n"
716 + " \"resolution\":3.9,\n"
717 + " \"title\":\"Cryo-EM structure of the BRCA1-UbcH5c/BARD1 E3-E2 module bound to a nucleosome\"}]\n"
720 mocks[1] = new String[2];
722 mocks[1][0] = readJsonStringFromFile("test/jalview/fts/threedbeacons/p01308_pdbfts_query.txt").trim();
723 mocks[1][1] = readJsonStringFromFile("test/jalview/fts/threedbeacons/p01308_pdbfts_resp.txt").trim();
724 } catch (Throwable e)
726 Assert.fail("Couldn't read mock data.",e);
729 FTSRestClient.createMockFTSRestClient((FTSRestClient) PDBFTSRestClient.getInstance(), mocks);