+ loc.getEngine().setOption("axis", "1");\r
+\r
+ return true;\r
+ }\r
+\r
+ protected class MsaWSThread\r
+ extends Thread implements WSClientI\r
+ {\r
+ String ServiceName = WebServiceName;\r
+ String OutputHeader;\r
+ vamsas.objects.simple.MsaResult result = null;\r
+ vamsas.objects.simple.SequenceSet seqs = new vamsas.objects.simple.\r
+ SequenceSet();\r
+ Hashtable SeqNames = null;\r
+ boolean submitGaps = false; // and always store and recover sequence order\r
+ boolean preserveOrder = true; // and always store and recover sequence order\r
+ String jobId;\r
+ String alTitle; // name which will be used to form new alignment window.\r
+ int allowedServerExceptions = 3; // thread dies if too many exceptions.\r
+ boolean jobComplete = false;\r
+\r
+ MsaWSThread(String title, SequenceI[] msa, boolean subgaps,\r
+ boolean presorder)\r
+ {\r
+ alTitle = title;\r
+ submitGaps = subgaps;\r
+ preserveOrder = presorder;\r
+\r
+ OutputHeader = wsInfo.getProgressText();\r
+ SeqNames = new Hashtable();\r
+\r
+ vamsas.objects.simple.Sequence[] seqarray = new vamsas.objects.simple.\r
+ Sequence[msa.length];\r
+\r
+ for (int i = 0; i < msa.length; i++)\r
+ {\r
+ String newname = jalview.analysis.SeqsetUtils.unique_name(i);\r
+\r
+ // uniquify as we go\r
+ // TODO: JBPNote: this is a ubiquitous transformation - set of jalview seq objects to vamsas sequences with name preservation\r
+ SeqNames.put(newname,\r
+ jalview.analysis.SeqsetUtils.SeqCharacterHash(msa[i]));\r
+ seqarray[i] = new vamsas.objects.simple.Sequence();\r
+ seqarray[i].setId(newname);\r
+ seqarray[i].setSeq( (submitGaps) ? msa[i].getSequence()\r
+ : AlignSeq.extractGaps(\r
+ jalview.util.Comparison.GapChars,\r
+ msa[i].getSequence()));\r
+ }\r
+\r
+ this.seqs = new vamsas.objects.simple.SequenceSet();\r
+ this.seqs.setSeqs(seqarray);\r
+ }\r