From: Jim Procter Date: Fri, 1 Jun 2018 14:00:49 +0000 (+0100) Subject: JAL-2937 hmmbuild input data generated via AlignmentView from alignment, not directly... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1c02310d08299019905c0c436cd91a41412510ae;p=jalview.git JAL-2937 hmmbuild input data generated via AlignmentView from alignment, not directly from viewport --- diff --git a/src/jalview/hmmer/HMMBuild.java b/src/jalview/hmmer/HMMBuild.java index 6de7029..6fcd6db 100644 --- a/src/jalview/hmmer/HMMBuild.java +++ b/src/jalview/hmmer/HMMBuild.java @@ -4,6 +4,7 @@ import jalview.api.AlignViewportI; import jalview.bin.Cache; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; +import jalview.datamodel.AlignmentView; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; @@ -105,24 +106,29 @@ public class HMMBuild extends HmmerCommand { foundArg = true; String value = arg.getValue(); + if (MessageManager.getString("label.alignment").equals(value)) { - runBuildFor.add(alignment); + runBuildFor.add(viewport.getAlignmentView(false) + .getVisibleAlignment('-')); } else if (MessageManager.getString("label.groups_and_alignment") .equals(value)) { - runBuildFor.add(alignment); - runBuildFor.addAll(viewport.getAlignment().getGroups()); + AlignmentView av = viewport.getAlignmentView(true); + runBuildFor.add(av.getVisibleAlignment('-')); + runBuildFor.addAll(av.getVisibleGroups('-')); } else if (MessageManager.getString("label.groups").equals(value)) { - runBuildFor.addAll(viewport.getAlignment().getGroups()); + AlignmentView av = viewport.getAlignmentView(false); + runBuildFor.addAll(av.getVisibleGroups('-')); } else if (MessageManager.getString("label.selected_group") .equals(value)) { - runBuildFor.add(viewport.getSelectionGroup()); + AlignmentView av = viewport.getAlignmentView(true); + runBuildFor.add(av.getVisibleAlignment('-')); } } else if (MessageManager.getString("label.use_reference") @@ -183,7 +189,8 @@ public class HMMBuild extends HmmerCommand else { SequenceI[] sel = ((SequenceGroup) ac) - .getSelectionAsNewSequences((AlignmentI) ac.getContext()); + .getSelectionAsNewSequences((AlignmentI) ac.getContext(), + false); for (SequenceI seq : sel) { copy.add(seq);