JPredThread(WebserviceInfo wsinfo, String altitle, ext.vamsas.Jpred server,\r
String wsurl, AlignmentView alview, AlignFrame alframe)\r
{\r
- super();\r
+ super(alframe, wsinfo, alview, wsurl);\r
this.altitle = altitle;\r
this.server = server;\r
- this.wsInfo = wsinfo;\r
- this.input = alview;\r
- this.alignFrame = alframe;\r
- WsUrl = wsurl;\r
}\r
\r
JPredThread(WebserviceInfo wsinfo, String altitle, ext.vamsas.Jpred server,\r
AlignmentView alview,
String wsname, boolean subgaps, boolean presorder)
{
+ super(alFrame, wsinfo, alview, wsname, wsUrl);
this.server = server;
- this.WsUrl = wsUrl;
- this.wsInfo = wsinfo;
- this.WebServiceName = wsname;
- this.input = alview;
this.submitGaps = subgaps;
this.preserveOrder = presorder;
- this.alignFrame = alFrame;
}
/**
SequenceI[] alignment = (SequenceI[]) newview[0];
ColumnSelection columnselection = (ColumnSelection) newview[1];
Alignment al = new Alignment(alignment);
+
if (dataset != null)
{
al.setDataset(dataset);
}
+ propagateDatasetMappings(al);
// JBNote- TODO: warn user if a block is input rather than aligned data ?
if (newFrame)
}
}
+
public boolean canMergeResults()
{
return false;
AlignFrame alignFrame = null;
WebserviceInfo wsInfo = null;
AlignmentView input = null;
+ AlignedCodonFrame[] codonframe = null;
boolean jobComplete = false;
+
abstract class WSJob
{
/**
abstract void StartJob(WSJob job);
abstract void parseResult();
+
+ protected void propagateDatasetMappings(Alignment al)
+ {
+ if (codonframe!=null)
+ {
+ SequenceI[] alignment = al.getSequencesArray();
+ for (int sq = 0; sq<alignment.length; sq++)
+ {
+ for (int i=0; i<codonframe.length; i++)
+ {
+ if (codonframe[i]!=null &&
+ codonframe[i].involvesSequence(alignment[sq]))
+ {
+ al.addCodonFrame(codonframe[i]);
+ codonframe[i] = null;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ * @param alignFrame reference for copying mappings across
+ * @param wsInfo gui attachment point
+ * @param input input data for the calculation
+ * @param webServiceName name of service
+ * @param wsUrl url of the service being invoked
+ */
+ public WSThread(AlignFrame alignFrame, WebserviceInfo wsinfo,
+ AlignmentView input, String webServiceName,
+ String wsUrl)
+ {
+ this(alignFrame, wsinfo, input, wsUrl);
+ WebServiceName = webServiceName;
+ }
+
+ /**
+ *
+ * @param alframe - reference for copying mappings across
+ * @param wsinfo2 - gui attachment point
+ * @param alview - input data for the calculation
+ * @param wsurl2 - url of the service being invoked
+ */
+ public WSThread(AlignFrame alframe, WebserviceInfo wsinfo2,
+ AlignmentView alview, String wsurl2)
+ {
+ super();
+ this.alignFrame = alframe;
+ this.wsInfo = wsinfo2;
+ this.input = alview;
+ WsUrl = wsurl2;
+ if (alignFrame!=null)
+ {
+ AlignedCodonFrame[] cf = alignFrame.getViewport().getAlignment().getCodonFrames();
+ codonframe = new AlignedCodonFrame[cf.length];
+ System.arraycopy(cf, 0, codonframe, 0, cf.length);
+ }
+ }
}