From: Daniel Barton Date: Tue, 27 Aug 2013 16:37:06 +0000 (+0100) Subject: JAL-1358 jalview displays some RNA struture annotation but the format is very messed up X-Git-Tag: Jalview_2_9~200^2~21^2~19 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9daf267d40a67e589a92d3d8fe14f9e535d10ee2;p=jalview.git JAL-1358 jalview displays some RNA struture annotation but the format is very messed up --- diff --git a/lib/min-jabaws-client-3.0.0.jar b/lib/min-jabaws-client-3.0.0.jar new file mode 100644 index 0000000..c70a615 Binary files /dev/null and b/lib/min-jabaws-client-3.0.0.jar differ diff --git a/src/jalview/ws/jws2/RNAalifoldClient.java b/src/jalview/ws/jws2/RNAalifoldClient.java index 9592142..7d06701 100644 --- a/src/jalview/ws/jws2/RNAalifoldClient.java +++ b/src/jalview/ws/jws2/RNAalifoldClient.java @@ -157,7 +157,11 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements if (ourAnnot.size() > 0) { + + // Modify the visible annotation on the alignment viewport with the + // new alignment annotation rows created. updateOurAnnots(ourAnnot); + ap.adjustAnnotationHeight(); } } diff --git a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java index d57eae4..e985f41 100644 --- a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java +++ b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java @@ -61,17 +61,20 @@ public class SequenceAnnotationWSClient extends Jws2Client 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 @@ -131,7 +134,65 @@ public class SequenceAnnotationWSClient extends Jws2Client .startWorker( new AADisorderClient(sh, alignFrame, preset, paramset)); } + + + // dan test dan changed! + if (sh.action.toLowerCase().contains("rna structure prediction")) + { + List 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,