Merge branch 'jims_annotate3d_update' into menard_finalsep2012
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 13 Feb 2013 19:26:01 +0000 (19:26 +0000)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Wed, 13 Feb 2013 19:26:01 +0000 (19:26 +0000)
JAL-1269 is fixed by this merge
Conflicts:
.classpath
src/jalview/appletgui/AlignFrame.java
src/jalview/io/RnamlFile.java
src/jalview/io/StockholmFile.java
src/jalview/io/TCoffeeScoreFile.java
src/jalview/renderer/AnnotationRenderer.java
test/jalview/io/TCoffeeScoreFileTest.java

38 files changed:
.classpath
.gitignore
THIRDPARTYLIBS
examples/appletParameters.html
examples/applets.html
examples/embedded.html
examples/embeddedWJmol.html
examples/formComplete.html
examples/jalviewLiteJs.html
examples/javascriptLaunch.html
examples/linkedapplets_ng.html
lib/json_simple-1.1.jar [new file with mode: 0644]
src/jalview/appletgui/AnnotationLabels.java
src/jalview/ext/paradise/Annotate3D.java
src/jalview/gui/AnnotationLabels.java
src/jalview/io/StockholmFile.java
src/jalview/io/TCoffeeScoreFile.java
src/jalview/renderer/AnnotationRenderer.java
src/jalview/ws/dbsources/EmblCdsSouce.java
src/jalview/ws/dbsources/EmblSource.java
src/jalview/ws/dbsources/GeneDbSource.java
src/jalview/ws/dbsources/Pdb.java
src/jalview/ws/dbsources/PfamFull.java
src/jalview/ws/dbsources/PfamSeed.java
src/jalview/ws/dbsources/RfamFull.java
src/jalview/ws/dbsources/RfamSeed.java
src/jalview/ws/dbsources/Uniprot.java
src/jalview/ws/dbsources/das/api/jalviewSourceI.java
src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java
src/jalview/ws/dbsources/das/datamodel/JalviewSource.java
src/jalview/ws/jws1/Annotate3D.java
src/jalview/ws/jws2/Jws2Discoverer.java
src/jalview/ws/jws2/jabaws2/Jws2Instance.java
src/jalview/ws/seqfetcher/ASequenceFetcher.java
src/jalview/ws/seqfetcher/DbSourceProxy.java
test/jalview/ext/paradise/TestAnnotate3D.java
test/jalview/io/TCoffeeScoreFileTest.java
test/jalview/ws/seqfetcher/DbRefFetcherTest.java [new file with mode: 0644]

index 0633302..8ace199 100644 (file)
        <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="lib/Jmol-12.2.4.jar" sourcepath="/Users/jimp/Documents/e6-workspace-new/Jmol/src"/>
        <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.jar" sourcepath="/Users/jimp/Documents/Jalview/VARNA/VARNAv3-9-src.jar"/>
+       <classpathentry kind="lib" path="lib/json_simple-1.1.jar" sourcepath="/Users/jimp/Downloads/json_simple-1.1-all.zip"/>
        <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
        <classpathentry kind="output" path="classes"/>
index 3407192..9841761 100644 (file)
@@ -2,3 +2,5 @@
 /dist
 /classes
 .externalToolBuilders/Jalview Release indices [Builder].launch
+/.DS_Store
+/.com.apple.timemachine.supported
index bedd23a..57aad05 100644 (file)
@@ -33,7 +33,7 @@ vamsas-client.jar
 wsdl4j.jar
 xercesImpl.jar
 xml-apis.jar
-
+json_simple-1.1.jar : Apache 2.0 license : downloaded from https://code.google.com/p/json-simple/downloads/list (will move to 1.1.1 version when jalview is mavenised and osgi-ised)
 Additional dependencies
 
 examples/javascript/deployJava.js : http://java.com/js/deployJava.js
index 427c8b7..3b10c14 100644 (file)
@@ -80,7 +80,11 @@ function mcancelclosetime()
 document.onclick = mclose; 
 // -->
 </script>
-
+<script>
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
+</script> 
 </head>
 
 
@@ -88,10 +92,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -100,39 +104,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -546,7 +549,7 @@ document.onclick = mclose;
           </li>
           <li>Note parameter &quot;PDBSeq&quot; is no longer required.<br>
           </li>
-          <li>Jalview 2.3 was updated to work with Jmol 11. See the <a href="../versions.html">versions archive if you want to download the old Jmol applet</a>.</li> 
+          <li>Jalview 2.3 was updated to work with Jmol 11. See the <a href="/development">versions archive if you want to download the old Jmol applet</a>.</li> 
             <p>&nbsp;</p>
           </li>
         </ul>
@@ -599,18 +602,5 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </div>
 </div>
-
-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ?
- "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src=\'" + gaJsHost +
- "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try{
-    var pageTracker = _gat._getTracker("'UA-9060947-1'");
-    pageTracker._trackPageview();
-} catch(err) {}
-</script>
 </body>
 </html>
index e3e1d3c..c53cc7a 100755 (executable)
@@ -79,7 +79,11 @@ function mcancelclosetime()
 document.onclick = mclose; 
 // -->
 </script>
-
+<script>
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
+</script>
 </head>
 
 
@@ -87,10 +91,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -99,39 +103,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -319,4 +322,4 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </body>
 </html>
-          
\ No newline at end of file
+          
index 2f74116..2384737 100644 (file)
@@ -79,7 +79,11 @@ function mcancelclosetime()
 document.onclick = mclose; 
 // -->
 </script>
