From 2dbf88889c406d32cf11d47e4a79ed719507f318 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Sun, 13 Aug 2017 12:38:13 +0100 Subject: [PATCH] JAL-2629 fix issue where trim termini setting would not update --- src/jalview/hmmer/HMMAlignThread.java | 12 +++++++++++- src/jalview/hmmer/HMMERCommands.java | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/jalview/hmmer/HMMAlignThread.java b/src/jalview/hmmer/HMMAlignThread.java index 49fc49d..c424cf0 100644 --- a/src/jalview/hmmer/HMMAlignThread.java +++ b/src/jalview/hmmer/HMMAlignThread.java @@ -163,7 +163,17 @@ public class HMMAlignThread implements Runnable { command += cmds.ALLCOL; } - command += cmds.TRIM + " -o" + inputTemp.getAbsolutePath() + cmds.SPACE + boolean trim = true; + String bool = Cache.getProperty("TRIM_TERMINI"); + if ("false".equals(bool)) + { + trim = false; + } + if (trim) + { + command += cmds.TRIM; + } + command += " -o" + inputTemp.getAbsolutePath() + cmds.SPACE + hmmTemp.getAbsolutePath() + cmds.SPACE + outTemp.getAbsolutePath(); cmds.runCommand(command); diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index 71a7d10..bcd0662 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -76,6 +76,8 @@ public class HMMERCommands public void runCommand(String command) throws IOException, InterruptedException { + try + { final Process p = Runtime.getRuntime().exec(command); new Thread(new Runnable() @@ -101,6 +103,10 @@ public class HMMERCommands }).start(); p.waitFor(); + } catch (Exception e) + { + e.printStackTrace(); + } } /** -- 1.7.10.2