X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCommands.java;fp=src%2Fjalview%2Fbin%2FCommands.java;h=737c9eb94a9903d46e8f65c4713de5d56b166f67;hb=d79e3747b8ce78b1ac7aa83402e31b7e5dccfe1b;hp=9a85f1ef615439f6085c6fa5897642531ed6747d;hpb=650e1941339ab7fad576b2edeb8a41fd96a87049;p=jalview.git diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 9a85f1e..737c9eb 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -456,35 +456,31 @@ public class Commands + Arg.STRUCTURE.argString() + "=" + val); continue; } + String structureFilename = null; File structureFile = null; if (subVals.getContent() != null && subVals.getContent().length() != 0) { - structureFile = new File(subVals.getContent()); + structureFilename = subVals.getContent(); Console.debug("Using structure file (from argument) '" - + structureFile.getAbsolutePath() + "'"); + + structureFilename + "'"); + structureFile = new File(structureFilename); } - // TRY THIS - /* - * PDBEntry fileEntry = new AssociatePdbFileWithSeq() - * .associatePdbWithSeq(selectedPdbFileName, DataSourceType.FILE, - * selectedSequence, true, Desktop.instance); - * - * sViewer = launchStructureViewer(ssm, new PDBEntry[] { fileEntry }, ap, new - * SequenceI[] { selectedSequence }); - * - */ /* THIS DOESN'T WORK */ else if (seq.getAllPDBEntries() != null && seq.getAllPDBEntries().size() > 0) { structureFile = new File( seq.getAllPDBEntries().elementAt(0).getFile()); - Console.debug("Using structure file (from sequence) '" - + structureFile.getAbsolutePath() + "'"); + if (structureFile != null) + { + Console.debug("Using structure file (from sequence) '" + + structureFile.getAbsolutePath() + "'"); + } + structureFilename = structureFile.getAbsolutePath(); } - if (structureFile == null) + if (structureFilename == null || structureFile == null) { addWarn("Not provided structure file with '" + val + "'"); continue; @@ -500,6 +496,8 @@ public class Commands Console.debug("Using structure file " + structureFile.getAbsolutePath()); + argParser.setStructureFilename(structureFilename); + // open structure view AlignmentPanel ap = af.alignPanel; if (headless) @@ -634,8 +632,8 @@ public class Commands for (ArgValue structureImageArgValue : avm .getArgValueList(Arg.STRUCTUREIMAGE)) { - String structureImageFilename = structureImageArgValue - .getValue(); + String structureImageFilename = argParser.makeSubstitutions( + structureImageArgValue.getValue(), id, true); if (structureViewer != null && structureImageFilename != null) { SubVals structureImageSubVals = null; @@ -682,6 +680,10 @@ public class Commands this.colourAlignFrame(af, imageColour); List extraCommands = new ArrayList<>(); + // these don't actually do anything to the output image since we + // renderScreenImage + // extraCommands.add("set antialiasImages on"); + // extraCommands.add("set antialiasTranslucent on"); String bgcolour = avm.getValueFromSubValOrArg( structureImageArgValue, Arg.BGCOLOUR,