JAL-2629 fix issue where trim termini setting would not update
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Sun, 13 Aug 2017 11:38:13 +0000 (12:38 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Sun, 13 Aug 2017 11:38:13 +0000 (12:38 +0100)
src/jalview/hmmer/HMMAlignThread.java
src/jalview/hmmer/HMMERCommands.java

index 49fc49d..c424cf0 100644 (file)
@@ -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);
index 71a7d10..bcd0662 100644 (file)
@@ -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();
+    }
   }
 
   /**