X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCommands.java;h=3608295eded0c99135ac9584447aecb182d31631;hb=79456f40b33e73e2fb5420a3287ae80854281ef6;hp=328c6e18c86ecc6a4620e3d217cf8cbec1e66432;hpb=b4643d75fb09207306e83fa1fee277cc2fd089c5;p=jalview.git diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 328c6e1..3608295 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -309,7 +309,7 @@ public class Commands // Show secondary structure annotations? boolean showSSAnnotations = ArgParser.getFromSubValArgOrPref(avm, - Arg.SSANNOTATIONS, av.getSubVals(), null, + Arg.SHOWSSANNOTATIONS, av.getSubVals(), null, "STRUCT_FROM_PDB", true); af.setAnnotationsVisibility(showSSAnnotations, true, false); @@ -330,33 +330,6 @@ public class Commands af.getCurrentView().getAlignment(), hideThese, null, false, false); } - else - /* - * comment out hacky approach up to here and add this line: if - * (showTemperatureFactor) - */ - { - /* - if (avm.containsArg(Arg.TEMPFAC_LABEL)) - { - AlignmentAnnotation aa = AlignmentUtils - .getFirstSequenceAnnotationOfType( - af.getCurrentView().getAlignment(), - AlignmentAnnotation.LINE_GRAPH); - String label = avm.getValue(Arg.TEMPFAC_LABEL); - if (aa != null) - { - aa.label = label; - } - else - { - Console.info( - "Could not find annotation to apply tempfac_label '" - + label); - } - } - */ - } // store the AlignFrame for this id afMap.put(id, af); @@ -493,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 { @@ -515,7 +487,7 @@ public class Commands // showing annotations from structure file or not boolean ssFromStructure = ArgParser.getFromSubValArgOrPref(avm, - Arg.SSANNOTATIONS, subVals, null, "STRUCT_FROM_PDB", + Arg.SHOWSSANNOTATIONS, subVals, null, "STRUCT_FROM_PDB", true); // get TEMPFAC type from subvals or Arg.TEMPFAC in case user Adds @@ -848,9 +820,9 @@ public class Commands return null; if (subVals != null) { - if (subVals.has("seqid")) + if (subVals.has(Arg.SEQID.getName())) { - seq = al.findName(subVals.get("seqid")); + seq = al.findName(subVals.get(Arg.SEQID.getName())); } else if (-1 < subVals.getIndex() && subVals.getIndex() < al.getSequences().size())