From: Jim Procter Date: Sat, 15 Oct 2022 10:11:34 +0000 (+0100) Subject: JAL-3855 import pAE when StructureSelectionManager parses an alphaFold structure... X-Git-Tag: Release_2_11_4_0~549 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=356ec810340821d8b1b1701aae913b3a58778335;p=jalview.git JAL-3855 import pAE when StructureSelectionManager parses an alphaFold structure. Works but AlignmentI holding the contact matrices prevents transfer. --- diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 661ed33..ec123f4 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -37,6 +37,8 @@ import org.jmol.viewer.Viewer; import com.stevesoft.pat.Regex; +import jalview.bin.Console; +import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; import jalview.datamodel.PDBEntry; @@ -49,6 +51,7 @@ import jalview.io.StructureFile; import jalview.schemes.ResidueProperties; import jalview.util.Format; import jalview.util.MessageManager; +import jalview.ws.dbsources.EBIAlfaFold; import mc_view.Atom; import mc_view.PDBChain; import mc_view.Residue; @@ -278,6 +281,21 @@ public class JmolParser extends StructureFile implements JmolStatusListener createAnnotation(chainseq, chain, ms.at); } } + if (isAlphafoldModel()) + { + // TODO - work out how to handle different ways that pAE is provided + // + try + { + Console.info("retrieving pAE for " + pdbId); + Alignment al = new Alignment(prot.toArray(new SequenceI[0])); + EBIAlfaFold.retrieve_AlphaFold_pAE(pdbId, al, null); + ; + } catch (Throwable t) + { + Console.error("Couldn't get the pAE for " + pdbId, t); + } + } } catch (OutOfMemoryError er) { System.out.println( diff --git a/src/jalview/ws/dbsources/EBIAlfaFold.java b/src/jalview/ws/dbsources/EBIAlfaFold.java index fa867cd..0e148ff 100644 --- a/src/jalview/ws/dbsources/EBIAlfaFold.java +++ b/src/jalview/ws/dbsources/EBIAlfaFold.java @@ -274,6 +274,9 @@ public class EBIAlfaFold extends EbiFileRetrievedProxy pdbAlignment.getSequenceAt(0), (Map) pae_obj.get(0)); + // THIS IS NOT GOING TO WORK !!! + // ?? StructureFile assumes sequenceI holds all data, so AlignmentAnnotation + // needs to hold the contact matrix data. pdbAlignment.getSequenceAt(0) .addAlignmentAnnotation(pdbAlignment.addContactList(matrix)); return true;