From: Ben Soares Date: Mon, 27 Feb 2023 09:52:13 +0000 (+0000) Subject: Merge branch 'develop' into features/r2_11_2_alphafold/JAL-629 X-Git-Tag: Release_2_11_4_0~469 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9c07446f49c3a735b6f97d3c88760557f6d99fb5;p=jalview.git Merge branch 'develop' into features/r2_11_2_alphafold/JAL-629 --- 9c07446f49c3a735b6f97d3c88760557f6d99fb5 diff --cc src/jalview/ws/dbsources/EBIAlfaFold.java index 4ed28fc,72fd8d9..bee1ae9 --- a/src/jalview/ws/dbsources/EBIAlfaFold.java +++ b/src/jalview/ws/dbsources/EBIAlfaFold.java @@@ -382,10 -402,29 +382,28 @@@ public class EBIAlfaFold extends EbiFil } } + JSONObject paeDict = parseJSONtoPAEContactMatrix(pae_input); + if (paeDict == null) + { + Console.debug("JSON file did not parse properly."); + return false; + } + ContactMatrixI matrix = new PAEContactMatrix(sequence, + (Map) paeDict); + + AlignmentAnnotation cmannot = sequence.addContactList(matrix); + pdbAlignment.addAnnotation(cmannot); + + return true; + } + + public static JSONObject parseJSONtoPAEContactMatrix( - InputStream pae_input) throws IOException,ParseException ++ InputStream pae_input) throws IOException, ParseException + { Object paeJson = Platform.parseJSON(pae_input); - JSONObject paeDict=null; + JSONObject paeDict = null; if (paeJson instanceof JSONObject) { - Console.debug("***** paeJson is a JSONObject"); paeDict = (JSONObject) paeJson; } else if (paeJson instanceof JSONArray)