From: jprocter Date: Tue, 1 Nov 2005 16:02:04 +0000 (+0000) Subject: dataset reference propagated to new MsaWS alignment. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e7aacb54f3c93587417dbf4dc2279049db9f22b7;p=jalview.git dataset reference propagated to new MsaWS alignment. --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 77396c9..89aadac 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -2372,7 +2372,7 @@ public class AlignFrame { SequenceI[] msa = gatherSequencesForAlignment(); new jalview.ws.MsaWSClient(sh, title, msa, - false, true); + false, true, viewport.getAlignment().getDataset()); } @@ -2389,7 +2389,7 @@ public class AlignFrame { SequenceI[] msa = gatherSequencesForAlignment(); new jalview.ws.MsaWSClient(sh, title, msa, - true, true); + true, true, viewport.getAlignment().getDataset()); } diff --git a/src/jalview/ws/MsaWSClient.java b/src/jalview/ws/MsaWSClient.java index 6d46e4b..479f22f 100755 --- a/src/jalview/ws/MsaWSClient.java +++ b/src/jalview/ws/MsaWSClient.java @@ -57,7 +57,7 @@ public class MsaWSClient */ public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle, SequenceI[] msa, - boolean submitGaps, boolean preserveOrder) + boolean submitGaps, boolean preserveOrder, Alignment seqdataset) { if (!sh.getAbstractName().equals("MsaWS")) @@ -81,13 +81,13 @@ public class MsaWSClient return; } - startMsaWSClient(altitle, msa, submitGaps, preserveOrder); + startMsaWSClient(altitle, msa, submitGaps, preserveOrder, seqdataset); } private void startMsaWSClient(String altitle, SequenceI[] msa, - boolean submitGaps, boolean preserveOrder) + boolean submitGaps, boolean preserveOrder, Alignment seqdataset) { if (!locateWebService()) { @@ -99,7 +99,7 @@ public class MsaWSClient MsaWSThread musclethread = new MsaWSThread(WebServiceName + " alignment of " + altitle, msa, - submitGaps, preserveOrder); + submitGaps, preserveOrder, seqdataset); wsInfo.setthisService(musclethread); musclethread.start(); } @@ -145,20 +145,22 @@ public class MsaWSClient vamsas.objects.simple.SequenceSet seqs = new vamsas.objects.simple. SequenceSet(); Hashtable SeqNames = null; - boolean submitGaps = false; // and always store and recover sequence order + boolean submitGaps = false; // pass sequences including gaps to alignment service boolean preserveOrder = true; // and always store and recover sequence order String jobId; String alTitle; // name which will be used to form new alignment window. int allowedServerExceptions = 3; // thread dies if too many exceptions. boolean jobComplete = false; + Alignment dataset; // dataset to which the new alignment will be associated. + MsaWSThread(String title, SequenceI[] msa, boolean subgaps, - boolean presorder) + boolean presorder, Alignment seqset) { alTitle = title; submitGaps = subgaps; preserveOrder = presorder; - + dataset = seqset; OutputHeader = wsInfo.getProgressText(); SeqNames = new Hashtable(); @@ -467,7 +469,9 @@ public class MsaWSClient jalview.analysis.SeqsetUtils.deuniquify(SeqNames, seqs); Alignment al = new Alignment(seqs); - + if (dataset!=null) { + al.setDataset(dataset); + } // TODO: JBPNote Should also rename the query sequence sometime... AlignFrame af = new AlignFrame(al); af.addSortByOrderMenuItem(ServiceName + " Ordering",