+ // 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)
+ Console.debug("##### hasPAEMatrix()=" + hasPAEMatrix());
+ Console.debug("##### isAlphafoldModel()=" + isAlphafoldModel());
+ Console.debug("##### getPAEMatrix()=" + getPAEMatrix());
+ if (hasPAEMatrix())
+ {
+ Alignment al = new Alignment(prot.toArray(new SequenceI[0]));
+ if (isAlphafoldModel())
+ {
+ EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0,
+ null, false, false);
+ }
+ else
+ {
+ EBIAlfaFold.addPAEToStructure(null, this.getInFile(),
+ new File(this.getPAEMatrix()));
+ }
+
+ Console.debug("##### al.getAlignmentAnnotation()="
+ + al.getAlignmentAnnotation());
+ if (al.getAlignmentAnnotation() != null)
+ {
+ for (AlignmentAnnotation alann : al.getAlignmentAnnotation())
+ {
+ Console.debug("##### Adding to alann" + alann.annotationId + "("
+ + alann.getCalcId() + ")");
+ annotations.add(alann);
+ }
+ }
+ }