-
+<script>
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
+</script>
 </head>
 
 
@@ -87,10 +91,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -99,39 +103,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
index 86dceea..5a65953 100644 (file)
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <TITLE>Embedded JalviewLite talking to externally managed Jmol</TITLE>
+<script>
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
+</script>
 <script src="javascript/deployJava.js"></script>
 <script src="jmol/Jmol.js"></script>
 <script src="javascript/jquery-1.4.4.min.js"></script>
@@ -177,10 +182,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -189,39 +194,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -269,18 +273,5 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </div>
 </div>
-
-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ?
- "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src=\'" + gaJsHost +
- "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try{
-    var pageTracker = _gat._getTracker("'UA-9060947-1'");
-    pageTracker._trackPageview();
-} catch(err) {}
-</script>
 </body>
 </html>
index 71a904a..91b0670 100644 (file)
@@ -79,7 +79,11 @@ function mcancelclosetime()
 document.onclick = mclose; 
 // -->
 </script>
-
+<script>
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
+</script>
 </head>
 
 
@@ -87,10 +91,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -99,39 +103,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -218,18 +221,6 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </div>
 </div>
-
-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ?
- "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src=\'" + gaJsHost +
- "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try{
-    var pageTracker = _gat._getTracker("'UA-9060947-1'");
-    pageTracker._trackPageview();
-} catch(err) {}
-</script></body>
+</body>
 </html>
-  
\ No newline at end of file
+  
index 5d0af5d..0e8b78a 100644 (file)
@@ -80,7 +80,9 @@ function mcancelclosetime()
 document.onclick = mclose; 
 // -->
 </script>
-
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
 </head>
 
 
@@ -88,10 +90,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -100,39 +102,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
-       <li><a href="#">Home</a></li>
-       <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
-               <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-               <a href="#">Documentation</a>
-               <a href="#">Publications</a>
-               <a href="#">Credits</a>
-               <a href="#">Screenshots</a>
-               </div>
-       </li>
-       <li><a href="#">FAQ</a></li>
-       <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
-               <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-               <a href="#">News Mailing List</a>
-               <a href="#">Discussion Mailing List</a>
-               <a href="#">Links</a>
-               <a href="#">Community News</a>
-               </div>
-       </li>
-       <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
-               <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-               <a href="#">Release History</a>
-               <a href="#">Jalview Bug Tracker</a>
-               <a href="#">Jalview Git Web</a>
-               <a href="#">Development News</a>
-               </div>
-       </li>
-       <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
-               <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-               <a href="#">Training Courses</a>
-               <a href="#">Training News</a>
-               </div>
-       </li>
-       <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+  <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
+  </div>
+ </li>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+  <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
+  </div>
+ </li>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+  <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
+  </div>
+ </li>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+  <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
+  </div>
+ </li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -422,17 +423,5 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </div>
 </div>
-
-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ?
- "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src=\'" + gaJsHost +
- "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try{
-    var pageTracker = _gat._getTracker("'UA-9060947-1'");
-    pageTracker._trackPageview();
-} catch(err) {}
-</script></body>
+</body>
 </html>
index 7dbf8e0..f555265 100644 (file)
@@ -79,7 +79,9 @@ function mcancelclosetime()
 document.onclick = mclose; 
 // -->
 </script>
-
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
 </head>
 
 
@@ -87,10 +89,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -99,39 +101,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -267,19 +268,6 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </div>
 </div>
-
-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ?
- "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src=\'" + gaJsHost +
- "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try{
-    var pageTracker = _gat._getTracker("'UA-9060947-1'");
-    pageTracker._trackPageview();
-} catch(err) {}
-</script>
 </body>
 </head>
-</html>
\ No newline at end of file
+</html>
index 4296146..86f4bc0 100644 (file)
   
  <link href="css/reset.css" rel="stylesheet" type="text/css" />
  <link href="css/style.css" rel="stylesheet" type="text/css" />
+<script>
+<!--//--><![CDATA[//><!--
+var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+//--><!]]>
+</script>
 <script src="http://www.java.com/js/deployJava.js"></script>
 <script src="javascript/jalview.js" language="javascript"></script>
 <script>  //deployJava.debug="true";
@@ -106,10 +111,10 @@ document.onclick = mclose;
 
 
 <div id="header">
-<div id="logo"><a href="/" title="Home"></a></div>
+<div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
 <ul id="buttons">
 <li id="applet"><a href="applets.html" title="applet"></a></li>
-<li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
+<li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
 </ul>
 </div>
 
@@ -118,39 +123,38 @@ document.onclick = mclose;
 <div id="navInner">
 
 <ul id="sddm">
- <li><a href="#">Home</a></li>
- <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
+ <li><a href="http://www.jalview.org">Home</a></li>
+ <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Documentation</a>
-  <a href="#">Publications</a>
-  <a href="#">Credits</a>
-  <a href="#">Screenshots</a>
+  <a href="http://www.jalview.org/about/documentation">Documentation</a>
+  <a href="http://www.jalview.org/about/citation">Publications</a>
+  <a href="http://www.jalview.org/about/credits">Credits</a>
   </div>
  </li>
