git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3858 report errors when trying to parse JSON to extract PAE and raise a warning...
[jalview.git]
/
src
/
jalview
/
ext
/
jmol
/
JmolParser.java
diff --git
a/src/jalview/ext/jmol/JmolParser.java
b/src/jalview/ext/jmol/JmolParser.java
index
f0e477c
..
25b52b4
100644
(file)
--- 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.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;
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())
{
// 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(
} catch (OutOfMemoryError er)
{
System.out.println(