From 5602a9c0504dd5849e3ce69814907f6b1a77f660 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Fri, 25 Aug 2017 14:51:03 +0100 Subject: [PATCH] jal-2629 fix for hmmbuild failing due to whitespace in the name --- src/jalview/hmmer/HMMBuildThread.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index faba183..d5e938a 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -36,6 +36,7 @@ public class HMMBuildThread implements Runnable SequenceGroup group; List params; + boolean multiJob; boolean forGroup = false; @@ -95,12 +96,14 @@ public class HMMBuildThread implements Runnable { alignment = viewport.getAlignment(); groups.addAll(viewport.getAlignment().getGroups()); + multiJob = true; break; } else if ("All groups".equals(value)) { alignment = null; groups = viewport.getAlignment().getGroups(); + multiJob = true; break; } else if ("Selected group".equals(value)) @@ -295,7 +298,11 @@ public class HMMBuildThread implements Runnable switch (argName) { case "HMM Name": - name = arg.getValue(); + if (!multiJob) + { + name = arg.getValue(); + name = name.trim(); + } break; case "Use Reference Annotation": command += "--hand "; @@ -306,8 +313,6 @@ public class HMMBuildThread implements Runnable } } - name = name.trim(); - if (name == null || "".equals(name)) { if (forGroup) @@ -327,7 +332,8 @@ 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 -- 1.7.10.2