- <li><a href="#">FAQ</a></li>
- <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
+ <li><a href="http://www.jalview.org/faq">FAQ</a></li>
+ <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">News Mailing List</a>
-  <a href="#">Discussion Mailing List</a>
-  <a href="#">Links</a>
-  <a href="#">Community News</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
+  <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
+  <a href="http://www.jalview.org/community/links">Links</a>
+  <a href="http://www.jalview.org/community/community-news">Community News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
+ <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Release History</a>
-  <a href="#">Jalview Bug Tracker</a>
-  <a href="#">Jalview Git Web</a>
-  <a href="#">Development News</a>
+  <a href="http://www.jalview.org/development/release-history">Release History</a>
+  <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
+  <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
+  <a href="http://www.jalview.org/development/development-news">Development News</a>
   </div>
  </li>
- <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
+ <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
-  <a href="#">Training Courses</a>
-  <a href="#">Training News</a>
+  <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
+  <a href="http://www.jalview.org/training/training-news">Training News</a>
   </div>
  </li>
- <li><a href="#" class="download-right">Download</a></li>
+ <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
 </ul>
 <div style="clear:both"></div>
 </div>
@@ -267,18 +271,5 @@ Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatic
 </div>
 </div>
 </div>
-
-<script type="text/javascript">
-    var gaJsHost = (("https:" == document.location.protocol) ?
- "https://ssl." : "http://www.");
-    document.write(unescape("%3Cscript src=\'" + gaJsHost +
- "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try{
-    var pageTracker = _gat._getTracker("'UA-9060947-1'");
-    pageTracker._trackPageview();
-} catch(err) {}
-</script>
 </body>
 </html>
diff --git a/lib/json_simple-1.1.jar b/lib/json_simple-1.1.jar
new file mode 100644 (file)
index 0000000..f395f41
Binary files /dev/null and b/lib/json_simple-1.1.jar differ
index c85de33..3d54ae1 100755 (executable)
@@ -762,7 +762,7 @@ public class AnnotationLabels extends Panel implements ActionListener,
               dragEvent.getY());
     }
 
-    if ((aa == null) || (aa.length < 1))
+    if (!av.wrapAlignment && ((aa == null) || (aa.length < 1)))
     {
       g.setColor(Color.black);
       g.drawString("Right click", 2, 8);
index b0adb45..114de42 100644 (file)
@@ -2,33 +2,186 @@ package jalview.ext.paradise;
 
 import jalview.ws.HttpClientUtils;
 
+import java.io.IOException;
+import java.io.InputStreamReader;
 import java.io.Reader;
+import java.io.StringReader;
+import java.net.URL;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 
 import org.apache.http.NameValuePair;
 import org.apache.http.message.BasicNameValuePair;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.JSONStreamAware;
+import org.json.simple.parser.ContentHandler;
+import org.json.simple.parser.ParseException;
 
+/**
+ * simple methods for calling the various paradise RNA tools
+ * 
+ * @author jimp
+ * 
+ *         History: v1.0 revised from original due to refactoring of
+ *         paradise-ubmc.u-strasbg.fr/webservices/annotate3d to
+ *         http://arn-ibmc.in2p3.fr/api/compute/2d?tool=rnaview
+ */
 public class Annotate3D
 {
+  private static String twoDtoolsURL = "http://arn-ibmc.in2p3.fr/api/compute/2d";
+  private static ContentHandler createContentHandler()
+  {
+    ContentHandler ch = new ContentHandler() {
+
+      @Override
+      public void startJSON() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        
+      }
+
+      @Override
+      public void endJSON() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        
+      }
+
+      @Override
+      public boolean startObject() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
+
+      @Override
+      public boolean endObject() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
+
+      @Override
+      public boolean startObjectEntry(String key) throws ParseException,
+              IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
 
-  public static Reader getRNAMLForPDBFileAsString(String pdbfile)
+      @Override
+      public boolean endObjectEntry() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
+
+      @Override
+      public boolean startArray() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
+
+      @Override
+      public boolean endArray() throws ParseException, IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
+
+      @Override
+      public boolean primitive(Object value) throws ParseException,
+              IOException
+      {
+        // TODO Auto-generated method stub
+        return false;
+      }
+      
+    };
+    return ch;
+  }
+  public static Iterator<Reader> getRNAMLForPDBFileAsString(String pdbfile)
           throws Exception
   {
     List<NameValuePair> vals = new ArrayList<NameValuePair>();
+    vals.add(new BasicNameValuePair("tool", "rnaview"));
     vals.add(new BasicNameValuePair("data", pdbfile));
-    return HttpClientUtils.doHttpUrlPost(
-            "http://paradise-ibmc.u-strasbg.fr/webservices/annotate3d",
-            vals);
+    vals.add(new BasicNameValuePair("output", "rnaml"));
+    return processJsonResponseFor(HttpClientUtils.doHttpUrlPost(twoDtoolsURL, vals));
+  }
+  public static Iterator<Reader> processJsonResponseFor(Reader respons) throws Exception
+  {
+    org.json.simple.parser.JSONParser jp = new org.json.simple.parser.JSONParser();
+    try {
+      final JSONArray responses = (JSONArray) jp.parse(respons);
+      final Iterator rvals = responses.iterator();
+      return new Iterator<Reader>() 
+        {
+          @Override
+          public boolean hasNext()
+          {
+            return rvals.hasNext();
+          }
+          @Override
+          public Reader next()
+          {
+            JSONObject val=(JSONObject) rvals.next();
+            
+            Object sval = null;
+            try {
+              sval = val.get("2D");
+            } catch (Exception x) {x.printStackTrace();};
+            if (sval==null)
+            {
+              System.err.println("DEVELOPER WARNING: Annotate3d didn't return a '2D' tag in its response. Consider checking output of server. Response was :"+val.toString());
+              
+              sval = "";
+            }
+            return new StringReader((sval instanceof JSONObject) ? ((JSONObject)sval).toString():sval.toString());
+            
+          }@Override
+          public void remove()
+          {
+            throw new Error("Remove: Not implemented");
+            
+          }@Override
+          protected Object clone() throws CloneNotSupportedException
+          {
+            throw new CloneNotSupportedException("Clone: Not implemented");
+          }@Override
+          public boolean equals(Object obj)
+          {
+            return super.equals(obj);
+          }@Override
+          protected void finalize() throws Throwable
+          {
+            while (rvals.hasNext())
+            {
+              rvals.next();
+            }
+            super.finalize();
+          }
+        };
+    } catch (Exception foo)
+    {
+      throw new Exception("Couldn't parse response from Annotate3d server.",foo);
+    }
+    
+    
   }
 
