Merge branch 'features/r2_11_2_alphafold/JAL-2349_JAL-3855' into develop
authorJim Procter <j.procter@dundee.ac.uk>
Fri, 10 Jun 2022 11:13:11 +0000 (12:13 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Fri, 10 Jun 2022 11:13:11 +0000 (12:13 +0100)
12 files changed:
1  2 
src/jalview/api/AlignViewportI.java
src/jalview/appletgui/AnnotationPanel.java
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentAnnotation.java
src/jalview/gui/AnnotationPanel.java
src/jalview/io/AppletFormatAdapter.java
src/jalview/renderer/AnnotationRenderer.java
src/jalview/viewmodel/AlignmentViewport.java
src/jalview/ws/SequenceFetcher.java
src/jalview/ws/dbsources/EBIAlfaFold.java
test/jalview/gui/SeqPanelTest.java
test/jalview/ws/seqfetcher/DbRefFetcherTest.java

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -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)
      return pdbAlignment;
    }
  
+   private boolean importPaeJSONAsContactMatrix(AlignmentI pdbAlignment,
+           File pae) throws Exception
+   {
+     FileInputStream pae_input = new FileInputStream(pae);
+     List<Object> pae_obj = (List<Object>) Platform
+             .parseJSON(pae_input);
+     if (pae_obj == null)
+     {
+       return false;
+     }
+     ContactMatrixI matrix = new PAEContactMatrix(
+             pdbAlignment.getSequenceAt(0), (Map<String, Object>)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
Simple merge