From: TZVanaalten Date: Fri, 25 Aug 2017 13:53:58 +0000 (+0100) Subject: JAL-2629 fix for hmmbuild failing due to whitespace in the name X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a3a728e8671a0bd737bf112d4f60f5b9550b523c;p=jalview.git JAL-2629 fix for hmmbuild failing due to whitespace in the name --- diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index faba183..dc24d9e 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -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