-  public static Reader getRNAMLForPDBId(String pdbid) throws Exception
+  public static Iterator<Reader> getRNAMLForPDBId(String pdbid) throws Exception
   {
     List<NameValuePair> vals = new ArrayList<NameValuePair>();
+    vals.add(new BasicNameValuePair("tool", "rnaview"));
     vals.add(new BasicNameValuePair("pdbid", pdbid));
-    return HttpClientUtils.doHttpUrlPost(
-            "http://paradise-ibmc.u-strasbg.fr/webservices/annotate3d",
-            vals);
+    vals.add(new BasicNameValuePair("format", "rnaml"));
+    java.net.URL geturl = new URL(twoDtoolsURL+"?tool=rnaview&output=rnaml&pdbid="+pdbid);
+    return processJsonResponseFor(new InputStreamReader(geturl.openStream()));
   }
 
 }
index 1577477..dd6f190 100755 (executable)
@@ -960,7 +960,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
               dragEvent.getY() - scrollOffset);
     }
 
-    if ((aa == null) || (aa.length < 1))
+    if (!av.wrapAlignment && ((aa == null) || (aa.length < 1)))
     {
       g.drawString("Right click", 2, 8);
       g.drawString("to add annotation", 2, 18);
index 71cc5c5..a9b8d37 100644 (file)
@@ -26,24 +26,21 @@ import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceFeature;\r
 import jalview.datamodel.SequenceI;\r
 \r
-import java.io.*;\r
-import java.util.*;\r
-\r
-\r
-import javax.xml.parsers.ParserConfigurationException;\r
-\r
-import org.xml.sax.SAXException;\r
+import java.io.BufferedReader;\r
+import java.io.FileReader;\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.Enumeration;\r
+import java.util.Hashtable;\r
+import java.util.StringTokenizer;\r
+import java.util.Vector;\r
 \r
 import com.stevesoft.pat.Regex;\r
 \r
-import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;\r
-import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;\r
-import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied;\r
 import fr.orsay.lri.varna.exceptions.ExceptionUnmatchedClosingParentheses;\r
+import fr.orsay.lri.varna.factories.RNAFactory;\r
 import fr.orsay.lri.varna.models.rna.RNA;\r
 \r
-\r
-\r
 // import org.apache.log4j.*;\r
 \r
 /**\r
@@ -62,18 +59,19 @@ public class StockholmFile extends AlignFile
 {\r
   // static Logger logger = Logger.getLogger("jalview.io.StockholmFile");\r
   protected ArrayList<RNA> result;\r
+\r
   public String id;\r
-  \r
+\r
   public StockholmFile()\r
   {\r
   }\r
 \r
-  public StockholmFile(String inFile, String type) throws Exception \r
+  public StockholmFile(String inFile, String type) throws IOException\r
   {\r
     super(inFile, type);\r
   }\r
 \r
-  public StockholmFile(FileParse source) throws Exception \r
+  public StockholmFile(FileParse source) throws IOException\r
   {\r
     super(source);\r
   }\r
@@ -89,11 +87,9 @@ public class StockholmFile extends AlignFile
    * \r
    * @throws IOException\r
    *           If there is an error with the input file\r
- * @throws ExceptionUnmatchedClosingParentheses \r
    */\r
   public void parse() throws IOException\r
   {\r
-       \r
       StringBuffer treeString = new StringBuffer();\r
       String treeName = null;\r
       // --------------- Variable Definitions -------------------\r
@@ -544,8 +540,73 @@ public class StockholmFile extends AlignFile
                }\r
        }\r
 \r
