X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;fp=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;h=25b52b4bc126625c84d3fbc04818bc7939c03fa0;hb=0c08a3e1a37eca3a7c011a56f0c353258b0e8020;hp=f0e477cb0f6c54b234a12e0af7465c5ee7693b9f;hpb=366c4eed3d8a0bee653f9d4c0f16eebb9ff3cbb6;p=jalview.git diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index f0e477c..25b52b4 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -47,6 +47,7 @@ import jalview.datamodel.SequenceI; import jalview.datamodel.annotations.AlphaFoldAnnotationRowBuilder; import jalview.datamodel.annotations.AnnotationRowBuilder; import jalview.io.DataSourceType; +import jalview.io.FileFormatException; import jalview.io.FileParse; import jalview.io.StructureFile; import jalview.schemes.ResidueProperties; @@ -303,18 +304,29 @@ public class JmolParser extends StructureFile implements JmolStatusListener // add a PAEMatrix if set (either by above or otherwise) if (hasPAEMatrix()) { - Alignment al = new Alignment(prot.toArray(new SequenceI[0])); - EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0, - null, false, false); - - if (al.getAlignmentAnnotation() != null) + try { - for (AlignmentAnnotation alann : al.getAlignmentAnnotation()) + Alignment al = new Alignment(prot.toArray(new SequenceI[0])); + EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0, + null, false, false); + + if (al.getAlignmentAnnotation() != null) { - annotations.add(alann); + for (AlignmentAnnotation alann : al.getAlignmentAnnotation()) + { + annotations.add(alann); + } } + } catch (Throwable ff) + { + Console.error("Couldn't import PAE Matrix from " + getPAEMatrix(), + ff); + warningMessage += "Couldn't import PAE Matrix" + + getNewlineString() + ff.getLocalizedMessage() + + getNewlineString(); } } + } catch (OutOfMemoryError er) { System.out.println(