From: TZVanaalten Date: Wed, 30 Aug 2017 14:17:27 +0000 (+0100) Subject: JAL-2629 for multi-job hmmbuilds, group names are now the HMM names X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=eea8fd41febcec44a0e098ddfbea74545561f473;p=jalview.git JAL-2629 for multi-job hmmbuilds, group names are now the HMM names --- 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;