-  protected static AlignmentAnnotation parseAnnotationRow(Vector annotation,\r
-          String label, String annots)\r
+\r
+  /**\r
+   * Parse a file in Stockholm format into Jalview's data model using VARNA\r
+   * \r
+   * @throws IOException\r
+   *           If there is an error with the input file\r
+   */\r
+  public void parse_with_VARNA() throws IOException\r
+  {\r
+    FileReader fr = null;\r
+    fr = new FileReader(inFile);\r
+\r
+    BufferedReader r = new BufferedReader(fr);\r
+    result = null;\r
+    try\r
+    {\r
+      result = RNAFactory.loadSecStrStockholm(r);\r
+    } catch (ExceptionUnmatchedClosingParentheses umcp)\r
+    {\r
+      errormessage = "Unmatched parentheses in annotation. Aborting ("\r
+              + umcp.getMessage() + ")";\r
+      throw new IOException(umcp);\r
+    }\r
+    // DEBUG System.out.println("this is the secondary scructure:"\r
+    // +result.size());\r
+    SequenceI[] seqs = new SequenceI[result.size()];\r
+    for (int i = 0; i < result.size(); i++)\r
+    {\r
+      // DEBUG System.err.println("Processing i'th sequence in Stockholm file")\r
+      RNA current = result.get(i);\r
+\r
+      String seq = current.getSeq();\r
+      String rna = current.getStructDBN(true);\r
+      // DEBUG System.out.println(seq);\r
+      // DEBUG System.err.println(rna);\r
+      int begin = 0;\r
+      int end = seq.length() - 1;\r
+      id = safeName(getDataName());\r
+      seqs[i] = new Sequence(id, seq, begin, end);\r
+      String[] annot = new String[rna.length()];\r
+      Annotation[] ann = new Annotation[rna.length()];\r
+      for (int j = 0; j < rna.length(); j++)\r
+      {\r
+        annot[j] = rna.substring(j, j + 1);\r
+\r
+      }\r
+\r
+      for (int k = 0; k < rna.length(); k++)\r
+      {\r
+        ann[k] = new Annotation(annot[k], "",\r
+                jalview.schemes.ResidueProperties.getRNASecStrucState(\r
+                        annot[k]).charAt(0), 0f);\r
+\r
+      }\r
+      AlignmentAnnotation align = new AlignmentAnnotation("Sec. str.",\r
+              current.getID(), ann);\r
+\r
+      seqs[i].addAlignmentAnnotation(align);\r
+      seqs[i].setRNA(result.get(i));\r
+      this.annotations.addElement(align);\r
+    }\r
+    this.setSeqs(seqs);\r
+\r
+  }\r
+\r
+  protected static AlignmentAnnotation parseAnnotationRow(\r
+          Vector annotation, String label, String annots)\r
   {\r
     String convert1, convert2 = null;\r
 \r
@@ -553,7 +614,7 @@ public class StockholmFile extends AlignFile
     Regex openparen = new Regex("(<|\\[)", "(");\r
     Regex closeparen = new Regex("(>|\\])", ")");\r
 \r
-   // Detect if file is RNA by looking for bracket types\r
+    // Detect if file is RNA by looking for bracket types\r
     Regex detectbrackets = new Regex("(<|>|\\[|\\]|\\(|\\))");\r
 \r
     convert1 = openparen.replaceAll(annots);\r
@@ -581,7 +642,7 @@ public class StockholmFile extends AlignFile
         if (detectbrackets.search(pos))\r
         {\r
           ann.secondaryStructure = jalview.schemes.ResidueProperties\r
-                 .getRNASecStrucState(pos).charAt(0);\r
+                  .getRNASecStrucState(pos).charAt(0);\r
         }\r
         else\r
         {\r
@@ -594,14 +655,14 @@ public class StockholmFile extends AlignFile
           ann.displayCharacter = ""; // null; // " ";\r
         }\r
         else\r
-       {\r
+        {\r
           ann.displayCharacter = " " + ann.displayCharacter;\r
         }\r
       }\r
 \r
       els[i] = ann;\r
     }\r
-   AlignmentAnnotation annot = null;\r
+    AlignmentAnnotation annot = null;\r
     Enumeration e = annotation.elements();\r
     while (e.hasMoreElements())\r
     {\r
@@ -616,16 +677,16 @@ public class StockholmFile extends AlignFile
       annotation.addElement(annot);\r
     }\r
     else\r
-   {\r
+    {\r
       Annotation[] anns = new Annotation[annot.annotations.length\r
               + els.length];\r
-     System.arraycopy(annot.annotations, 0, anns, 0,\r
-             annot.annotations.length);\r
+      System.arraycopy(annot.annotations, 0, anns, 0,\r
+              annot.annotations.length);\r
       System.arraycopy(els, 0, anns, annot.annotations.length, els.length);\r
       annot.annotations = anns;\r
-      //System.out.println("else: ");\r
-   }\r
-   return annot;\r
+      // System.out.println("else: ");\r
+    }\r
+    return annot;\r
   }\r
 \r
   public static String print(SequenceI[] s)\r
