From: Charles Ofoegbu Date: Thu, 27 Nov 2014 10:13:39 +0000 (+0000) Subject: JAL-1604 Entire sequence submision for MSA job bugfix X-Git-Tag: Jalview_2_9~139^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b58a17a47d215b541be4d8057eb88072c599087e;hp=--cc;p=jalview.git JAL-1604 Entire sequence submision for MSA job bugfix --- b58a17a47d215b541be4d8057eb88072c599087e diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 07c4a54..2a804ad 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -4184,6 +4184,21 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ msa = viewport.getAlignmentView(true); } + else if (viewport.getSelectionGroup() != null + && viewport.getSelectionGroup().getSize() == 1) + { + int option = JOptionPane + .showConfirmDialog( +this, + "More than one sequece group selection is required for this Job, click \n'Cancel' to edit your selection or 'Ok' to submit the entire sequence.", + "Invalid selection", + JOptionPane.OK_CANCEL_OPTION); + if (option == JOptionPane.OK_OPTION) + { + msa = viewport.getAlignmentView(false); + } + + } else { /* diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index c3661c3..39be454 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -212,7 +212,7 @@ public class MsaWSClient extends Jws2Client JOptionPane .showMessageDialog( alignFrame, - "A minimum of two sequences with at least three non-gap character \nis required to perform this operation", + "All selected sequence for this job must have a minimum of \nthree non-gap character to perform this operation", "Invalid selection", JOptionPane.INFORMATION_MESSAGE); return false; @@ -300,7 +300,7 @@ public class MsaWSClient extends Jws2Client { AlignmentView msa = alignFrame.gatherSequencesForAlignment(); - if (isValidAlignment(msa)) + if (msa != null && isValidAlignment(msa)) { new MsaWSClient(service, alignFrame.getTitle(), msa, withGaps, true, alignFrame.getViewport().getAlignment() @@ -325,7 +325,7 @@ public class MsaWSClient extends Jws2Client { AlignmentView msa = alignFrame.gatherSequencesForAlignment(); - if (isValidAlignment(msa)) + if (msa != null && isValidAlignment(msa)) { new MsaWSClient(service, null, null, true, alignFrame .getTitle(), msa, withGaps, true, alignFrame @@ -382,7 +382,7 @@ public class MsaWSClient extends Jws2Client AlignmentView msa = alignFrame .gatherSequencesForAlignment(); - if (isValidAlignment(msa)) + if (msa != null && isValidAlignment(msa)) { new MsaWSClient(service, preset, alignFrame.getTitle(), msa, false, true, alignFrame.getViewport()