initSequenceAnnotationWSClient(sh, alignFrame, preset, editParams);
}
+ // dan think. Do I need to change this method to run RNAalifold through the GUI
+
public void initSequenceAnnotationWSClient(final Jws2Instance sh,
AlignFrame alignFrame, WsParamSetI preset, boolean editParams)
{
- if (alignFrame.getViewport().getAlignment().isNucleotide())
- {
- JOptionPane.showMessageDialog(Desktop.desktop, sh.serviceType
- + " can only be used\nfor amino acid alignments.",
- "Wrong type of sequences!", JOptionPane.WARNING_MESSAGE);
- return;
-
- }
+ // dan changed! dan test. comment out if conditional
+// if (alignFrame.getViewport().getAlignment().isNucleotide())
+// {
+// JOptionPane.showMessageDialog(Desktop.desktop, sh.serviceType
+// + " can only be used\nfor amino acid alignments.",
+// "Wrong type of sequences!", JOptionPane.WARNING_MESSAGE);
+// return;
+//
+// }
if (sh.action.toLowerCase().contains("conservation"))
{
// Build an AACon style client - take alignment, return annotation for
.startWorker(
new AADisorderClient(sh, alignFrame, preset, paramset));
}
+
+
+ // dan test dan changed!
+ if (sh.action.toLowerCase().contains("rna structure prediction"))
+ {
+ List<AlignCalcWorkerI> clnts = alignFrame.getViewport()
+ .getCalcManager()
+ .getRegisteredWorkersOfClass(RNAalifoldClient.class);
+ if (clnts == null || clnts.size() == 0)
+ {
+ if (!processParams(sh, editParams))
+ {
+ return;
+ }
+ RNAalifoldClient worker;
+ alignFrame
+ .getViewport()
+ .getCalcManager()
+ .registerWorker(
+ worker = new RNAalifoldClient(sh, alignFrame,
+ this.preset, paramset));
+ alignFrame.getViewport().getCalcManager().startWorker(worker);
+ }
+ else
+ {
+ RNAalifoldClient worker = (RNAalifoldClient) clnts.get(0);
+ if (editParams)
+ {
+ paramset = worker.getArguments();
+ preset = worker.getPreset();
+ }
+
+ if (!processParams(sh, editParams, true))
+ {
+ return;
+ }
+
+ // reinstate worker if it was blacklisted (might have happened due to
+ // invalid parameters)
+ alignFrame.getViewport().getCalcManager().workerMayRun(worker);
+ worker.updateParameters(this.preset, paramset);
+ }
+
+ }
+
+//
+// if (!processParams(sh, editParams, true))
+// {
+// return;
+// }
+//
+// alignFrame
+// .getViewport()
+// .getCalcManager()
+// .startWorker(
+// new RNAalifoldClient(sh, alignFrame, preset, paramset));
+//
+
}
public SequenceAnnotationWSClient(AAConSettings fave,