@@ -674,41 +735,6 @@ public class StockholmFile extends AlignFile
     return id;\r
   }\r
   /**\r
-   * //ssline is complete secondary structure line private AlignmentAnnotation\r
-   * addHelices(Vector annotation, String label, String ssline) {\r
-   * \r
-   * // decide on secondary structure or not. Annotation[] els = new\r
-   * Annotation[ssline.length()]; for (int i = 0; i < ssline.length(); i++) {\r
-   * String pos = ssline.substring(i, i + 1); Annotation ann; ann = new\r
-   * Annotation(pos, "", ' ', 0f); // 0f is 'valid' null - will not\r
-   * \r
-   * ann.secondaryStructure =\r
-   * jalview.schemes.ResidueProperties.getRNAssState(pos).charAt(0);\r
-   * \r
-   * ann.displayCharacter = "x" + ann.displayCharacter;\r
-   * \r
-   * System.out.println(ann.displayCharacter);\r
-   * \r
-   * els[i] = ann; } AlignmentAnnotation helicesAnnot = null; Enumeration e =\r
-   * annotation.elements(); while (e.hasMoreElements()) { helicesAnnot =\r
-   * (AlignmentAnnotation) e.nextElement(); if (helicesAnnot.label.equals(type))\r
-   * break; helicesAnnot = null; } if (helicesAnnot == null) { helicesAnnot =\r
-   * new AlignmentAnnotation(type, type, els);\r
-   * annotation.addElement(helicesAnnot); } else { Annotation[] anns = new\r
-   * Annotation[helicesAnnot.annotations.length + els.length];\r
-   * System.arraycopy(helicesAnnot.annotations, 0, anns, 0,\r
-   * helicesAnnot.annotations.length); System.arraycopy(els, 0, anns,\r
-   * helicesAnnot.annotations.length, els.length); helicesAnnot.annotations =\r
-   * anns; }\r
-   * \r
-   * helicesAnnot.features = Rna.GetBasePairs(ssline);\r
-   * Rna.HelixMap(helicesAnnot.features);\r
-   * \r
-   * \r
-   * return helicesAnnot; }\r
-   * \r
-   */\r
-  /**\r
    * make a friendly ID string.\r
    * \r
    * @param dataName\r
@@ -717,13 +743,13 @@ public class StockholmFile extends AlignFile
   private String safeName(String dataName)\r
   {\r
     int b = 0;\r
-    while ((b = dataName.indexOf("/")) > -1 && b < dataName.length() )\r
-    {             \r
-       dataName = dataName.substring(b + 1).trim();\r
-       \r
+    while ((b = dataName.indexOf("/")) > -1 && b < dataName.length())\r
+    {\r
+      dataName = dataName.substring(b + 1).trim();\r
+\r
     }\r
-    int e = (dataName.length() - dataName.indexOf("."))+1;\r
-    dataName = dataName.substring(1,e).trim();\r
+    int e = (dataName.length() - dataName.indexOf(".")) + 1;\r
+    dataName = dataName.substring(1, e).trim();\r
     return dataName;\r
   }\r
 }\r
index 158ba6b..c020d99 100644 (file)
@@ -87,7 +87,6 @@ import java.util.regex.Pattern;
  * 
  */
 public class TCoffeeScoreFile extends AlignFile {
-       
   public TCoffeeScoreFile(String inFile, String type) throws IOException
   {
     super(inFile, type);
index cb53eb6..64ab859 100644 (file)
@@ -319,6 +319,10 @@ public class AnnotationRenderer
     fm = g.getFontMetrics();
     AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
     int temp = 0;
+    if (aa==null)
+    {
+      return false;
+    }
     int x = 0, y = 0;
     int column = 0;
     char lastSS;
index 78f2477..0940f40 100644 (file)
@@ -83,4 +83,10 @@ public class EmblCdsSouce extends EmblXmlSource implements DbSourceProxy
     return "EMBL (CDS)";
   }
 
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
+
 }
index 4495be1..c7be59a 100644 (file)
@@ -114,4 +114,10 @@ public class EmblSource extends EmblXmlSource implements DbSourceProxy
   {
     return "EMBL"; // getDbSource();
   }
+
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index 125a295..81c8ea3 100644 (file)
@@ -118,4 +118,9 @@ public class GeneDbSource extends EmblXmlSource implements DbSourceProxy
   {
     return "GeneDB"; // getDbSource();
   }
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index 219008d..631a79f 100644 (file)
@@ -220,4 +220,9 @@ public class Pdb extends EbiFileRetrievedProxy implements DbSourceProxy
     return "PDB"; // getDbSource();
   }
 
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index 75d4559..077b929 100644 (file)
@@ -65,4 +65,9 @@ public class PfamFull extends Pfam implements DbSourceProxy
     return null;
   }
 
+   @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index cab4999..cb00a1d 100644 (file)
@@ -62,4 +62,9 @@ public class PfamSeed extends Pfam implements DbSourceProxy
     return "PF03760";
   }
 
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index 3703e41..e20527a 100644 (file)
@@ -70,4 +70,9 @@ public class RfamFull extends Rfam implements DbSourceProxy
     return null;
   }
 
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index eb3c2c3..75fa62b 100644 (file)
@@ -69,4 +69,9 @@ public class RfamSeed extends Rfam implements DbSourceProxy
     return null;
   }
 
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index 48f8649..1b967c4 100644 (file)
@@ -294,4 +294,10 @@ public class Uniprot extends DbSourceProxyImpl implements DbSourceProxy
   {
     return "Uniprot"; // getDbSource();
   }
+
+  @Override
+  public int getTier()
+  {
+    return 0;
+  }
 }
index 1511e6b..308bc21 100644 (file)
@@ -74,4 +74,10 @@ public interface jalviewSourceI
    */
   boolean isNewerThan(jalviewSourceI jalviewSourceI);
 
+  /**
+   * test if the source is a reference source for the authority
+   * @return
+   */
+  boolean isReferenceSource();
+
 }
