+ // load a pAE file if given
+ if (ArgParser.getValues(m, Arg.PAEMATRIX) != null)
+ {
+ AlignFrame af = afMap.get(id);
+ if (af != null)
+ {
+ for (String val : ArgParser.getValues(m, Arg.PAEMATRIX))
+ {
+ SubVal subVal = ArgParser.getSubVal(val);
+ File paeFile = new File(subVal.content);
+ String paePath = null;
+ try
+ {
+ paePath = paeFile.getCanonicalPath();
+ } catch (IOException e)
+ {
+ paePath = paeFile.getAbsolutePath();
+ Console.warn(
+ "Problem with the PAE file path: '" + paePath + "'");
+ }
+ String structId = "structid".equals(subVal.keyName)
+ ? subVal.keyValue
+ : null;
+ if (subVal.notSet())
+ {
+ // take structid from pdbfilename
+ }
+ if ("structfile".equals(subVal.keyName))
+ {
+ Console.info("***** Attaching paeFile '" + paePath + "' to "
+ + subVal.keyName + "=" + subVal.keyValue);
+ EBIAlfaFold.addAlphaFoldPAEToStructure(
+ af.getCurrentView().getAlignment(), paeFile,
+ subVal.index, subVal.keyValue, false);
+ }
+ else if ("structid".equals(subVal.keyName))
+ {
+ Console.info("***** Attaching paeFile '" + paePath + "' to "
+ + subVal.keyName + "=" + subVal.keyValue);
+ EBIAlfaFold.addAlphaFoldPAEToStructure(
+ af.getCurrentView().getAlignment(), paeFile,
+ subVal.index, subVal.keyValue, true);
+ }
+ else
+ {
+ Console.debug("***** Attaching paeFile '" + paePath
+ + "' to sequence index " + subVal.index);
+ EBIAlfaFold.addAlphaFoldPAEToSequence(
+ af.getCurrentView().getAlignment(), paeFile,
+ subVal.index, null);
+ // required to readjust the height and position of the pAE
+ // annotation
+ }
+ for (AlignmentViewPanel ap : af.getAlignPanels())
+ {
+ ap.adjustAnnotationHeight();
+ }
+ }
+ }
+ }
+