JAL-2629 fix for hmmbuild failing due to whitespace in the name
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 25 Aug 2017 13:53:58 +0000 (14:53 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 25 Aug 2017 16:21:06 +0000 (17:21 +0100)
src/jalview/hmmer/HMMBuildThread.java

index faba183..dc24d9e 100644 (file)
@@ -296,6 +296,7 @@ public class HMMBuildThread implements Runnable
         {
         case "HMM Name":
           name = arg.getValue();
+          name = name.trim();
           break;
         case "Use Reference Annotation":
           command += "--hand ";
@@ -306,7 +307,7 @@ public class HMMBuildThread implements Runnable
       }
     }
 
-    name = name.trim();
+
 
     if (name == null || "".equals(name))
     {
@@ -327,7 +328,7 @@ public class HMMBuildThread implements Runnable
       }
     }
 
-    command += "-n " + name + cmds.SPACE;
+    command += "-n " + name.replace(' ', '_') + cmds.SPACE;
     if (!alignment.isNucleotide())
     {
       command += cmds.FORCEAMINO; // TODO check for rna