index 95ff7d0..9650b8c 100644 (file)
@@ -70,6 +70,11 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
   protected MultipleConnectionPropertyProviderI connprops = null;
 
   /**
+   * DAS sources are tier 1 - if we have a direct DB connection then we should prefer it
+   */
+  private int tier=1;
+
+  /**
    * create a new DbSource proxy for a DAS 1 source
    * 
    * @param dbnbame
@@ -94,6 +99,7 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
       throw new Exception("Source " + source.getTitle()
               + " does not support the sequence command.");
     }
+    this.tier = 1+((jsrc.isLocal() || jsrc.isReferenceSource()) ? 0 : 1);
     this.source = source;
     this.dbname = dbname;
     this.dbrefname = dbrefname.toUpperCase();
@@ -334,4 +340,10 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
   {
     return coordsys;
   }
+
+  @Override
+  public int getTier()
+  {
+    return tier;
+  }
 }
index eb9d807..f68a005 100644 (file)
@@ -366,4 +366,11 @@ public class JalviewSource implements jalviewSourceI
     return isLaterThan(getVersion().getCreated(), other.getVersion()
             .getCreated());
   }
+
+  @Override
+  public boolean isReferenceSource()
+  {
+    // TODO check source object for indication that we are the primary for a DAS coordinate system
+    return false;
+  }
 }
index a30a9a1..e90b2d2 100644 (file)
@@ -31,6 +31,7 @@ import java.io.Reader;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLEncoder;
+import java.util.Iterator;
 
 public class Annotate3D
 {
@@ -76,12 +77,21 @@ public class Annotate3D
           sb.append(cbuff[i]);
         }
       }
-
-      FileParse fp = new InputStreamParser(
-              jalview.ext.paradise.Annotate3D.getRNAMLForPDBFileAsString(sb
-                      .toString()), source.getDataName());
-      AlignmentI nal = new FormatAdapter().readFromFile(fp, "RNAML");
-      return nal;
+      Iterator<Reader> r = jalview.ext.paradise.Annotate3D
+              .getRNAMLForPDBFileAsString(sb.toString());
+      AlignmentI al=null;
+      while (r.hasNext())
+      {
+        FileParse fp = new InputStreamParser(r.next(), source.getDataName());
+        AlignmentI nal = new FormatAdapter().readFromFile(fp, "RNAML");
+        if (al==null)
+        {
+          al = nal;
+        } else {
+          al.append(nal);
+        }
+      }
+      return al;
     } catch (Throwable x)
     {
       if (x instanceof IOException)
index 1a21fea..8ad14e0 100644 (file)
@@ -23,6 +23,7 @@ import jalview.gui.Desktop;
 import jalview.gui.JvSwingUtils;
 import jalview.ws.WSMenuEntryProviderI;
 import jalview.ws.jws2.jabaws2.Jws2Instance;
+import jalview.ws.params.ParamDatastoreI;
 
 import java.awt.Color;
 import java.awt.event.ActionEvent;
@@ -250,7 +251,11 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
 
     services.add(service);
     // retrieve the presets and parameter set and cache now
-    service.getParamStore().getPresets();
+    ParamDatastoreI pds = service.getParamStore();
+    if (pds != null)
+    {
+      pds.getPresets();
+    }
     service.hasParameters();
     if (validServiceUrls == null)
     {
index 09f4a48..aa42ff7 100644 (file)
@@ -173,6 +173,8 @@ public class Jws2Instance
                         : null));
       } catch (Exception ex)
       {
+        System.err.println("Unexpected exception creating JabaParamStore.");
+        ex.printStackTrace();
       }
 
     }
index 45b866e..e475915 100644 (file)
@@ -272,9 +272,10 @@ public class ASequenceFetcher
       DbSourceProxy[] l = dblist.values().toArray(new DbSourceProxy[0]);
       int i = 0;
       String[] nm = new String[l.length];
+      // make sure standard dbs appear first, followed by reference das sources, followed by anything else.
       for (DbSourceProxy s : l)
       {
-        nm[i++] = s.getDbName().toLowerCase();
+        nm[i++] = ""+s.getTier()+s.getDbName().toLowerCase();
       }
       jalview.util.QuickSort.sort(nm, l);
       dbs = new ArrayList<DbSourceProxy>();
index cc9997f..e4b76b9 100644 (file)
@@ -134,4 +134,11 @@ public interface DbSourceProxy
    * @return true if the source has this property
    */
   public boolean isA(Object dbsourceproperty);
+
+  /**
+   * Tier for this data source
+   *  
+   * @return 0 - primary datasource, 1 - das primary source, 2 - secondary
+   */
+  public int getTier();
 }
