X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fws%2FMsaWSClient.java;h=49c879b4d1d7748e515ee4b498cd4f0b8e79eb5d;hb=b19a9184ad28b62d2d4f199e23823cd2f8e59f89;hp=999fc96406fa3f2a3c648d76d3b7cd9b23d1e2d1;hpb=4f24ef0848cf3c43ba0467f31fce1baa5c57aad5;p=jalview.git diff --git a/src/jalview/ws/MsaWSClient.java b/src/jalview/ws/MsaWSClient.java index 999fc96..49c879b 100755 --- a/src/jalview/ws/MsaWSClient.java +++ b/src/jalview/ws/MsaWSClient.java @@ -58,7 +58,7 @@ public class MsaWSClient */ public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle, - SequenceI[] msa, + jalview.datamodel.AlignmentView msa, boolean submitGaps, boolean preserveOrder, Alignment seqdataset, AlignFrame _alignFrame) @@ -91,7 +91,7 @@ public class MsaWSClient } - private void startMsaWSClient(String altitle, SequenceI[] msa, + private void startMsaWSClient(String altitle, AlignmentView msa, boolean submitGaps, boolean preserveOrder, Alignment seqdataset) { if (!locateWebService()) @@ -141,6 +141,16 @@ public class MsaWSClient return true; } + protected String getServiceActionKey() + { + return "MsaWS"; + } + + protected String getServiceActionDescription() + { + return "Multiple Sequence Alignment"; + } + protected class MsaWSThread extends Thread implements WSClientI { @@ -159,33 +169,34 @@ public class MsaWSClient Alignment dataset; // dataset to which the new alignment will be associated. - MsaWSThread(String title, SequenceI[] msa, boolean subgaps, + MsaWSThread(String title, AlignmentView _msa, boolean subgaps, boolean presorder, Alignment seqset) { + // jbpnote - transformation should be above here - this is per sequence set contig, not for many contigs. alTitle = title; submitGaps = subgaps; preserveOrder = presorder; dataset = seqset; OutputHeader = wsInfo.getProgressText(); SeqNames = new Hashtable(); - + SeqCigar[] msa = _msa.getSequences(); vamsas.objects.simple.Sequence[] seqarray = new vamsas.objects.simple. Sequence[msa.length]; - for (int i = 0; i < msa.length; i++) + for (int i = 0,n=0; i < msa.length; i++) { String newname = jalview.analysis.SeqsetUtils.unique_name(i); - + SequenceI mseq = msa[i].getSeq('-'); // uniquify as we go // TODO: JBPNote: this is a ubiquitous transformation - set of jalview seq objects to vamsas sequences with name preservation SeqNames.put(newname, - jalview.analysis.SeqsetUtils.SeqCharacterHash(msa[i])); + jalview.analysis.SeqsetUtils.SeqCharacterHash(mseq)); seqarray[i] = new vamsas.objects.simple.Sequence(); seqarray[i].setId(newname); - seqarray[i].setSeq( (submitGaps) ? msa[i].getSequence() + seqarray[i].setSeq( (submitGaps) ? mseq.getSequence() : AlignSeq.extractGaps( jalview.util.Comparison.GapChars, - msa[i].getSequence())); + mseq.getSequence())); } this.seqs = new vamsas.objects.simple.SequenceSet();