From: Jim Procter Date: Fri, 10 Jun 2022 11:13:11 +0000 (+0100) Subject: Merge branch 'features/r2_11_2_alphafold/JAL-2349_JAL-3855' into develop X-Git-Tag: Release_2_11_4_0~562 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fbfbbe26bee37143d5279fe4d254a5a89c96b021;p=jalview.git Merge branch 'features/r2_11_2_alphafold/JAL-2349_JAL-3855' into develop --- fbfbbe26bee37143d5279fe4d254a5a89c96b021 diff --cc src/jalview/ws/dbsources/EBIAlfaFold.java index e3687bd,bbb1f8b..7c72f4b --- a/src/jalview/ws/dbsources/EBIAlfaFold.java +++ b/src/jalview/ws/dbsources/EBIAlfaFold.java @@@ -159,8 -175,9 +177,9 @@@ public class EBIAlfaFold extends EbiFil try { File tmpFile = File.createTempFile(id, ".cif"); + Console.debug("Retrieving structure file for "+id+" from "+alphaFoldCif); UrlDownloadClient.download(alphaFoldCif, tmpFile); - + // may not need this check ? file = tmpFile.getAbsolutePath(); if (file == null) @@@ -186,10 -226,26 +228,28 @@@ return pdbAlignment; } + private boolean importPaeJSONAsContactMatrix(AlignmentI pdbAlignment, + File pae) throws Exception + { + FileInputStream pae_input = new FileInputStream(pae); + + List pae_obj = (List) Platform + .parseJSON(pae_input); + if (pae_obj == null) + { + return false; + } + ContactMatrixI matrix = new PAEContactMatrix( + pdbAlignment.getSequenceAt(0), (Map)pae_obj.get(0)); + + pdbAlignment.getSequenceAt(0).addAlignmentAnnotation(pdbAlignment.addContactList(matrix)); + return true; + } + /** - * general purpose structure importer - designed to yield alignment useful for transfer of annotation to associated sequences + * general purpose structure importer - designed to yield alignment useful for + * transfer of annotation to associated sequences + * * @param alphaFoldCif * @param tmpFile * @param id