index 1ed46f4..702d9ad 100644 (file)
@@ -10,6 +10,8 @@ import jalview.io.FormatAdapter;
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.Reader;
+import java.util.Iterator;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -24,13 +26,17 @@ public class TestAnnotate3D
   @Test
   public void testIdVsContent() throws Exception
   {
-    BufferedReader id = (BufferedReader) Annotate3D
+    Iterator<Reader> ids = Annotate3D
             .getRNAMLForPDBId("2GIS");
-    assertTrue("Didn't retrieve 2GIS by id.", id != null);
-    BufferedReader file = (BufferedReader) Annotate3D
+    assertTrue("Didn't retrieve 2GIS by id.", ids != null);
+    Iterator<Reader> files = Annotate3D
             .getRNAMLForPDBFileAsString(FileUtil.readFileToString(new File(
                     "examples/2GIS.pdb")));
-    assertTrue("Didn't retrieve using examples/2GIS.pdb.", file != null);
+    assertTrue("Didn't retrieve using examples/2GIS.pdb.", files != null);
+    int i=0;
+    while (ids.hasNext() && files.hasNext())
+    {
+      BufferedReader file=new BufferedReader(files.next()), id=new BufferedReader(ids.next());
     String iline, fline;
     do
     {
@@ -40,12 +46,13 @@ public class TestAnnotate3D
         System.out.println(iline);
       if (fline != null)
         System.out.println(fline);
-
-      assertTrue("Results differ for ID and file upload based retrieval",
+      // next assert fails for latest RNAview - because the XMLID entries change between file and ID based RNAML generation.
+      assertTrue("Results differ for ID and file upload based retrieval (chain entry "+(++i)+")",
               ((iline == fline && iline == null) || (iline != null
                       && fline != null && iline.equals(fline))));
 
     } while (iline != null);
+    }
   }
 
   /**
@@ -62,39 +69,46 @@ public class TestAnnotate3D
     StringBuffer sb = new StringBuffer();
     // Comment - should add new FileParse constructor like new FileParse(Reader
     // ..). for direct reading
-    BufferedReader br = new BufferedReader(
-            Annotate3D.getRNAMLForPDBFileAsString(FileUtil
-                    .readFileToString(new File("examples/2GIS.pdb"))));
-    String line;
-    while ((line = br.readLine()) != null)
+    Iterator<Reader> readers = Annotate3D
+            .getRNAMLForPDBFileAsString(FileUtil.readFileToString(new File(
+                    "examples/2GIS.pdb")));
+    int r=0;
+    while (readers.hasNext())
     {
-      sb.append(line + "\n");
-    }
-    assertTrue("No data returned by Annotate3D", sb.length() > 0);
-    AlignmentI al = new FormatAdapter().readFile(sb.toString(),
-            FormatAdapter.PASTE, "RNAML");
+      System.out.println("Testing RNAML input number "+(++r));
+      BufferedReader br = new BufferedReader(readers.next());
+      String line;
+      while ((line = br.readLine()) != null)
+      {
+        sb.append(line + "\n");
+      }
+      assertTrue("No data returned by Annotate3D", sb.length() > 0);
+      AlignmentI al = new FormatAdapter().readFile(sb.toString(),
+              FormatAdapter.PASTE, "RNAML");
 
-    assertTrue("No alignment returned.", al != null);
-    assertTrue("No sequences in returned alignment.", al.getHeight() > 0);
-    for (SequenceI sq : al.getSequences())
-    {
+      assertTrue("No alignment returned.", al != null);
+      assertTrue("No sequences in returned alignment.", al.getHeight() > 0);
+      for (SequenceI sq : al.getSequences())
       {
-        SequenceI struseq = null;
-        String sq_ = new String(sq.getSequence()).toLowerCase();
-        for (SequenceI _struseq : pdbf.getSeqsAsArray())
         {
-          if (new String(_struseq.getSequence()).toLowerCase().equals(sq_))
+          SequenceI struseq = null;
+          String sq_ = new String(sq.getSequence()).toLowerCase();
+          for (SequenceI _struseq : pdbf.getSeqsAsArray())
           {
-            struseq = _struseq;
-            break;
+            if (new String(_struseq.getSequence()).toLowerCase()
+                    .equals(sq_))
+            {
+              struseq = _struseq;
+              break;
+            }
+          }
+          if (struseq == null)
+          {
+            Assert.fail("Couldn't find this sequence in original input:\n"
+                    + new FastaFile().print(new SequenceI[]
+                    { sq }) + "\n\nOriginal input:\n"
+                    + new FastaFile().print(pdbf.getSeqsAsArray()) + "\n");
           }
-        }
-        if (struseq == null)
-        {
-          Assert.fail("Couldn't find this sequence in original input:\n"
-                  + new FastaFile().print(new SequenceI[]
-                  { sq }) + "\n\nOriginal input:\n"
-                  + new FastaFile().print(pdbf.getSeqsAsArray()) + "\n");
         }
       }
     }
index b2fbe14..6d11ebe 100644 (file)
@@ -134,6 +134,7 @@ public class TCoffeeScoreFileTest {
        
        @Test
        public void testGetAsList() throws IOException {
+               
           TCoffeeScoreFile parser = new TCoffeeScoreFile(SCORE_FILE.getPath(),FormatAdapter.FILE);
           assertTrue(parser.getWarningMessage(),parser.isValid());
                List<String> scores = parser.getScoresList();
diff --git a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java
new file mode 100644 (file)
index 0000000..2f826b3
--- /dev/null
@@ -0,0 +1,78 @@
+/**
+ * 
+ */
+package jalview.ws.seqfetcher;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import jalview.datamodel.DBRefSource;
+import jalview.ws.DBRefFetcher;
+import jalview.ws.SequenceFetcher;
+import jalview.ws.dbsources.das.api.jalviewSourceI;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author jimp
+ *
+ */
+public class DbRefFetcherTest
+{
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception
+  {
+  }
+
+  /**
+   * @throws java.lang.Exception
+   */
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception
+  {
+  }
+
+  @Test
+  public void testStandardProtDbs()
+  {
+    String[] defdb = DBRefSource.PROTEINDBS;
+  List<DbSourceProxy> srces = new ArrayList<DbSourceProxy>();
+  for (String ddb : defdb)
+  {
+    SequenceFetcher sfetcher= new SequenceFetcher();
+    List<DbSourceProxy> srcesfordb = sfetcher.getSourceProxy(ddb);
+    
+    if (srcesfordb != null)
+    {
+      srces.addAll(srcesfordb);
+    }
+  }
+  DbSourceProxy uniprot=null;
+  int i=0;
+  // append the selected sequence sources to the default dbs
+  for (DbSourceProxy s:srces)
+  {
+    if (s.getDbSource().equalsIgnoreCase(DBRefSource.UNIPROT))
+    {
+      i++;
+    }
+    
+    if (s instanceof jalview.ws.dbsources.Uniprot)
+    {
+      uniprot = s;
+      break;
+    }
+  }
+          
+  assertTrue("Failed to find Uniprot source as first source amongst "+srces.size()+" sources (source was at position "+i+")", uniprot!=null && i<2);
+  }
+
+}