<classpathentry kind="lib" path="lib/miglayout-4.0-swing.jar"/>
<classpathentry kind="lib" path="lib/jswingreader-0.3.jar" sourcepath="/jswingreader"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
- <classpathentry kind="lib" path="lib/min-jaba-client-2.0.jar" sourcepath="/clustengine2"/>
<classpathentry kind="lib" path="lib/Jmol-12.2.4.jar"/>
<classpathentry kind="lib" path="appletlib/JmolApplet-12.2.4.jar"/>
<classpathentry kind="lib" path="lib/jdas-1.0.4.jar"/>
<classpathentry kind="lib" path="lib/spring-core-3.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="lib/spring-web-3.0.5.RELEASE.jar"/>
+ <classpathentry kind="lib" path="lib/VARNAv3-9-dev.jar"/>
+ <classpathentry kind="lib" path="lib/min-jabaws-client-3.0.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
- <classpathentry kind="lib" path="/Users/jimp/git/jalview_clean/lib/VARNAv3-9-dev.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="classes"/>
</classpath>
</dictionary>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/buildapplet [Builder].launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
--- /dev/null
+CLUSTAL
+
+B.taurus.1/1-64 C-UUGCGUU--AAUGAGAACAGAAACG-UAAA--CUAUAA-CCUAG-G---------GGU
+D.melanogaster.3/1-68 G-UGGCGCU--UAUGACGCAGUUGUCU-UAAA-CUCGAAC--UCGA-GC--------GGG
+D.melanogaster.2/1-63 C-AUUCAACU-UAUGAGGAUUAUUUCU-UAAA-GGCCUCU---GGC--U-------CGGA
+D.melanogaster.1/1-65 G-AGCC-CU---AUGAUCGAUGAUUGG-CAAA-UCCUCUC--GAGG--A-------ACCG
+R.norvegicus.7/1-66 C-CGGCACU--CAUGACGGUCUGCCUG-AAAA-CCAGCCC--GCUG-GU--------GGG
+R.norvegicus.6/1-67 G-CCGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUCA-AAGAC--C-----UGUGGU
+R.norvegicus.5/1-62 G-UUUUUCC---AUGACGGUGUUUCCUCUAAA--UUUAC----AUG-----------GAG
+R.norvegicus.4/1-61 G-UCAGAUG---AUGACGGCCUGUGCA-GAAA-CCCCCAC-GUGGG--C--------UGC
+R.norvegicus.3/1-67 U-UUGCAUU--AAUGAGGAUUACACAG-AAAA-CCUUUGU--UAAGGGU--------UUG
+R.norvegicus.2/1-64 G-UUACAUU--GAUGAGAACAGAAACA-UAAA--CUAUGA-CCUAG-G---------GGU
+R.norvegicus.1/1-61 A-UAUUUGUU-UAUGAUGGUCACAGUG-UAAA--GUUCA----CAC-----------AGC
+O.aries.1/1-68 G-ACGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUCU-UGGAC-GC------CUGGU
+M.musculus.9/1-66 C-CGGCACU--CAUGAAGGUCUGCUUG-AAAA-CCAGCCU--GCUG-GU--------GGG
+M.musculus.8/1-67 U-UUGCAUU--AAUGAGGAUUACACAG-AAAA-CCUUUGU--UAAG-GA-------CUUG
+O.niloticus.3/1-65 G-UGUCUCU---GUGAAGUUCGGUUUU-UAAA-AGGGUCA---UCC--A-------GAAA
+M.musculus.7/1-64 G-UGUCUCU---AUGAAGGAGGGGCCC-GAAG-CCCUUGU---GGG--C--------GGG
+O.niloticus.2/1-61 U-GUUUAUU--AAUGACGGCUACAGAU-UAAA--CCUUU----AGC-----------CUC
+M.musculus.6/1-61 G-UCAGAUG---AUGAUGGCCUGGGCA-GAAA-CCCCAUG--UGGG--C--------CGC
+O.niloticus.1/1-59 G-UUUCUCA---GUGAAGGCUACAGAU-UAAA--CCUCU----GGC-----------CUC
+M.musculus.5/1-66 G-CCGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUUA---GAC--C-----UGUGGU
+M.musculus.4/1-65 G-UGUGCGA---AUGAUAACUACUGAC-GAAA-GAGCUGU-CUGCU--C-------AGUC
+M.musculus.3/1-64 G-GUUCUUC--CAUGAUGGUGUUUCCUCUAAA--UUUGC----ACG-----------GAG
+M.musculus.2/1-64 G-UUACAUU--AAUGAGAACAGAAACA-UAAA--CUAUGA-CCUAG-G---------GGU
+M.musculus.1/1-64 G-UCACCGA---AUGAUCUGCUCUGGU-CAAA-UCCUUCU---AUG--C------CAGCC
+C.elegans.1/1-64 G-AGGCAGCUUUGUGACGACCUUUGGC-UAAA-CUCCAUC--GUGA-GC--------GCC
+H.sapiens.15/1-63 U-UUUCAUC--UAUGAGGGUGUUUCCUCUAAA--CCUACG---AGG-----------GAG
+H.sapiens.14/1-62 C-ACUGCUG---AUGACGAACUAUCUC-UAAC-UGGUCUU--GACC--A-------CGAG
+H.sapiens.13/1-64 G-UCACUGC---AUGAUCCGCUCUGGU-CAAA-CCCUUCC---AGG--C------CAGCC
+H.sapiens.12/1-67 C-UCUGUUA---AUGACGUCUCUCCCUCUAAA-CCCCAUU-AAGGA--C--------UGG
+D.rerio.1/1-66 A-UGUGGUCUUUAUGAAGGCAGGUGCA-GAAA-CUAUGCA---CUA-GU--------GGU
+H.sapiens.11/1-63 G-CCGGAUG---AUGACGACCUGGGUG-GAAA-CCUACCC-UGUGG--G--------CAC
+H.sapiens.10/1-62 C-CGGCACU--CAUGACGGCCUGCCUG-CAAA--CCUGC----UGG--U--------GGG
+S.mansoni.1/1-67 C-UCGCUAU---AUGACGAUGGCAAUC-UCAA--AUGUU----CAU--U--------GGU
+S.scrofa.4/1-64 C-UGGCACC--CAUGACAGUCUGCCUA-AAAA-CCAGCC----CUG-GU--------GGG
+S.scrofa.3/1-63 A-UUUUAUC--CAUGAAAGUGUUUCCUCUAAA--CCUAU----GUG-----------GAG
+S.scrofa.2/1-65 C-UGGCACC--CAUGACAGUCUGCCUA-AAAA-CCAGCCC---CUG-GU--------GGG
+S.scrofa.1/1-68 G-ACGCUUC---AUGACAGGAAGGACU-GAAA-UGUCUUG-UGGAC-GC------CUGGU
+H.sapiens.9/1-58 U-AUUUGUU--UAUGAUGGCCACAGCC-UAAA--GUACA----CAC-----------GGC
+H.sapiens.8/1-67 U-UUGCUUU--AAUGAGAAUAGAAACG-UAAA--CUAUGA-CCUAG-G---------GGU
+X.laevis.1/1-67 G-UGUUUGCA-AAUGACGACCGAUUUU-GAAA-UGGUCUCACGGCC--A-------AAAA
+H.sapiens.7/1-70 U-GGCGUCUU-CAUGAGGGAGGGGCCC--AAA-GCCCUUG--UGGG--C--------GGA
+H.sapiens.6/1-66 G-UGUGCGG---AUGAUAACUACUGAC-GAAAGAGUCAUC---GAC--C-----UCAGUU
+H.sapiens.5/1-57 U-UCACAGA---AUGAUGGCACCUUCC-UAA---ACCCU----CAU-----------GGG
+H.sapiens.4/1-71 G-ACUGACAU-UAUGAAGGCCUGUACU-GAAG-ACAGCAA--GCUG--U-------UAGU
+H.sapiens.3/1-68 G-ACGCUUC---AUGAUAGGAAGGACU-GAAA-AGUCUUG-UGGAC--A-----CCUGGU
+H.sapiens.2/1-65 G-UGUGCGG---AUGAUAACUACUGAC-GAAA-GAGUCAU-CGACU--C-------AGUU
+H.sapiens.1/1-63 G-CCAGAUG---AUGACGACCUGGGUG-GAAA-CCUACCC-UGUGG--G--------CAC
+M.musculus.14/1-67 C-UCUGAUA---AUGAUGUCUCUCCCU-CUAA-CUCCCAGUAAGGA--C--------UGG
+M.musculus.13/1-60 C-AUGCGUC--CAUGAAGUCACUGGCC-UCAA-GCCCAA----GUG-GU--------GGG
+M.musculus.12/1-65 C-UCAGCAG--GAUGAUGAGAAGGGCU-GAAA-UGCUGCC--AAAC--C-------AGGU
+M.musculus.11/1-63 U-AUUUGUG--UAUGAUGGUCACAGUG-UAAA--GUUCC----CAC-----------AGC
+M.musculus.10/1-66 C-CGGCACU--CAUGAAGGUCUGCCUG-AAAA-CCAGCCU--GCUG-GU--------GGG
+B.taurus.7/1-61 U-UUUGCCC---AUGAAGGUGUUCCCUCUAAA--CCUAC----GUG-----------GAG
+B.taurus.6/1-67 G-AUGCGUC--CAUGAAGUCACCAGCC-CCAA-GCCCCUC---GUG-GU--------GGG
+B.taurus.5/1-61 G-CCAGAUG---AUGAGGACCUGUGCG-GAAA-CCCCCCG--CGGG--C--------UGC
+B.taurus.4/1-64 ACUUGCGUU--AAUGAGAACAGAAACG-UAAA--CUAUAA-CCUAG-G---------GGU
+G.gallus.3/1-73 U-AUUUCUU--UGUGAUGACCGAUUUU-GAAA-UGGGUUU---CUC--UAAUGCCAGGAA
+B.taurus.3/1-66 C-CCGGUGCC-UAUGACGGUCUGUCUG-AAAA-CCAGCCC---CUG-GU--------GGG
+G.gallus.2/1-60 U-AUUUGUC---AUGACAGUCACAGCA-UAAA--GCGCA----GAC-----------GGC
+B.taurus.2/1-64 C-UUGCGUU--AAUGAGAACAGAAACG-AAAA--CUAUAA-CCUAG-G---------GGU
+G.gallus.1/1-63 G-UGUGUUU---AUGAAGAGCACUAAC-AAAA-GAGUAAU-UGACU--C-------AGUU
+
+B.taurus.1/1-64 UUC-U-G-UUGGAU--GGUUG-------GCAAC
+D.melanogaster.3/1-68 CAA-U-U-GCUGAU---UACG---AUUAACCAC
+D.melanogaster.2/1-63 AAU-A-G-UCUGAA---CCU--------UAUUG
+D.melanogaster.1/1-65 AUC-G-U-UGAGAA--CCCCU-----UUGCCUU
+R.norvegicus.7/1-66 GCA-G-U-CCCGAG-GACCUG-------GCGUG
+R.norvegicus.6/1-67 CUU-U-C-UUCGAU--GUUCU-------GCGGC
+R.norvegicus.5/1-62 AAA-C-A-CCUGAU-UUCCAG------AAAAAU
+R.norvegicus.4/1-61 -CA-G-G-UUUGAA---CCC--------CUGGC
+R.norvegicus.3/1-67 UGUCG-A-UCUGCU--AAUUG-------GCAAA
+R.norvegicus.2/1-64 UUC-U-G-UUGGAU--AGCUC-------GUAAU
+R.norvegicus.1/1-61 UGU-G-A-CUUGAU--UUUUA-------AAAAU
+O.aries.1/1-68 CCU-U-C-CUUGAU--GUUCU------CACGGC
+M.musculus.9/1-66 GCA-G-U-CCUGAG-GACCUG-------GCGUG
+M.musculus.8/1-67 UGU-AGA-UCUGAU--AAUUG-------GCAAA
+O.niloticus.3/1-65 ACC-G-ACACUGAU--GUUUC------CGACAC
+M.musculus.7/1-64 CCU-C-C-CCUGAG---CCCG----UCUGUGGU
+O.niloticus.2/1-61 UGG-A-G-CCAGAU--GCAUU------CAAACA
+M.musculus.6/1-61 CCA-G-G-UUUGAA---CCC--------CUGGC
+O.niloticus.1/1-59 UGG-A-G-CCAGAU--GCAUU-------GAAAC
+M.musculus.5/1-66 CUU-U-C-CUCGAU--GUUCC------UGCGGC
+M.musculus.4/1-65 UGU-G-G-UUGGAU---GUAG------UCACAC
+M.musculus.3/1-64 AAA-C-A-CCUGAU-UUCCAG-----GAAAAUC
+M.musculus.2/1-64 UUC-U-G-UUGGAU--AGCUU-------GUAAU
+M.musculus.1/1-64 AGG-G-U-GGUGAU--GACCC-------GUGAC
+C.elegans.1/1-64 UCU-G-G-UCUGAU---GC---------GCCUC
+H.sapiens.15/1-63 GAA-C-A-CCUGAU---CUUA-----CAGAAAA
+H.sapiens.14/1-62 CUA-G-U-UCUGAA---UU-G-------CAGGG
+H.sapiens.13/1-64 AGA-G-U-GGGGAU--GGUCU-------GUGAC
+H.sapiens.12/1-67 GAG-A-G-GCAGAGCAAGCCU-------CAGAG
+D.rerio.1/1-66 GUC-U-G-UCUGAU--GUUUG-------GCCAU
+H.sapiens.11/1-63 CCA-U-G-UCCGAG---CCCC-------CUGGC
+H.sapiens.10/1-62 GCA-G-A-CCCGAA-AAUCCA-------GCGUG
+S.mansoni.1/1-67 UGC-C-A-UUUGAU--GAAAUCAGUUUUGUGUG
+S.scrofa.4/1-64 GCA-G-A-CUCGAG-AACCUG-------GCGUG
+S.scrofa.3/1-63 GAA-C-A-CCUGAU-GUCCAG------GAAAAU
+S.scrofa.2/1-65 GCA-G-A-CUCGAG-AACCUG-------GCGUG
+S.scrofa.1/1-68 CCU-U-C-CCUGAU--GUUCU------CAUGGC
+H.sapiens.9/1-58 UGU-G-A-CUUGAU---UCA--------AAAGA
+H.sapiens.8/1-67 UUC-U-G-UUGGAU-AAUUAG-----CAGUUUA
+X.laevis.1/1-67 CUC-GUG-UCCGAC---AUC--------AACCC
+H.sapiens.7/1-70 CCU-C-C-CCUGAG---CCUGUCUGAGGGGCCA
+H.sapiens.6/1-66 AGU-G-G-UUGGAU---GUAG------UCACAU
+H.sapiens.5/1-57 UGG-U-G-UCUGAG--AGGC--------GUGAA
+H.sapiens.4/1-71 ACA-G-A-CCAGAU--GCUUU--CUUGGCAGGC
+H.sapiens.3/1-68 CUU-U-C-CCUGAU--GUUCU------CGUGGC
+H.sapiens.2/1-65 AGU-G-G-UUGGAU---GUAG------UCACAU
+H.sapiens.1/1-63 CCA-U-G-UCCGAG---CCCC-------CUGGC
+M.musculus.14/1-67 GAG-A-G-GCUGAACAAACCU-------CAGAG
+M.musculus.13/1-60 CAG-U-G-ACAGAA---GA---------GCUGC
+M.musculus.12/1-65 CCU-U-U-UCUGAU--GGUGG-------CUGGG
+M.musculus.11/1-63 UGU-G-A-CUUGAU--UUUUA----AAAAUGUC
+M.musculus.10/1-66 GCA-G-U-CCUGAG-GACCUG-------GCGUG
+B.taurus.7/1-61 GAA-U-G-CCUGAU-GUCCAG-------GAAAA
+B.taurus.6/1-67 UGG-U-G-AUGGAA-CCGUCA-----AAGCAGU
+B.taurus.5/1-61 CCA-U-G-UCUGAG---CCC--------CUGGC
+B.taurus.4/1-64 UUC-U-G-UUGGAU--GGUUG-------GCAA-
+G.gallus.3/1-73 AUC-GUG-UCUGAU---GUUG-----UCAAGUA
+B.taurus.3/1-66 GCA-G-A-CCUGAG-AACCUG-------GCGUG
+G.gallus.2/1-60 UGU-G-A-CCUGAU--UUUAG------AAAAUA
+B.taurus.2/1-64 UUC-U-G-UUGGAU--GGUUG-------GCAAC
+G.gallus.1/1-63 GGU-G-U-UCAGAU--GCU---------CUCAC
+
<mapID target="newsreader" url="html/webServices/newsreader.html"/>
<mapID target="disorder" url="html/webServices/proteinDisorder.html"/>
<mapID target="aacon" url="html/webServices/AACon.html"/>
+ <mapID target="rnaalifold" url="html/webServices/RNAalifold.html"/>
<mapID target="seqfetch" url="html/features/seqfetch.html"/>
<mapID target="dbreffetcher" url="html/webServices/dbreffetcher.html"/>
<mapID target="seqmappings" url="html/features/seqmappings.html"/>
<tocitem text="What's new" target="new" expand="true">
<tocitem text="Protein Disorder Prediction" target="disorder"/>
<tocitem text="Alignment Conservation Analysis" target="aacon"/>
+ <tocitem text="RNAalifold RNA Secondary Structure Prediction" target="rnaalifold"/>
<tocitem text="Viewing RNA structure" target="varna" />
<tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus"/>
<tocitem text="RNA Helices coloring" target="colours.rnahelices"/>
<tocitem text="Multiple Alignment Subjobs" target="msaservice"/>
</tocitem>
<tocitem text="Secondary Structure Prediction" target="jnet"/>
+ <tocitem text="RNAalifold RNA Secondary Structure Prediction" target="rnaalifold"/>
<tocitem text="Protein Disorder Prediction" target="disorder"/>
<tocitem text="Alignment Conservation Analysis" target="aacon"/>
<tocitem text="Multi-Harmony Alignment Analysis" target="shmrws"/>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="ISO-8859-1">
+<title>RNAalifold Web Service</title>
+</head>
+<body>
+ <strong>RNAalifold RNA Alignment Secondary Structure
+ Prediction Service</strong>
+ <p>
+ RNAalifold is part of the <a href="http://www.tbi.univie.ac.at/RNA/">Vienna
+ RNA</a> Secondary Structure Prediction and Comparison Package. It was
+ described in 2008 by Ivo L. Hofacker, Sebastian Will, Andreas R.
+ Gruber, and Peter F. Stadler, <em>RNAalifold: Improved consensus
+ structure prediction for RNA alignments</em>. (<a
+ href=http://www.biomedcentral.com/1471-2105/9/474>BMC
+ Bioinformatics, 9:474, 2008</a>).
+ </p>
+ <p>
+ <strong>Example RNAalifold Output</strong><br />
+ RNAalifold prints a consensus alignment and mfe structure to stdout with its
+ associated energy. Depending on the arguments given, other information such as
+ alternate structures are displayed below while base pairing probabilities (-p or --MEA
+ options) are stored in a separate 'alifold.out' file.<br />
+ <pre><br />
+G_UUUCAUU___AUGACGGCCUGUGCU_UAAA__CCUCC____GAG__C________GGGUCA_G_G_UCUGAU___CUUG_______GAGAC
+(.((((...........(((((((((........(((......)))............))))).).).))..................))))) (-19.16 = -11.80 + -7.36)
+(.((((...........(((((((((........(((......)))............))))).).).))..................))))) [-19.32]
+ frequency of mfe structure in ensemble 0.765639
+(.((((...........(((((((((........(((......)))............))))).).).))..................))))) -19.16 {-11.80 + -7.36}
+(.((((...........(((((((((........(((......)))............))))).).).))..................))))) { 13.20 MEA=92.14}
+
+Alifold.out
+ 6 89 9 99.2% 0.023 CG:29 GC:14 UA:9
+ 4 91 11 99.1% 0.028 CG:20 GC:11 UG:2 UA:17
+ 3 92 18 96.9% 0.090 CG:5 GC:2 GU:1 UG:4 AU:6 UA:25
+ 35 46 3 93.3% 0.195 CG:31 GC:16 UG:2 AU:5 UA:4
+ 36 45 10 93.6% 0.185 CG:16 GC:6 GU:1 UG:2 AU:8 UA:18
+ .
+ .
+ .
+ </pre>
+ </p>
+ <p>
+ <strong>Running RNAalifold from Jalview</strong><br />
+ To run RNAalifold go to <strong>Webservices→RNA Structure Prediction</strong>
+ and choose <strong>RNAalifold Defaults</strong> to run with no arguments or
+ <strong>edit settings and run ...</strong> to adjust the parameters before running.
+ Details of all the RNAalifold parameters can be found in the
+ <a href=http://www.tbi.univie.ac.at/RNA/man/RNAalifold.html>RNAalifold Manpage</a>.
+ JABAWS and Jalview support a selection of the RNAalifold arguments only.
+ </p>
+ <p><strong>Supported Arguments which give alternate structures</strong></p>
+ <p>
+ <em>Partition Function (-p)</em><br />
+ Calculate the Partition Function and base pairing probability matrix in addition to the mfe
+ structure. A coarse representation of the pair probabilities in the from of a psuedo
+ bracket notation, as well as the centroid structure derived from the pair probabilities
+ are displayed. The most likely base pairings are stored in a separate file by RNAalifold
+ and represented in Jalview by a bar graph annotation line labelled 'Contact Probabilities'.
+ </p>
+ <p>
+ <em>Maximum Expected Accuracy Structure (--MEA)</em><br />
+ Calculate an MEA structure where the expected Accuracy is computed from the base pair
+ probabilities. A more detailed description is found in the <a href=http://www.tbi.univie.ac.at/RNA/man/RNAfold.html>
+ RNAfold documentation</a>.
+ </p>
+ <p><strong>Example RNAalifold Structure Annotation rows</strong><p>
+
+ <div align="center">
+ <img src="RNAalifoldAnnotationRows.png" width="500" height="216"></div>
+
+</body>
+</html>
\ No newline at end of file
public void refresh()
{
- if (lastrefresh != annotation._rnasecstr.hashCode()
+ if ((annotation._rnasecstr == null
+ || lastrefresh != annotation._rnasecstr.hashCode())
&& annotation.isValidStruc())
{
annotation.getRNAStruc();
return;
}
- currentAnnotation = av.getAlignment().getAlignmentAnnotation()[0];// annotations.getSelectedIndex()];
-
+ // This loop will find the first rna structure annotation by which to colour
+ // the sequences.
+ AlignmentAnnotation[] annotations = av.getAlignment().getAlignmentAnnotation();
+ for (int i = 0; i < annotations.length; i++) {
+
+ // is this a sensible way of determining type of annotation?
+ if (annotations[i].getRNAStruc() != null) {
+ currentAnnotation = annotations[i];
+ break;
+ }
+ }
+ if (currentAnnotation == null)
+ {
+ System.err.println("Jalview is about to try and colour by RNAHelices even"
+ + " though there are no RNA secondary structure annotations present!");
+ currentAnnotation = av.getAlignment().getAlignmentAnnotation()[0];// annotations.getSelectedIndex()];
+ }
+
RNAHelicesColour rhc = null;
rhc = new RNAHelicesColour(currentAnnotation);
{ Services.ClustalWS, Services.MuscleWS, Services.MafftWS,
Services.ProbconsWS, Services.TcoffeeWS, Services.AAConWS,
Services.DisemblWS, Services.GlobPlotWS, Services.IUPredWS,
- Services.JronnWS };
+ Services.JronnWS, Services.RNAalifoldWS };
/*
* (non-Javadoc)
jabasws2 = true;
srv_set = registry.getSupportedServices();
+
+ // dan test
+ System.out.println("registry.getSupportedServices: " + srv_set.toString());
+
svccategories = registry.getServiceCategories();
+
+ // dan test
+// System.out.println("registry.getServiceCategories: " + svccategories.toString());
}
} catch (Exception ex)
Cache.log.debug("Old discovery thread has finished.");
}
running = true;
+
+
changeSupport.firePropertyChange("services", services, new Vector());
oldthread = Thread.currentThread();
try
--- /dev/null
+package jalview.ws.jws2;
+
+import jalview.api.AlignCalcWorkerI;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.gui.AlignFrame;
+import jalview.ws.jws2.dm.AAConSettings;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
+import jalview.ws.params.WsParamSetI;
+
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.regex.Pattern;
+
+import compbio.data.sequence.RNAStructReader.AlifoldResult;
+import compbio.data.sequence.RNAStructScoreManager;
+import compbio.data.sequence.Range;
+import compbio.data.sequence.Score;
+import compbio.metadata.Argument;
+
+public class RNAalifoldClient extends JabawsAlignCalcWorker implements
+ AlignCalcWorkerI
+{
+
+ String methodName;
+
+ AlignFrame af;
+
+ // keeps track of whether the RNAalifold result includes base contact probabilities
+ boolean bpScores;
+
+ public RNAalifoldClient(Jws2Instance sh, AlignFrame alignFrame,
+ WsParamSetI preset, List<Argument> paramset)
+ {
+ super(sh, alignFrame, preset, paramset);
+
+ if (arguments == null) arguments = new ArrayList<Argument>();
+
+
+ af = alignFrame;
+ methodName = sh.serviceType;
+
+ nucleotidesAllowed = true;
+ proteinAllowed = false;
+ initViewportParams();
+ }
+
+ protected void initViewportParams()
+ {
+ ((jalview.gui.AlignViewport) alignViewport).setCalcIdSettingsFor(
+ getCalcId(),
+ new AAConSettings(true, service, this.preset,
+ (arguments != null) ? JabaParamStore
+ .getJwsArgsfromJaba(arguments) : null), true);
+ }
+
+ @Override
+ public String getServiceActionText()
+ {
+ return "Submitting RNA alignment for Secondary Structure prediction using "
+ + "RNAalifold Service";
+ }
+
+
+ @Override
+ public void updateResultAnnotation(boolean immediate)
+ {
+
+ if (immediate || !calcMan.isWorking(this) && scoremanager != null)
+ {
+
+ List<AlignmentAnnotation> ourAnnot = new ArrayList<AlignmentAnnotation>();
+
+ // Unpack the ScoreManager
+ List<String> structs = ((RNAStructScoreManager) scoremanager).getStructs();
+ List<TreeSet<Score>> data = ((RNAStructScoreManager) scoremanager).getData();
+
+ // test to see if this data object contains base pair contacts
+ Score fscore = data.get(0).first();
+ this.bpScores = (fscore.getMethod().equals(
+ AlifoldResult.contactProbabilities.toString()));
+
+ // add annotation for the consensus sequence alignment
+ createAnnotationRowforScoreHolder(ourAnnot, getCalcId(), structs.get(0),
+ null, null);
+
+ // Add annotations for the mfe Structure
+ createAnnotationRowforScoreHolder(ourAnnot, getCalcId(), structs.get(1),
+ data.get(1), null);
+
+ // decide whether to add base pair contact probability histogram
+ int count = 2;
+ if (bpScores) {
+ createAnnotationRowforScoreHolder(ourAnnot, getCalcId(), structs.get(2),
+ data.get(0), data.get(2));
+ count++;
+ }
+
+
+ // Now loop for the rest of the Annotations (if there it isn't stochastic output
+ // only the centroid and MEA structures remain anyway)
+ for (int i = count; i < structs.size(); i++) {
+ // The ensemble values should be displayed in the description of the
+ // first (or all?) Stochastic Backtrack Structures.
+ if (!data.get(i).first().getMethod().equals(
+ AlifoldResult.ensembleValues.toString())) {
+
+ createAnnotationRowforScoreHolder(ourAnnot, getCalcId(), structs.get(i),
+ data.get(i), null);
+ }
+ }
+
+ if (ourAnnot.size() > 0) {
+
+ updateOurAnnots(ourAnnot);
+ ap.adjustAnnotationHeight();
+ }
+ }
+ }
+
+ protected void createAnnotationRowforScoreHolder(
+ List<AlignmentAnnotation> ourAnnot, String calcId,
+ String struct, TreeSet<Score> data, TreeSet<Score> descriptionData)
+ {
+ /* If contactProbability information is returned from RNAalifold it is stored
+ * in the first TreeSet<Score> object corresponding to the String Id which
+ * holds the consensus alignment. The method enumeration is then updated to
+ * AlifoldResult.contactProbabilties. This line recreates the same
+ * data object as was overwritten with the contact probabilites data.
+ */
+ if (data == null) data = compbio.data.sequence.RNAStructReader
+ .newEmptyScore(AlifoldResult.consensusAlignment);
+
+ if (descriptionData == null) descriptionData = data;
+
+ String[] typenameAndDescription = constructTypenameAndDescription(
+ descriptionData.first());
+ String typename = typenameAndDescription[0];
+ String description = typenameAndDescription[1];
+
+
+ AlignmentAnnotation annotation = alignViewport.getAlignment()
+ .findOrCreateAnnotation(typename, calcId, false, null, null);
+
+ constructAnnotationFromScoreHolder(annotation, struct, data);
+
+ /* update annotation description with the free Energy, frequency in ensemble
+ * or other data where appropriate.
+ *
+ * Doesnt deal with AlifoldResult.ensembleValues, the free energy of ensemble
+ * and frequency of mfe structure in ensemble. How to deal with these?
+ */
+ annotation.description = description;
+
+ annotation.belowAlignment = false;
+// annotation.showAllColLabels = true;
+
+ alignViewport.getAlignment().validateAnnotation(annotation);
+ af.setMenusForViewport();
+
+ ourAnnot.add(annotation);
+ }
+
+
+
+ private AlignmentAnnotation constructAnnotationFromScoreHolder(
+ AlignmentAnnotation annotation, String struct, TreeSet<Score> data)
+ {
+ Annotation[] anns = new Annotation[struct.length()];
+
+ if (data != null && data.size() > 1 && data.first().getMethod().equals(
+ AlifoldResult.contactProbabilities.toString()))
+ {
+
+ // The base pair probabilities are stored in a set in scoreholder. we want a map
+ LinkedHashMap<Range, Float> basePairs = new LinkedHashMap<Range, Float>();
+ for (Score score : data) {
+ // The Score objects contain a set of size one containing the range and
+ // an ArrayList<float> of size one containing the probabilty
+ basePairs.put(score.getRanges().first(), new Float(score.getScores().get(0)));
+ }
+ for (int i = 0; i < struct.length(); i++) {
+
+ // Return all the contacts associated with position i
+ LinkedHashMap<Range, Float> contacts = isContact(basePairs, i+1);
+
+ String description = "";
+ float prob = 0f;
+
+ if (contacts.size() == 0) {
+ description = "No Data";
+ }
+ else {
+ for (Range contact : contacts.keySet()) {
+ float t = contacts.get(contact);
+ if (t > prob) prob = t;
+ description += Integer.toString(contact.from) + "->"
+ + Integer.toString(contact.to) + ": " + Float.toString(t) + "% | ";
+ }
+ }
+
+ anns[i] = new Annotation(struct.substring(i, i+1), description,
+ isSS(struct.charAt(i)), prob);
+ }
+ }
+ else if (data == null || data.size() == 1) {
+ for (int i = 0; i < struct.length(); i++) {
+
+ anns[i] = new Annotation(struct.substring(i, i+1), "",
+ isSS(struct.charAt(i)), Float.NaN);
+ }
+
+ annotation.graph = 0; // No graph
+ }
+
+ annotation.annotations = anns;
+
+ return annotation;
+ }
+
+ private String[] constructTypenameAndDescription(Score score) {
+ String description = "";
+ String typename = "";
+ String datatype = score.getMethod();
+
+
+ // Look up java switch syntax and use one here
+ if (datatype.equals(AlifoldResult.mfeStructure.toString())) {
+
+ description = MessageFormat.format("Minimum Free Energy Structure. Energy: {0} = {1} + {2}",
+ score.getScores().get(0), score.getScores().get(1), score.getScores().get(2));
+ typename = "MFE Structure";
+ }
+ else if (datatype.equals(AlifoldResult.contactProbabilityStructure.toString())) {
+ description = MessageFormat.format("Base Pair Contact Probabilities. "
+ + "Energy of Ensemble: {0} Frequency of Ensemble: {1}",
+ score.getScores().get(0), score.getScores().get(1));
+ typename = "Contact Probabilities";
+ }
+ else if (datatype.equals(AlifoldResult.centroidStructure.toString())) {
+ description = MessageFormat.format("Centroid Structure. Energy: {0} = {1} + {2}",
+ score.getScores().get(0), score.getScores().get(1), score.getScores().get(2));
+ typename = "Centroid Structure";
+ }
+ else if (datatype.equals(AlifoldResult.stochBTStructure.toString())) {
+ if (score.getScores().size() > 0) {
+ description = MessageFormat.format("Probability: {0} Energy: {1}",
+ score.getScores().get(0), score.getScores().get(1));
+ }
+ else description = "Stochastic Backtrack Structure";
+ }
+ else if (datatype.equals(AlifoldResult.MEAStucture.toString())) {
+ description = MessageFormat.format("Maximum Expected Accuracy Values: '{' {0} MEA={1} '}",
+ score.getScores().get(0), score.getScores().get(1));
+ typename = "MEA Structure";
+ }
+ else if (datatype.equals(AlifoldResult.consensusAlignment.toString())) {
+ typename = "RNAalifold Consensus";
+ description = "Consensus Alignment Produced by RNAalifold";
+ }
+ else {
+ typename = datatype;
+ description = typename;
+ }
+
+ return new String[] {typename, description};
+ }
+
+ // Check whether, at position i there is a base contact and return all the
+ // contacts at this position. Should be in order of descending probability.
+ private LinkedHashMap<Range, Float> isContact(LinkedHashMap<Range,
+ Float> basePairs, int i)
+ {
+ LinkedHashMap<Range, Float> contacts = new LinkedHashMap<Range, Float>();
+
+ for (Range contact : basePairs.keySet()) {
+ // finds the contacts associtated with position i ordered by the natural
+ // ordering of the Scores TreeSet in ScoreManager which is, descending probability
+ if (contact.from == i || contact.to == i)
+ contacts.put(contact, basePairs.get(contact));
+ }
+
+ return contacts;
+ }
+
+ private char isSS (char chr) {
+ String regex = "\\(|\\)|\\{|\\}|\\[|\\]";
+ char ss = (Pattern.matches(regex, Character.toString(chr))) ? 'S': ' ';
+ return ss;
+ }
+
+ public String getCalcId()
+ {
+ return SequenceAnnotationWSClient.AAConCalcId;
+ }
+
+}
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);
+ }
+
+ }
}
public SequenceAnnotationWSClient(AAConSettings fave,
--- /dev/null
+package jalview.ws.jabaws;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Vector;
+
+import jalview.api.AlignCalcManagerI;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
+import jalview.io.AnnotationFile;
+import jalview.io.FormatAdapter;
+import jalview.io.StockholmFileTest;
+import jalview.ws.jws2.AADisorderClient;
+import jalview.ws.jws2.Jws2Discoverer;
+import jalview.ws.jws2.RNAalifoldClient;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class RNAStructExportImport
+{
+ public static String testseqs = "examples/unfolded_RF00031.aln";
+
+ public static Jws2Discoverer disc;
+
+ public static Jws2Instance rnaalifoldws;
+
+ jalview.ws.jws2.RNAalifoldClient alifoldClient;
+
+ public static jalview.gui.AlignFrame af = null;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception
+ {
+
+
+ jalview.bin.Cache.initLogger();
+ disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
+
+ for (Jws2Instance svc : disc.getServices())
+ {
+
+ if (svc.getServiceTypeURI().toLowerCase().contains("rnaalifoldws"))
+ {
+ rnaalifoldws = svc;
+ }
+ }
+
+ System.out.println("State of rnaalifoldws: " + rnaalifoldws);
+
+ if (rnaalifoldws == null) System.exit(0);
+
+ jalview.io.FileLoader fl = new jalview.io.FileLoader(false);
+
+ af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE);
+
+ assertNotNull("Couldn't load test data ('" + testseqs + "')", af);
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception
+ {
+ if (af != null)
+ {
+ af.setVisible(false);
+ af.dispose();
+ }
+ }
+
+ @Test
+ public void testRNAStructExport()
+ {
+
+
+ alifoldClient = new RNAalifoldClient(rnaalifoldws, af, null, null);
+
+ af.getViewport().getCalcManager().startWorker(alifoldClient);
+
+
+ do
+ {
+ try
+ {
+ Thread.sleep(50);
+ } catch (InterruptedException x)
+ {
+ }
+ ;
+ } while (af.getViewport().getCalcManager().isWorking());
+
+
+ AlignmentI orig_alig = af.getViewport().getAlignment();
+
+ testAnnotationFileIO("Testing RNAalifold Annotation IO", orig_alig);
+
+ }
+
+ public static void testAnnotationFileIO(String testname, AlignmentI al)
+ {
+ try
+ {
+ // what format would be appropriate for RNAalifold annotations?
+ String aligfileout = new FormatAdapter().formatSequences("PFAM",
+ al.getSequencesArray());
+
+
+ String anfileout = new AnnotationFile().printAnnotations(
+ al.getAlignmentAnnotation(), al.getGroups(),
+ al.getProperties());
+ assertTrue(
+ "Test "
+ + testname
+ + "\nAlignment annotation file was not regenerated. Null string",
+ anfileout != null);
+ assertTrue(
+ "Test "
+ + testname
+ + "\nAlignment annotation file was not regenerated. Empty string",
+ anfileout.length() > "JALVIEW_ANNOTATION".length());
+
+ System.out.println("Output annotation file:\n" + anfileout
+ + "\n<<EOF\n");
+
+ // again what format would be appropriate?
+ AlignmentI al_new = new FormatAdapter().readFile(aligfileout,
+ FormatAdapter.PASTE, "PFAM");
+ assertTrue(
+ "Test "
+ + testname
+ + "\nregenerated annotation file did not annotate alignment.",
+ new AnnotationFile().readAnnotationFile(al_new, anfileout,
+ FormatAdapter.PASTE));
+
+ // test for consistency in io
+ StockholmFileTest.testAlignmentEquivalence(al, al_new);
+ return;
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ fail("Test "
+ + testname
+ + "\nCouldn't complete Annotation file roundtrip input/output/input test.");
+ }
+
+}
<string><![CDATA[664]]></string>
</property>
<property name="sourceName">
- <string><![CDATA[min-jaba-client-2.0.jar]]></string>
+ <string><![CDATA[min-jabaws-client-3.0.0.jar]]></string>
</property>
<property name="overrideUnixPermissions">
<boolean>false</boolean>
<boolean>true</boolean>
</property>
<property name="destinationName">
- <string><![CDATA[min-jaba-client-2.0.jar]]></string>
+ <string><![CDATA[min-jabaws-client-3.0.0.jar]]></string>
</property>
<property name="fileSize">
<long>133065</long>