+ // if Alphafold, fetch the PAE matrix if doesn't already have one
+ if (isAlphafoldModel() && !hasPAEMatrix())
+ {
+ try
+ {
+ Console.info("Retrieving PAE for " + pdbId);
+ File paeFile = EBIAlfaFold.fetchAlphaFoldPAE(pdbId, null);
+ this.setPAEMatrix(paeFile.getAbsolutePath());
+ } catch (Throwable t)
+ {
+ Console.error("Couldn't get the pAE for " + pdbId, t);
+ }
+ }
+ // add a PAEMatrix if set (either by above or otherwise)
+ if (hasPAEMatrix())
+ {
+ try
+ {
+ Alignment al = new Alignment(prot.toArray(new SequenceI[0]));
+ EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0,
+ null, false, false, null);
+
+ if (al.getAlignmentAnnotation() != null)
+ {
+ 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();
+ }
+ }