From eea8fd41febcec44a0e098ddfbea74545561f473 Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Wed, 30 Aug 2017 15:17:27 +0100 Subject: [PATCH] JAL-2629 for multi-job hmmbuilds, group names are now the HMM names --- src/jalview/hmmer/HMMBuildThread.java | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index 4e0fd08..2ff89c1 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -32,6 +32,7 @@ public class HMMBuildThread implements Runnable AlignViewport viewport; + boolean multiJob = false; AlignmentI alignment; SequenceGroup group; List params; @@ -95,12 +96,20 @@ public class HMMBuildThread implements Runnable { alignment = viewport.getAlignment(); groups.addAll(viewport.getAlignment().getGroups()); + if (groups.size() > 0) + { + multiJob = true; + } break; } else if ("All groups".equals(value)) { alignment = null; groups = viewport.getAlignment().getGroups(); + if (groups.size() > 0) + { + multiJob = true; + } break; } else if ("Selected group".equals(value)) @@ -128,12 +137,9 @@ public class HMMBuildThread implements Runnable } } } - else + else if (viewport != null) { - if (viewport != null && alignment == null) - { - alignment = viewport.getAlignment(); - } + alignment = viewport.getAlignment(); } if (alignment != null) @@ -314,16 +320,14 @@ public class HMMBuildThread implements Runnable } } + if (forGroup && multiJob) + { + name = group.getName() + "_HMM"; + } if (name == null || "".equals(name)) { - if (forGroup) - { - name = group.getName(); - } - else - { if (af != null) { name = af.getTitle(); @@ -332,7 +336,7 @@ public class HMMBuildThread implements Runnable { name = "Alignment"; } - } + } command += "-n " + name.replace(' ', '_') + cmds.SPACE; -- 1.7.10.2