JAL-629 Added linkedId to ArgValuesMap for reference. Updated Arg descriptions. Made...
[jalview.git] / src / jalview / bin / Commands.java
index af4c675..3608295 100644 (file)
@@ -466,14 +466,13 @@ public class Commands
           String structureFilepath = structureFile.getAbsolutePath();
 
           // get PAEMATRIX file and label from subvals or Arg.PAEMATRIX
-          String paeFilepath = subVals.getWithSubstitutions(argParser, id,
-                  "paematrix");
-          ArgValue paeAv = getArgAssociatedWithStructure(Arg.PAEMATRIX, avm,
-                  af, structureFilepath);
-          if (paeFilepath == null && paeAv != null)
+          String paeFilepath = ArgParser
+                  .getFromSubValArgOrPrefWithSubstitutions(argParser, avm,
+                          Arg.PAEMATRIX, Position.AFTER, av, subVals, null,
+                          null, null);
+          if (paeFilepath != null)
           {
-            SubVals sv = paeAv.getSubVals();
-            File paeFile = new File(sv.getContent());
+            File paeFile = new File(paeFilepath);
 
             try
             {