<classpathentry kind="lib" path="lib/log4j-to-slf4j-2.0-rc2.jar"/>
<classpathentry kind="lib" path="lib/slf4j-log4j12-1.7.7.jar"/>
<classpathentry kind="lib" path="lib/VARNAv3-91.jar"/>
- <classpathentry kind="lib" path="lib/jfreesvg-2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin17"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin"/>
+ <classpathentry kind="lib" path="lib/jfreesvg-2.1.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jalview"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value=""/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="buildindices,"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
Jim Procter
Andrew Waterhouse
+Mungo Carstairs
+Tochukwu 'Charles' Ofoegbu
Jan Engelhardt
Lauren Lui
Anne Menard
JGoogleAnalytics_0.3.jar APL 2.0 License - http://code.google.com/p/jgoogleanalytics/
Jmol-12.1.13.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/
+VARNAv3-91.jar GPL licenced software by Kévin Darty, Alain Denise and Yann Ponty. http://varna.lri.fr
activation.jar
apache-mime4j-0.6.jar
axis.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)
+jfreesvg-2.1.jar : GPL v3 licensed library from the JFree suite: http://www.jfree.org/jfreesvg/
Additional dependencies
<include name="*.jar"/>
</fileset> -->
</path>
+
<!-- Jalview Version String displayed by application on startup and used to check for updates -->
<property name="JALVIEW_VERSION" value="DEVELOPMENT" />
+
+ <property name="INSTALLATION" value="Source" />
+
<!-- 2.4 (VAMSAS)" -->
<!-- Include debugging information in javac true or false -->
<property name="javac.debug" value="true" />
<!-- switch to exclude associations from generated jnlp files -->
<!-- <property name="nojnlpfileassocs" value="true"/> -->
- <!-- Jalview Web Service Clients - see the comments in 'buildextexcclients' for details -->
+ <!-- Jalview Web Service Clients - see the comments in 'buildextclients' for details -->
<property name="wsdl.File" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred?wsdl" />
<property name="wsdl.Files" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/vamsas?wsdlFiles" />
<property name="wsdl.MsaWS" value="http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS?wsdl" />
<properties file="${outputDir}/.build_properties">
<header>
---Jalview Build Details---
- </header>
+ </header>
<property name="VERSION" value="${JALVIEW_VERSION}" />
+ <property name="INSTALLATION" value="${INSTALLATION}" />
<property name="BUILD_DATE" value="${build.date}" />
</properties>
</target>
<mkdir dir="${outputDir}" />
<javac source="1.5" target="1.5" srcdir="${sourceDir}" destdir="${outputDir}" debug="${javac.debug}"
classpathref="jalviewlite.deps" includes="jalview/appletgui/**"
- excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/io/**,jalview/ext/paradise/**" />
+ excludes="ext/**,MCview/**,org/**,vamsas/**,jalview/ext/paradise/**" />
</target>
<target name="packageApplet" depends="compileApplet, buildPropertiesFile">
<!-- <script src="https://s3-eu-west-1.amazonaws.com/biojs/msa/latest/msa.js"></script> -->
<!-- <link type=text/css rel=stylesheet href=https://s3-eu-west-1.amazonaws.com/biojs/msa/latest/msa.css /> -->
- <img src="file:/Users/tcnofoegbu/Documents/workspace/java/dev/jalview/classes/images/Jalview_Logo.png" alt="Jalview Logo" title="This html page was generated from Jalview, to import the data back to Jalview, please drag the generated html file and drop it unto the Jalview workbench.
+ <img src="http://www.jalview.org/help/html/Jalview_Logo.png" alt="Jalview Logo" title="This html page was generated from Jalview, to import the data back to Jalview, please drag the generated html file and drop it unto the Jalview workbench.
Alternatively, you could copy the url from the address bar and use Jalview's url importer (main menu-> File-> Input Alignment-> from URL) to import back the alignment jalview." >
</br>
</br>
-<button onclick="javascipt:openJalviewUsingCurrentUrl();">Launch in Jalview</button>
<input type="button" name="divToggleButton" id="divToggleButton" onclick="javascipt:toggleMenuVisibility();" value="Show Menu"></input>
+<button onclick="javascipt:openJalviewUsingCurrentUrl();">Launch in Jalview</button>
</br>
</br>
<div id="yourDiv">press "Run with JS"</div>
-<input type='hidden' id='seqData' name='seqData' value='{"globalColorScheme":"zappo","seqs":[{"id":"1","start":1,"name":"FER_CAPAA/1-97","seq":"----------------------------------------------------------ASYKVKLITPDGPIEFDCPDDVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDDDQLEEGWVLTCVAYPQSDVTIETHKEAELVG-","features":[],"end":97},{"id":"2","start":1,"name":"FER_CAPAN/1-144","seq":"------MASVSATMISTSFMPRKPAVTSLKPIP-NVG-EALFGLKS---ANGGKVTCMASYKVKLITPDGPIEFDCPDNVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDDDQLEEGWVLTCVAYPQSDVTIETHKEAELVG-","features":[{"xEnd":22,"text":"feature_1","fillColor":"#8c25cd","xStart":2}],"end":144},{"id":"3","start":1,"name":"FER1_SOLLC/1-144","seq":"------MASISGTMISTSFLPRKPAVTSLKAIS-NVG-EALFGLKS---GRNGRITCMASYKVKLITPEGPIEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGSVDQSDGNFLDEDQEAAGFVLTCVAYPKGDVTIETHKEEELTA-","features":[],"end":144},{"id":"4","start":1,"name":"Q93XJ9_SOLTU/1-144","seq":"------MASISGTMISTSFLPRKPVVTSLKAIS-NVG-EALFGLKS---GRNGRITCMASYKVKLITPDGPIEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGTVDQSDGKFLDDDQEAAGFVLTCVAYPKCDVTIETHKEEELTA-","features":[],"end":144},{"id":"5","start":1,"name":"FER1_PEA/1-149","seq":"---MATTPALYGTAVSTSFLRTQPMPMSVTTTKAFSN--GFLGLKT-SLKRGDLAVAMASYKVKLVTPDGTQEFECPSDVYILDHAEEVGIDLPYSCRAGSCSSCAGKVVGGEVDQSDGSFLDDEQIEAGFVLTCVAYPTSDVVIETHKEEDLTA-","features":[],"end":149},{"id":"6","start":1,"name":"Q7XA98_TRIPR/1-152","seq":"---MATTPALYGTAVSTSFMRRQPVPMSVATTTTTKAFPSGFGLKSVSTKRGDLAVAMATYKVKLITPEGPQEFDCPDDVYILDHAEEVGIELPYSCRAGSCSSCAGKVVNGNVNQEDGSFLDDEQIEGGWVLTCVAFPTSDVTIETHKEEELTA-","features":[],"end":152},{"id":"7","start":1,"name":"FER1_MESCR/1-148","seq":"--MAATTAALSGATMSTAFAPKT--PPMTAALPTNVG-RALFGLKS--SASRGRVTAMAAYKVTLVTPEGKQELECPDDVYILDAAEEAGIDLPYSCRAGSCSSCAGKVTSGSVNQDDGSFLDDDQIKEGWVLTCVAYPTGDVTIETHKEEELTA-","features":[],"end":148},{"id":"8","start":1,"name":"FER1_SPIOL/1-147","seq":"----MAATTTTMMGMATTFVPKPQAPPMMAALPSNTG-RSLFGLKT--GSRGGRMT-MAAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLDDDQIDEGWVLTCAAYPVSDVTIETHKEEELTA-","features":[],"end":147},{"id":"9","start":1,"name":"FER3_RAPSA/1-96","seq":"----------------------------------------------------------ATYKVKFITPEGEQEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDDDQIAEGFVLTCAAYPTSDVTIETHREEDMV--","features":[],"end":96},{"id":"10","start":1,"name":"FER1_ARATH/1-148","seq":"----MASTALSSAIVGTSFIRRSPAPISLRSLPSANT-QSLFGLKS-GTARGGRVTAMATYKVKFITPEGELEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDDEQIGEGFVLTCAAYPTSDVTIETHKEEDIV--","features":[],"end":148},{"id":"11","start":1,"name":"FER_BRANA/1-96","seq":"----------------------------------------------------------ATYKVKFITPEGEQEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGFVDQSDESFLDDDQIAEGFVLTCAAYPTSDVTIETHKEEELV--","features":[],"end":96},{"id":"12","start":1,"name":"FER2_ARATH/1-148","seq":"----MASTALSSAIVSTSFLRRQQTPISLRSLPFANT-QSLFGLKS-STARGGRVTAMATYKVKFITPEGEQEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDDEQMSEGYVLTCVAYPTSDVVIETHKEEAIM--","features":[],"end":148},{"id":"13","start":1,"name":"Q93Z60_ARATH/1-118","seq":"----MASTALSSAIVSTSFLRRQQTPISLRSLPFANT-QSLFGLKS-STARGGRVTAMATYKVKFITPEGEQEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDD--------------------------------","features":[],"end":118},{"id":"14","start":1,"name":"FER1_MAIZE/1-150","seq":"MATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVG---IMGRSA---SSRRRLRAQATYNVKLITPEGEVELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKEEELTGA","features":[],"end":150},{"id":"15","start":1,"name":"O80429_MAIZE/1-140","seq":"---------MAATALSMSILRAPP-PCFSSPLRLRVAVAKPLAAPM----RRQLLRAQATYNVKLITPEGEVELQVPDDVYILDFAEEEGIDLPFSCRAGSCSSCAGKVVSGSVDQSDQSFLNDNQVADGWVLTCAAYPTSDVVIETHKEDDLL--","features":[],"end":140}]}'/>
+<input type='hidden' id='seqData' name='seqData' value='{"globalColorScheme":"zappo","seqs":[{"id":"1","start":1,"name":"FER_CAPAA/1-97","seq":"----------------------------------------------------------ASYKVKLITPDGPIEFDCPDDVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDDDQLEEGWVLTCVAYPQSDVTIETHKEAELVG-","features":[],"end":97},{"id":"2","start":1,"name":"FER_CAPAN/1-144","seq":"------MASVSATMISTSFMPRKPAVTSLKPIP-NVG-EALFGLKS---ANGGKVTCMASYKVKLITPDGPIEFDCPDNVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDDDQLEEGWVLTCVAYPQSDVTIETHKEAELVG-","features":[{"text":"feature_1","xEnd":46,"fillColor":"#8c25cd","xStart":16}],"end":144},{"id":"3","start":1,"name":"FER1_SOLLC/1-144","seq":"------MASISGTMISTSFLPRKPAVTSLKAIS-NVG-EALFGLKS---GRNGRITCMASYKVKLITPEGPIEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGSVDQSDGNFLDEDQEAAGFVLTCVAYPKGDVTIETHKEEELTA-","features":[],"end":144},{"id":"4","start":1,"name":"Q93XJ9_SOLTU/1-144","seq":"------MASISGTMISTSFLPRKPVVTSLKAIS-NVG-EALFGLKS---GRNGRITCMASYKVKLITPDGPIEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGTVDQSDGKFLDDDQEAAGFVLTCVAYPKCDVTIETHKEEELTA-","features":[],"end":144},{"id":"5","start":1,"name":"FER1_PEA/1-149","seq":"---MATTPALYGTAVSTSFLRTQPMPMSVTTTKAFSN--GFLGLKT-SLKRGDLAVAMASYKVKLVTPDGTQEFECPSDVYILDHAEEVGIDLPYSCRAGSCSSCAGKVVGGEVDQSDGSFLDDEQIEAGFVLTCVAYPTSDVVIETHKEEDLTA-","features":[],"end":149},{"id":"6","start":1,"name":"Q7XA98_TRIPR/1-152","seq":"---MATTPALYGTAVSTSFMRRQPVPMSVATTTTTKAFPSGFGLKSVSTKRGDLAVAMATYKVKLITPEGPQEFDCPDDVYILDHAEEVGIELPYSCRAGSCSSCAGKVVNGNVNQEDGSFLDDEQIEGGWVLTCVAFPTSDVTIETHKEEELTA-","features":[{"text":"feature_2","xEnd":24,"fillColor":"#0000cc","xStart":8}],"end":152},{"id":"7","start":1,"name":"FER1_MESCR/1-148","seq":"--MAATTAALSGATMSTAFAPKT--PPMTAALPTNVG-RALFGLKS--SASRGRVTAMAAYKVTLVTPEGKQELECPDDVYILDAAEEAGIDLPYSCRAGSCSSCAGKVTSGSVNQDDGSFLDDDQIKEGWVLTCVAYPTGDVTIETHKEEELTA-","features":[],"end":148},{"id":"8","start":1,"name":"FER1_SPIOL/1-147","seq":"----MAATTTTMMGMATTFVPKPQAPPMMAALPSNTG-RSLFGLKT--GSRGGRMT-MAAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLDDDQIDEGWVLTCAAYPVSDVTIETHKEEELTA-","features":[],"end":147},{"id":"9","start":1,"name":"FER3_RAPSA/1-96","seq":"----------------------------------------------------------ATYKVKFITPEGEQEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDDDQIAEGFVLTCAAYPTSDVTIETHREEDMV--","features":[],"end":96},{"id":"10","start":1,"name":"FER1_ARATH/1-148","seq":"----MASTALSSAIVGTSFIRRSPAPISLRSLPSANT-QSLFGLKS-GTARGGRVTAMATYKVKFITPEGELEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDDEQIGEGFVLTCAAYPTSDVTIETHKEEDIV--","features":[],"end":148},{"id":"11","start":1,"name":"FER_BRANA/1-96","seq":"----------------------------------------------------------ATYKVKFITPEGEQEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGFVDQSDESFLDDDQIAEGFVLTCAAYPTSDVTIETHKEEELV--","features":[],"end":96},{"id":"12","start":1,"name":"FER2_ARATH/1-148","seq":"----MASTALSSAIVSTSFLRRQQTPISLRSLPFANT-QSLFGLKS-STARGGRVTAMATYKVKFITPEGEQEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDDEQMSEGYVLTCVAYPTSDVVIETHKEEAIM--","features":[{"text":"feature_3","xEnd":32,"fillColor":"#ffff00","xStart":4}],"end":148},{"id":"13","start":1,"name":"Q93Z60_ARATH/1-118","seq":"----MASTALSSAIVSTSFLRRQQTPISLRSLPFANT-QSLFGLKS-STARGGRVTAMATYKVKFITPEGEQEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDD--------------------------------","features":[],"end":118},{"id":"14","start":1,"name":"FER1_MAIZE/1-150","seq":"MATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVG---IMGRSA---SSRRRLRAQATYNVKLITPEGEVELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKEEELTGA","features":[],"end":150},{"id":"15","start":1,"name":"O80429_MAIZE/1-140","seq":"---------MAATALSMSILRAPP-PCFSSPLRLRVAVAKPLAAPM----RRQLLRAQATYNVKLITPEGEVELQVPDDVYILDFAEEEGIDLPFSCRAGSCSSCAGKVVSGSVDQSDQSFLNDNQVADGWVLTCAAYPTSDVVIETHKEDDLL--","features":[],"end":140}],"webStartUrl":"http://www.jalview.org/services/launchApp","jalviewVersion":"Test"}'/>
</body>
</html>
<script>
function toggleMenuVisibility(){
- //alert("toggleMenuVisibility called!");
-
var menu = document.getElementsByClassName("biojs_msa_menubar");
var divToggleButton = document.getElementById("divToggleButton");
if(menu[0].style.display == 'block'){
divToggleButton.value="Hide Menu";
}
}
-function openJalviewUsingCurrentUrl2(){
-var jnpl = "<!--"+
-"Hi!"+
-"If you have downloaded this file after pressing \"Launch Full Application\" from Jalview on a web page and you don't know what to do with this file, you must install Java from http://www.java.sun.com then try opening this file again."+
-" \n"+
-" JNLP generated by /jalviewServlet/services/launchAppDev"+
-" JNLP generated from http://www.jalview.org/builds/develop/webstart/jalview.jnlp"+
-"Available servlet parameters (please URLEncode):"+
-" open=<alignment file URL>"+
-" jvm-max-heap=heap size in M or G"+
-" features maps to '-features'"+
-" treeFile maps to '-tree'"+
-" tree maps to '-tree'"+
-" annotations maps to '-annotations'"+
-" colour maps to '-colour'"+
-" "+
-"-->"+
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?><jnlp spec=\"1.0+\" codebase=\"http://www.jalview.org/builds/develop/webstart\"> <information> <title>Jalview</title> <vendor>The Barton Group</vendor> <homepage href=\"http://www.jalview.org\"/> <description>Jalview Multiple Alignment Editor</description> <description kind=\"short\">Jalview</description> <icon href=\"JalviewLogo_big.png\"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version=\"1.7+\" initial-heap-size=\"10M\" max-heap-size=\"2G\"/> <jar href=\"jalview.jar\"/> <jar href=\"JGoogleAnalytics_0.3.jar\"/> <jar href=\"Jmol-12.2.4.jar\"/> <jar href=\"VARNAv3-91.jar\"/> <jar href=\"activation.jar\"/> <jar href=\"apache-mime4j-0.6.jar\"/> <jar href=\"axis.jar\"/> <jar href=\"castor-1.1-cycle-xml.jar\"/> <jar href=\"commons-codec-1.3.jar\"/> <jar href=\"commons-discovery.jar\"/> <jar href=\"commons-logging-1.1.1.jar\"/> <jar href=\"groovy-all-1.8.2.jar\"/> <jar href=\"httpclient-4.0.3.jar\"/> <jar href=\"httpcore-4.0.1.jar\"/> <jar href=\"httpmime-4.0.3.jar\"/> <jar href=\"jalview_jnlp_vm.jar\"/> <jar href=\"jaxrpc.jar\"/> <jar href=\"jdas-1.0.4.jar\"/> <jar href=\"jhall.jar\"/> <jar href=\"json_simple-1.1.jar\"/> <jar href=\"jsoup-1.8.1.jar\"/> <jar href=\"jswingreader-0.3.jar\"/> <jar href=\"log4j-to-slf4j-2.0-rc2.jar\"/> <jar href=\"mail.jar\"/> <jar href=\"miglayout-4.0-swing.jar\"/> <jar href=\"min-jabaws-client-2.1.0.jar\"/> <jar href=\"regex.jar\"/> <jar href=\"saaj.jar\"/> <jar href=\"slf4j-api-1.7.7.jar\"/> <jar href=\"slf4j-log4j12-1.7.7.jar\"/> <jar href=\"spring-core-3.0.5.RELEASE.jar\"/> <jar href=\"spring-web-3.0.5.RELEASE.jar\"/> <jar href=\"vamsas-client.jar\"/> <jar href=\"wsdl4j.jar\"/> <jar href=\"xercesImpl.jar\"/> <jar href=\"xml-apis.jar\"/> <property name=\"jalview.version\" value=\"Development Branch Build\"/> </resources>"+
-"<application-desc main-class=\"jalview.bin.Jalview\">"+
-"<argument>-open</argument>"+
-"<argument>file:///Users/tcnofoegbu/Documents/workspace/java/dev/jalview/examples/example_biojs.html</argument>"+
-"</application-desc>"+
-" <security>"+
-" <all-permissions/>"+
-" </security>"+
-"</jnlp>"
-
-var encodedUri = encodeURI(jnpl);
-window.open(encodedUri)
-//alert(jnpl)
-}
+
function openJalviewUsingCurrentUrl(){
- var url = "http://webservices.compbio.dundee.ac.uk:38080/jalviewServlet/services/launchAppDev";
+ var jalviewData = JSON.parse(document.getElementById("seqData").value)
+ var jalviewVersion = jalviewData['jalviewVersion'];
+ var url = jalviewData['webStartUrl'];
var myForm = document.createElement("form");
myForm.action = url;
- var myInput = document.createElement("input") ;
- myInput.setAttribute("name", "jvm-max-heap") ;
- myInput.setAttribute("value", "2G");
- myForm.appendChild(myInput) ;
+ var heap = document.createElement("input") ;
+ heap.setAttribute("name", "jvm-max-heap") ;
+ heap.setAttribute("value", "2G");
+ myForm.appendChild(heap) ;
- var myInput1 = document.createElement("input") ;
- myInput1.setAttribute("name", "open") ;
- myInput1.setAttribute("value", document.URL);
- myForm.appendChild(myInput1) ;
+ var target = document.createElement("input") ;
+ target.setAttribute("name", "open") ;
+ target.setAttribute("value", document.URL);
+ myForm.appendChild(target) ;
+
+ var jvVersion = document.createElement("input") ;
+ jvVersion.setAttribute("name", "version") ;
+ jvVersion.setAttribute("value", jalviewVersion);
+ myForm.appendChild(jvVersion) ;
-
document.body.appendChild(myForm) ;
myForm.submit() ;
document.body.removeChild(myForm) ;
// call render at the end to display the whole MSA
m.render();
-
toggleMenuVisibility();
toggleMenuVisibility();
});
--- /dev/null
+T-COFFEE, Version_8.99(Fri Feb 18 08:27:45 CET 2011 - Revision 596)
+Cedric Notredame
+CPU TIME:0 sec.
+SCORE=94
+*
+ BAD AVG GOOD
+*
+FER_CAPAA : 99
+FER_CAPAN : 94
+FER1_SOLLC : 94
+Q93XJ9_SOLTU : 93
+FER1_PEA : 93
+Q7XA98_TRIPR : 92
+FER1_MESCR : 92
+FER1_SPIOL : 92
+FER3_RAPSA : 99
+FER1_ARATH : 93
+FER_BRANA : 99
+FER2_ARATH : 93
+Q93Z60_ARATH : 92
+FER1_MAIZE : 91
+O80429_MAIZE : 91
+cons : 94
+
+FER_CAPAA ------------------------------------------------
+FER_CAPAN 99------333445778888876665554-23333345--6778765-
+FER1_SOLLC 98------344556788888876665544-23333344--5677765-
+Q93XJ9_SOLTU 98------344556788888876555554-23333344--5677765-
+FER1_PEA 9964---1344556788888876655544-23333344--6778876-
+Q7XA98_TRIPR 9964---1344566788888876665554-222222210056777650
+FER1_MESCR 9954--1124455677878765--22222122233345--5677776-
+FER1_SPIOL 9965--111111--677777765444444233334445--6789876-
+FER3_RAPSA ------------------------------------------------
+FER1_ARATH 9965----344556888888876665554233333344--6788776-
+FER_BRANA ------------------------------------------------
+FER2_ARATH 9965----344556888888876665555233333345--6778876-
+Q93Z60_ARATH 9965----344556888888876665555233333345--6778876-
+FER1_MAIZE 99540001222334677777765555443--2222233--4567554-
+O80429_MAIZE 9854---------23445555---11111111111111--1212222-
+cons 996400012344557778887766544441222233340056777650
+
+
+FER_CAPAA -----------9999999999999999999999999999999999999
+FER_CAPAN 4--445678999999999999999999999999999999999999999
+FER1_SOLLC 4--445678999999999999999999999999999999999999999
+Q93XJ9_SOLTU 4--445678999999999999999999999999999999999999999
+FER1_PEA 533444568999999999999999999999999999999999999999
+Q7XA98_TRIPR 333434568999999999999999999999999999999999999999
+FER1_MESCR 4333-5678999999999999999999999999999999999999999
+FER1_SPIOL 422--2334599999999999999999999999999999999999999
+FER3_RAPSA -----------9999999999999999999999999999999999999
+FER1_ARATH 533446788999999999999999999999999999999999999999
+FER_BRANA -----------9999999999999999999999999999999999999
+FER2_ARATH 533546788999999999999999999999999999999999999999
+Q93Z60_ARATH 533546788999999999999999999999999999999999999999
+FER1_MAIZE 4222--567899999999999999999999999999999999999999
+O80429_MAIZE 222435678999999999999999999999999999999999999999
+cons 422445677899999999999999999999999999999999999999
+
+
+FER_CAPAA 999999999999999999999999999999999999999999999999
+FER_CAPAN 999999999999999999999999999999999999999999999999
+FER1_SOLLC 999999999999999999999999999999999999999999999999
+Q93XJ9_SOLTU 999999999999999999999999999999999999999999999999
+FER1_PEA 999999999999999999999999999999999999999999999999
+Q7XA98_TRIPR 999999999999999999999999999999999999999999999999
+FER1_MESCR 999999999999999999999999999999999999999999999999
+FER1_SPIOL 999999999999999999999999999999999999999999999999
+FER3_RAPSA 999999999999999999999999999999999999999999999999
+FER1_ARATH 999999999999999999999999999999999999999999999999
+FER_BRANA 999999999999999999999999999999999999999999999999
+FER2_ARATH 999999999999999999999999999999999999999999999999
+Q93Z60_ARATH 99999999999999999999999999999-------------------
+FER1_MAIZE 999999999999999999999999999999999999999999999999
+O80429_MAIZE 999999999999999999999999999999999999999999999999
+cons 999999999999999999999999999999999999999999999999
+
+
+FER_CAPAA 999999998865-
+FER_CAPAN 999999998865-
+FER1_SOLLC 999999998865-
+Q93XJ9_SOLTU 999999998865-
+FER1_PEA 999999999865-
+Q7XA98_TRIPR 999999998865-
+FER1_MESCR 999999998865-
+FER1_SPIOL 999999998865-
+FER3_RAPSA 99999999874--
+FER1_ARATH 99999998874--
+FER_BRANA 99999999874--
+FER2_ARATH 99999998764--
+Q93Z60_ARATH -------------
+FER1_MAIZE 9999999998620
+O80429_MAIZE 99999999874--
+cons 9999999987550
+
+
+
+
+
<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="seqannots" url="html/features/annotation.html#seqannots"/>
<mapID target="seqfetch" url="html/features/seqfetch.html"/>
<mapID target="dbreffetcher" url="html/webServices/dbreffetcher.html"/>
<mapID target="seqmappings" url="html/features/seqmappings.html"/>
<mapID target="viewingpdbs.reps" url="html/features/viewingpdbs.html#viewreps"/>
<mapID target="pdbmcviewer" url="html/features/pdbviewer.html"/>
<mapID target="pdbjmol" url="html/features/jmol.html"/>
+ <mapID target="chimera" url="html/features/chimera.html"/>
<mapID target="varna" url="html/features/varna.html"/>
+ <mapID target="xsspannotation" url="html/features/xsspannotation.html"/>
<mapID target="preferences" url="html/features/preferences.html"/>
+ <mapID target="strucprefs" url="html/features/preferences.html#structure"/>
<mapID target="commandline" url="html/features/commandline.html"/>
<mapID target="clarguments" url="html/features/clarguments.html"/>
<mapID target="io" url="html/io/index.html"/>
<mapID target="wsMenu" url="html/menus/wsmenu.html"/>
<mapID target="popMenu" url="html/menus/popupMenu.html"/>
+ <mapID target="popMenuAddref" url="html/menus/popupMenu.html#addrefannot"/>
<mapID target="annotPanelMenu" url="html/menus/alwannotationpanel.html"/>
<mapID target="memory" url="html/memory.html" />
- <mapID target="jalviewjnlp" url="html/jalviewjnlp.html" />
<mapID target="groovy" url="html/features/groovy.html" />
<mapID target="privacy" url="html/privacy.html" />
<mapID target="vamsas" url="html/vamsas/index.html"/>
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
- * The Jalview Authors are detailed in the 'AUTHORS' file.
--->
+<!-- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) *
+ Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview.
+ * * Jalview is free software: you can redistribute it and/or * modify it
+ under the terms of the GNU General Public License * as published by the Free
+ Software Foundation, either version 3 * of the License, or (at your option)
+ any later version. * * Jalview is distributed in the hope that it will be
+ useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General
+ Public License for more details. * * You should have received a copy of the
+ GNU General Public License * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file. -->
<!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_1_0.dtd">
<toc version="1.0">
-<tocitem text="Jalview Documentation" target="home" expand="true" >
- <tocitem text="What's new" target="new" expand="true">
- <tocitem text="RNAalifold RNA Secondary Structure Prediction" target="rnaalifold"/>
- <tocitem text="Select columns containing sequence features" target="seqfeatures.settings.selcols"/>
- <tocitem text="View all representative PDB structures" target="viewingpdbs.reps"/>
- <tocitem text="Support for PAM250 for trees and PCA calculations" target="subtMatrices.pam250"/>
- </tocitem>
- <tocitem text="Editing Alignments" target ="edit"/>
- <tocitem text="Cursor Mode" target="cursor"/>
- <tocitem text="Key Strokes" target="keys"/>
- <tocitem text="Input / Output" target="io"/>
- <tocitem text="Making Figures" target="export"/>
- <tocitem text="Hidden Regions" target="hiddenRegions"/>
- <tocitem text="Multiple Views" target="multipleviews"/>
- <tocitem text="Viewing Trees" target="treeviewer" expand="false"/>
- <tocitem text="Fetching Sequences" target="seqfetch"/>
- <tocitem text="Nucleic Acid Support" target="nucleicAcids" expand="false">
- <tocitem text="Viewing RNA structure" target="varna" />
- <tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus"/>
- <tocitem text="RNA Helices coloring" target="colours.rnahelices"/>
- </tocitem>
- <tocitem text="Sequence Features" target="seqfeatures" expand="false">
- <tocitem text="Sequence Feature Settings" target="seqfeatures.settings"/>
- <tocitem text="Sequence Features File" target="features.fileformat"/>
- <tocitem text="Feature Colourschemes" target="features.featureschemes"/>
- <tocitem text="User Defined Sequence Features" target="seqfeatcreat"/>
- <tocitem text="Editing Sequence Features" target="seqfeatedit"/>
- <tocitem text="DAS Feature Retrieval" target="das.viewing"/>
- <tocitem text="DAS Feature Settings" target="das.settings"/>
- <tocitem text="HTML annotation report" target="io.seqreport"/>
- </tocitem>
- <tocitem text="Web Services" target="webservice" expand="false">
- <tocitem text="JABAWS" target="jabaws"/>
- <tocitem text="Web Service Preferences" target="wsprefs"/>
- <tocitem text="Web Service Parameters" target="wsparams"/>
- <tocitem text="Sequence Alignment" target="msaservice" expand="false">
- <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"/>
- <tocitem text="Sequence Retrieval" target="seqfetch"/>
- <tocitem text="Database Reference Retrieval" target="dbreffetcher"/>
- <tocitem text="DAS Feature Retrieval" target="das.viewing"/>
- </tocitem>
- <tocitem text="Colour Schemes" target="colours" expand="false">
- <tocitem text="Background Dependent Text Colour" target="backdeptextcol"/>
- <tocitem text="ClustalX" target="colours.clustal"/>
- <tocitem text="Zappo" target="colours.zappo"/>
- <tocitem text="Taylor" target="colours.taylor"/>
- <tocitem text="Hydrophobicity" target="colours.hydro"/>
- <tocitem text="Helix propensity" target="colours.helix"/>
- <tocitem text="Strand propensity" target="colours.strand"/>
- <tocitem text="Turn propensity" target="colours.turn"/>
- <tocitem text="Buried index" target="colours.buried"/>
- <tocitem text="Nucleotide colours" target="colours.nucleotide"/>
- <tocitem text="Purine/Pyrimidine colours" target="colours.purinepyrimidine"/>
- <tocitem text="Blosum62" target="colours.blosum"/>
- <tocitem text="by Percentage Identity" target="colours.pid"/>
- <tocitem text="User Defined" target="colours.user"/>
- <tocitem text="Above Percentage Identity" target="colours.abovepid"/>
- <tocitem text="By conservation" target="colours.conservation"/>
- <tocitem text="T-COFFEE Scores" target="io.tcoffeescores"/>
- <tocitem text="By Annotation" target="colours.annotation"/>
- <tocitem text="By RNA Helices" target="colours.rnahelices"/>
- </tocitem>
- <tocitem text="Calculations" target="calculations" expand="false">
- <tocitem text="Sorting alignments" target="sorting"/>
- <tocitem text="Calculating trees" target="trees"/>
- <tocitem text="Principal Component Analysis" target="pca"/>
- <tocitem text="Tree/PCA Input Data" target="recoverInputdata"/>
- <tocitem text="Pairwise Alignments" target="pairwise"/>
- <tocitem text="Remove Redundancy" target="redundancy"/>
- </tocitem>
- <tocitem text="Alignment Annotations" target ="alannotation" expand="false">
- <tocitem text="Conservation" target="calcs.alconserv"/>
- <tocitem text="Quality" target="calcs.alquality"/>
- <tocitem text="Consensus" target="calcs.consensus"/>
- <tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus"/>
- <tocitem text="Annotations File Format" target="annotations.fileformat"/>
- </tocitem>
- <tocitem text="Viewing PDB Files" target="viewingpdbs" expand="false">
- <tocitem text="Jmol Viewer" target="pdbjmol"/>
- <tocitem text="Simple PDB Viewer" target="pdbmcviewer"/>
- </tocitem>
- <tocitem text="Viewing RNA structures" target="varna" expand="false"> </tocitem>
- <tocitem text="VAMSAS Data Exchange" target="vamsas">
- <!-- what can Jalview share with other apps -->
- <!-- what other apps exist -->
+<!-- DO NOT WRAP THESE LINES - help2Website relies on each item being on one line! -->
+ <tocitem text="Jalview Documentation" target="home" expand="true">
+ <tocitem text="What's new" target="new" expand="true">
+ <tocitem text="Annotation from Structure" target="xsspannotation" expand="false" />
+ <tocitem text="Annotation Panel Menu" target="alwAnnotations" />
+ <tocitem text="Add reference annotation" target="popMenuAddref" />
+ <tocitem text="Colour By Annotation" target="colours.annotation" />
+ <tocitem text="Chimera Viewer" target="chimera" />
+ <tocitem text="Structure Preferences" target="strucprefs" />
+ </tocitem>
+ <tocitem text="Editing Alignments" target="edit" />
+ <tocitem text="Cursor Mode" target="cursor" />
+ <tocitem text="Key Strokes" target="keys" />
+ <tocitem text="Input / Output" target="io" />
+ <tocitem text="Making Figures" target="export" />
+ <tocitem text="Hidden Regions" target="hiddenRegions" />
+ <tocitem text="Multiple Views" target="multipleviews" />
+ <tocitem text="Viewing Trees" target="treeviewer" expand="false" />
+ <tocitem text="Fetching Sequences" target="seqfetch" />
+ <tocitem text="Nucleic Acid Support" target="nucleicAcids" expand="false">
+ <tocitem text="Viewing RNA structure" target="varna" />
+ <tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus" />
+ <tocitem text="RNA Helices coloring" target="colours.rnahelices" />
+ </tocitem>
+ <tocitem text="Sequence Features" target="seqfeatures" expand="false">
+ <tocitem text="Sequence Feature Settings" target="seqfeatures.settings" />
+ <tocitem text="Sequence Features File" target="features.fileformat" />
+ <tocitem text="Feature Colourschemes" target="features.featureschemes" />
+ <tocitem text="User Defined Sequence Features" target="seqfeatcreat" />
+ <tocitem text="Editing Sequence Features" target="seqfeatedit" />
+ <tocitem text="DAS Feature Retrieval" target="das.viewing" />
+ <tocitem text="DAS Feature Settings" target="das.settings" />
+ <tocitem text="HTML annotation report" target="io.seqreport" />
+ </tocitem>
+ <tocitem text="Web Services" target="webservice" expand="false">
+ <tocitem text="JABAWS" target="jabaws" />
+ <tocitem text="Web Service Preferences" target="wsprefs" />
+ <tocitem text="Web Service Parameters" target="wsparams" />
+ <tocitem text="Sequence Alignment" target="msaservice" expand="false">
+ <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" />
+ <tocitem text="Sequence Retrieval" target="seqfetch" />
+ <tocitem text="Database Reference Retrieval" target="dbreffetcher" />
+ <tocitem text="DAS Feature Retrieval" target="das.viewing" />
+ </tocitem>
+ <tocitem text="Colour Schemes" target="colours" expand="false">
+ <tocitem text="Background Dependent Text Colour" target="backdeptextcol" />
+ <tocitem text="ClustalX" target="colours.clustal" />
+ <tocitem text="Zappo" target="colours.zappo" />
+ <tocitem text="Taylor" target="colours.taylor" />
+ <tocitem text="Hydrophobicity" target="colours.hydro" />
+ <tocitem text="Helix propensity" target="colours.helix" />
+ <tocitem text="Strand propensity" target="colours.strand" />
+ <tocitem text="Turn propensity" target="colours.turn" />
+ <tocitem text="Buried index" target="colours.buried" />
+ <tocitem text="Nucleotide colours" target="colours.nucleotide" />
+ <tocitem text="Purine/Pyrimidine colours" target="colours.purinepyrimidine" />
+ <tocitem text="Blosum62" target="colours.blosum" />
+ <tocitem text="by Percentage Identity" target="colours.pid" />
+ <tocitem text="User Defined" target="colours.user" />
+ <tocitem text="Above Percentage Identity" target="colours.abovepid" />
+ <tocitem text="By conservation" target="colours.conservation" />
+ <tocitem text="T-COFFEE Scores" target="io.tcoffeescores" />
+ <tocitem text="By Annotation" target="colours.annotation" />
+ <tocitem text="By RNA Helices" target="colours.rnahelices" />
</tocitem>
- <tocitem text="Window Menus" target="menus" expand="false">
- <tocitem text="Desktop Window" target="desktopMenu"/>
- <tocitem text="Alignment Window" target="alMenu">
- <tocitem text="File Menu" target="alwFile"/>
- <tocitem text="Edit Menu" target="alwEdit"/>
- <tocitem text="Select Menu" target="alwSelect"/>
- <tocitem text="View Menu" target="alwView"/>
- <tocitem text="Annotations Menu" target="alwAnnotations"/>
- <tocitem text="Format Menu" target="alwFormat"/>
- <tocitem text="Colour Menu" target="alwColour"/>
- <tocitem text="Calculation Menu" target="alwCalc"/>
- <tocitem text="Web Service Menu" target="wsMenu"/>
- <tocitem text="Annotation Panel Menu" target="annotPanelMenu"/>
- <tocitem text="Popup Menu" target="popMenu"/>
- </tocitem>
+ <tocitem text="Calculations" target="calculations" expand="false">
+ <tocitem text="Sorting alignments" target="sorting" />
+ <tocitem text="Calculating trees" target="trees" />
+ <tocitem text="Principal Component Analysis" target="pca" />
+ <tocitem text="Tree/PCA Input Data" target="recoverInputdata" />
+ <tocitem text="Pairwise Alignments" target="pairwise" />
+ <tocitem text="Remove Redundancy" target="redundancy" />
+ </tocitem>
+ <tocitem text="Sequence Annotations" target="seqannots" expand="true">
+ <tocitem text="Annotation from Structure" target="xsspannotation" expand="false" />
+ </tocitem>
+ <tocitem text="Alignment Annotations" target="alannotation" expand="false">
+ <tocitem text="Conservation" target="calcs.alconserv" />
+ <tocitem text="Quality" target="calcs.alquality" />
+ <tocitem text="Consensus" target="calcs.consensus" />
+ <tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus" />
+ <tocitem text="Annotations File Format" target="annotations.fileformat" />
+ </tocitem>
+ <tocitem text="Viewing PDB Files" target="viewingpdbs" expand="false">
+ <tocitem text="Jmol Viewer" target="pdbjmol" />
+ <tocitem text="Chimera Viewer" target="chimera" />
+ <tocitem text="Simple PDB Viewer" target="pdbmcviewer" />
+ </tocitem>
+ <tocitem text="Viewing RNA structures" target="varna" expand="false"/>
+ <tocitem text="VAMSAS Data Exchange" target="vamsas">
+ <!-- what can Jalview share with other apps -->
+ <!-- what other apps exist -->
+ </tocitem>
+ <tocitem text="Window Menus" target="menus" expand="false">
+ <tocitem text="Desktop Window" target="desktopMenu" />
+ <tocitem text="Alignment Window" target="alMenu">
+ <tocitem text="File Menu" target="alwFile" />
+ <tocitem text="Edit Menu" target="alwEdit" />
+ <tocitem text="Select Menu" target="alwSelect" />
+ <tocitem text="View Menu" target="alwView" />
+ <tocitem text="Annotations Menu" target="alwAnnotations" />
+ <tocitem text="Format Menu" target="alwFormat" />
+ <tocitem text="Colour Menu" target="alwColour" />
+ <tocitem text="Calculation Menu" target="alwCalc" />
+ <tocitem text="Web Service Menu" target="wsMenu" />
+ <tocitem text="Annotation Panel Menu" target="annotPanelMenu" />
+ <tocitem text="Popup Menu" target="popMenu" />
+ </tocitem>
+ </tocitem>
+ <tocitem text="Preferences" target="preferences" />
+ <tocitem text="Memory Settings" target="memory" expand="false"/>
+ <tocitem text="Command Line" target="commandline" expand="false">
+ <tocitem text="Command Line Arguments" target="clarguments" />
+ <tocitem text="Groovy Shell" target="groovy" />
+ </tocitem>
+ <tocitem text="Privacy" target="privacy" />
+ </tocitem>
+ <tocitem text="Useful information" expand="true">
+ <tocitem text="Amino Acid Table" target="aminoAcids" />
+ <tocitem text="Amino Acid Properties" target="aaProperties" />
+ <tocitem text="The Genetic Code" target="geneticCode" />
+ <tocitem text="Sequence Substitution Matrices" target="subtMatrices" />
+
</tocitem>
- <tocitem text="Preferences" target="preferences"/>
- <tocitem text="Memory Settings" target="memory" expand="false">
- <tocitem text="JNLP with extra memory parameters" target="jalviewjnlp"/>
- </tocitem>
- <tocitem text="Command Line" target="commandline" expand="false">
- <tocitem text="Command Line Arguments" target="clarguments"/>
- <tocitem text="Groovy Shell" target="groovy"/>
- </tocitem>
- <tocitem text="Privacy" target="privacy"/>
-</tocitem>
-<tocitem text="Useful information" expand="true">
- <tocitem text="Amino Acid Table" target="aminoAcids"/>
- <tocitem text="Amino Acid Properties" target="aaProperties"/>
- <tocitem text="The Genetic Code" target="geneticCode"/>
- <tocitem text="Sequence Substitution Matrices" target="subtMatrices"/>
-
-</tocitem>
</toc>
<body>
<p><strong>Alignment Consensus Annotation</strong></p>
<p>The consensus displayed below the alignment is the percentage of the modal
- residue per column. By default this calculation takes includes gaps in column.
+ residue per column. By default this calculation includes gaps in columns.
You can choose to ignore gaps in the calculation by right clicking on the label
"Consensus" to the left of the consensus bar chart.
<p>If the modal value is shared by more than 1 residue, a "+" symbol
By clicking on the label you can also activate the sequence logo. It
indicates the relative amount of residues per column which can be
estimated by its size in the logo. The tooltip of a column gives the
- exact numbers for all occuring residues.
+ exact numbers for all occurring residues.
<br />If columns of the alignment are very diverse, then it can
sometimes be difficult to see the sequence logo - in this case, right
click on the annotation row label and select
<p><strong>About PCA</strong></p>
<p>Principal components analysis is a technique for examining the
structure of complex data sets. The components are a set of dimensions
-formed from the measured values in the data set, and the principle
+formed from the measured values in the data set, and the principal
component is the one with the greatest magnitude, or length. The sets of
measurements that differ the most should lie at either end of this
-principle axis, and the other axes correspond to less extreme patterns
+principal axis, and the other axes correspond to less extreme patterns
of variation in the data set.</p>
<p>
symbols and graphs, this may be black by default, so your alignment
will be coloured black.</em>
</li>
+ <li><em>Secondary structure annotation colouring</em><br />By
+ default, Jalview will employ the helix or sheet colours to shade
+ sequences and columns by available secondary structure annotation
+ tracks. In the case of RNA, each structure is processed to identify
+ distinct RNA helices and rendered in the same way as the <a
+ href="rnahelicesColouring.html">RNA Helices shading scheme</a>. <em>Structure based sequence shading was added in Jalview 2.8.2</em></li>
<li>The colour scheme can display a colour gradient from a colour
representing the minimum value in the selected annotation to a colour
representing the maximum value in the selected annotation. Use the
The PID option colours the residues (boxes and/or text) according to the percentage
of the residues in each column that agree with the consensus sequence. Only
the residues that agree with the consensus residue for each column are coloured.</p>
+<div align="center">
<table width="200" border="1">
<tr>
<td bgcolor="#6464FF">> 80 %</td>
<td>< 40%</td>
</tr>
</table>
+</div>
</body>
</html>
href="annotationsFormat.html">Annotations File</a> dragged into the
alignment window or loaded from the alignment's file menu.
</p>
+<p><a name="seqannots"/><strong>Sequence Reference Annotation</strong>
+</p>
+<p>
+ Sequence reference annotation is created from 3D structure
+ data, and from the results of sequence based prediction of
+ <a href="../webServices/jnet.html">secondary structure</a> and <a
+ href="../webServices/proteinDisorder.html">disordered region</a>
+ prediction methods.
+</p>
<p><strong>Interactive Alignment Annotation</strong></p>
<p>
Annotation rows are added using the <strong>Annotation Label</strong>
</p>
<p><em>Current Limitations</em></p>
<p>As of version 2.5, the Jalview user interface does not support the
-creation and editing quantitative annotation (histograms and line graphs), or
+creation and editing of quantitative annotation (histograms and line graphs), or
to create annotation associated with a specific sequence. It is also incapable of
annotation grouping or changing the style of existing annotation (to change between line or bar charts, or to make multiple line graphs). These annotation capabilities are only possible by the import of an
<a href="annotationsFormat.html">Annotation file</a>.<br>
--- /dev/null
+<html>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ -->
+<head>
+<title>The Chimera PDB Viewer</title>
+</head>
+<body>
+<p><strong>The Chimera Viewer</strong></p>
+<p>Since Jalview 2.8.2, <a href="http://www.cgl.ucsf.edu/chimera/">Chimera</a> (http://www.cgl.ucsf.edu/chimera/)
+has been integrated into Jalview for interactively viewing structures
+opened by entries in the <strong>"Structure"</strong> submenu in the <a href="../menus/popupMenu.html">sequence
+id pop-up menu</a> (if you can't see this, then you need to <a
+ href="viewingpdbs.html">associate a PDB structure</a> with the
+sequence). Chimera is available from the Jalview desktop, provided Chimera has been separately installed.</p>
+<p>You can set a default choice of Jmol or Chimera structure viewer in <a href="preferences.html#structure"> Preferences</a>.
+You can also optionally specify the path to the Chimera program here (if it differs from the standard paths searched by Jalview).
+<p>The following menu entries are provided for viewing structure data<br>
+ <ul>
+ <li>The <strong>"Structure→View
+ Structure→</strong> submenu allows a single PDB structure to be chosen
+ for display from the available structures for a sequence.
+ </li>
+ <li>The <strong>"Structure→View all <em>N</em>
+ structures
+ </strong> option will open a new window containing all structures associated
+ with the current selection.
+ </li>
+ <li>The <strong>"Structure→View all <em>N</em>
+ representative structures
+ </strong> option will open a new window containing exactly one structure per
+ currently selected sequence.<br /></li>
+ </ul>
+ <br>
+</p>
+<p><a name="align"><strong>Superposing structures based
+on their aligned sequences</strong></a><br>
+<p>If several structures are available on the alignment, you may add
+additional structures to an existing Chimera view by selecting their entry
+in the appropriate pop-up menu. Jalview will ask you if you wish to add
+the structure to the existing alignment, and if you do, it will import
+and superimpose the new PDB file using the corresponding positions from
+the alignment. If the alignment is subsequently edited, you can use the
+<a href="#sAlign"><em>Chimera→Align</em></a> menu option from the
+menu bar of the structure view window to superpose the structures using
+the updated alignment.<br>
+</p>
+<p><strong>Chimera Controls</strong><br>
+<p>The structure is by default rendered as a ribbon diagram. Moving the
+mouse over the structure brings up tooltips giving the residue name, PDB
+residue number and chain code
+([RES]Num:Chain). Moving the mouse over an
+associated residue in an alignment window highlights the associated
+atoms in the displayed structures. For comprehensive details of Chimera's commands, refer to the tool's Help menu.</p>
+<p>Basic screen operations (see <a href="http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/mouse.html">Chimera help</a>
+(http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/mouse.html) for full details).
+<table border="1">
+ <tr>
+ <td><strong>Action</strong></td>
+ <td><strong>Windows</strong></td>
+ <td><strong>Unix</strong></td>
+ <td><strong>Mac/OSX</strong></td>
+ </tr>
+ <tr>
+ <td>Rotate View</td>
+ <td>Left Click and Drag</td>
+ <td>Left Click and Drag</td>
+ <td>Left Click and Drag</td>
+ </tr>
+ <tr>
+ <td>Zoom</td><td>Right Click<br>
+ drag mouse up or down</td>
+ <td>Right Click<br>drag mouse up or down</td>
+ <td>cmd or Right + Click and drag mouse up or down, <br>or use mouse scroll button</td>
+ </tr>
+ <tr>
+ <td>Move Origin</td>
+ <td>Middle Button + Drag</td>
+ <td>Middle Button and drag</td>
+ <td>alt + Click<br>
+ and drag</td>
+ </tr>
+</table>
+</p>
+<p><strong>Jalview Controls</strong>
+<p>The Jalview Chimera View window has up to five menus:
+<ul>
+ <li><Strong>File<br>
+ </strong>
+ <ul>
+ <li><strong>View Mapping<br>
+ </strong><em> Opens a text window showing the alignment between the
+ residues corresponding to alpha-carbon atoms in the PDB structure and
+ the residues in the associated sequence.</em></li>
+ </ul>
+ </li>
+ <li><strong>View</strong>
+ <ul>
+ <li><strong>Show Chains<br>
+ </strong><em>Select which of the PDB file's chains (if more than one) are to be displayed.</em></li>
+ <li><strong>Colour by ..<br></strong><em>Submenu allowing specific alignment views to be selected for colouring associated chains in the structure display. This menu contains all the alignment views associated with the structure view, with those used to colour the view indicated by ticks. Addditionally, it contains the following menu entries:</em>
+ <ul><li><strong>Select many views<br></strong><em>When this option is enabled, selecting an alignment view adds it to the set used to colour the structures. Use this when colouring structures related to a number of alignments involving different domains or chains which are shown in the same structure view.</em>
+ </li>
+ <li><strong>Select all views<br></strong><em>This is only enabled when </em><strong>Select many views</strong><em> is also enabled, and will add all associated views to the set used to colour the structure display.</em>
+ </li>
+ <li><strong>Invert selection<br></strong><em>This is only enabled when </em><strong>Select many views</strong><em> is also enabled, and will replace the current set of views with any remaining views not currently used to colour the structure display.</em>
+ </li></ul></li></ul>
+ <li><strong>Colours<br>
+ </strong>
+ <ul>
+ <li><strong>By Sequence<br>
+ </strong><em> Colours each residue in the structure with the colour of its
+ corresponding residue in the associated sequence as rendered in the
+ associated alignment views, including any Uniprot sequence features or
+ region colourings.<br/>Pick which of the associated alignment views are used to colour the structures using the <strong>View→Colour by ..</strong> sub menu.</em><br>
+ Residues which only exist in the PDB structure are coloured white if
+ they are insertions (relative to the associated sequence in the
+ alignment) and grey if they are N or C terminal flanks outside the
+ region mapped to the alignment window's sequence.</em></li>
+ <li><strong>By Chain<br>
+ </strong><em>Uses the Chimera 'rainbow chain' command to apply a different colour to each chain.</em></li>
+ <li><strong>Charge & Cysteine<br>
+ </strong><em> Highlights cysteines in yellow, anionic (Aspartic Acid or
+ Glutamic Acid) residues in red, and cationic (Lysine or Arginine)
+ residues in blue.</em></li>
+ <li><strong>Colour with Chimera<br></strong><em>Defers any colouring operations to Chimera. Select this if you want to use the
+ Chimera scripting interface or menu to modify the view directly.</em></li>
+ <li><strong>Standard and User Defined Jalview
+ colourschemes.<br>
+ </strong><em>The remaining entries apply the colourschemes available from
+ the standard and user defined <a href="../colourSchemes/index.html">amino
+ acid colours</a>.</em></li>
+ </ul>
+ </li>
+ <li><strong>Chimera<br>
+ </strong><em>This pulldown menu is only displayed if there are multiple
+ structures shown in the Chimera window, and Jalview can also locate at
+ least two of the structures in the currently associated alignment view.</em>
+ <ul>
+ <li><strong><a name="sAlign">Align</a> <br>
+ </strong><em> When selected, the associated alignment will be used to
+ superimpose all the structures in the view onto the first structure in
+ the alignment. The regions used to calculate the superposition will be
+ highlighted using the 'Cartoon' rendering style, and the remaining
+ data shown as a chain trace.<br></em></li>
+ </ul>
+ </li>
+ <li><strong>Help<br>
+ </strong>
+ <ul>
+ <li><strong>Chimera Help<br>
+ </strong><em>Access the Chimera Help documentation in a new browser window.</em></li>
+ </ul>
+ </li>
+</ul>
+</p>
+</body>
+</html>
</td>
<td>Set the colourscheme for the alignment. This can be any of
the built-in colourschemes, a name of a predefined colourscheme
- (defined in the jalview properties file), or an 'inline' colourscheme
+ (defined in the Jalview properties file), or an 'inline' colourscheme
(see the applet's colour parameter for more information).</td>
</tr>
<tr>
arguments have been processed</div>
</td>
</tr>
+ <tr>
+ <td>
+ <div align="center">-jabaws URL</div>
+ <td>
+ <div align="left">Specify the URL of the preferred JABAWS server</div>
+ </td>
+ </tr>
<tr>
<td>
<div align="center">-vdoc VAMSAS DOCUMENT FILE/URL</div>
<td><div align="center">-eps FILE</div></td>
<td><div align="left">Create EPS file FILE from alignment.</div></td>
</tr>
+ <tr>
+ <td><div align="center">-svg FILE</div></td>
+ <td><div align="left">Create Scalable Vector Graphics file FILE from alignment.</div></td>
+ </tr>
</table>
</body>
</html>
<p>When the DAS Settings panel is first opened, and when the <strong>'Refresh
source'</strong> buton is pressed, a list of DAS sources is retrieved from the
DAS registry URL (set by default to the DAS registration server at
-http://das.sanger.ac.uk/registry/das1/sources/).</p>
+http://www.dasregistry.org/das/).</p>
<p><strong>Adding your own DAS Sources</strong></p>
<p>You can add your own DAS source to the list by clicking the
"Add Local Source" button. Enter the URL and nickname of your
<strong>0</strong> in order to attach it to the whole sequence.
Non-positional features are shown in a tooltip when the mouse
hovers over the sequence ID panel, and any embedded links can be
-accessed from the popup menu. <em>Scores</em><br>
+accessed from the popup menu.<br/> <em>Scores</em><br>
Scores can be associated with sequence features, and used to sort
sequences or shade the alignment (this was added in jalview 2.5).
The score field is optional, and malformed scores will be
features and groups on each sequence. To order the alignment using a
specific feature type, use the <em>sort by ..</em> entries in the pop-up
menu for that type.<br>
-<em>Feature sorting and graduated feature colouring was introduced
-in jalview 2.5</em></p>
+<em>Feature sorting and graduated feature colouring were introduced
+in Jalview 2.5</em></p>
<p><strong>Transparency and Feature Ordering</strong></p>
<p>It is important to realise that sequence features are often not
may be attached to one position along a stretch of sequence marked with
a secondary structure feature).</p>
<p>The ordering of the sequence features in the dialog box list is
-the order used by jalview for rendering sequence features. A feature at
+the order used by Jalview for rendering sequence features. A feature at
the bottom of the list is rendered <em>below</em> a feature higher up in
the list.<br>
<em><strong>You can change the order of a feature by
A more advanced hide involves a right-mouse click on a sequence, then
selecting <strong>"SequenceID -> Represent Group with
SequenceId"</strong>. Using this method of hiding sequences, any edits
-performed on the visible group representative will be propogated to all
+performed on the visible group representative will be propagated to all
the sequences in that group. <br>
The hidden representative sequences will not be used in any calculations
or web service alignments (<em>nb. this may change in the future</em>).
and alpha carbon location. Double clicking an atom allows distances to
be measured from it to any other atom in the structure.</p>
<p>
-<table>
+<table border="1">
<tr>
<td><strong>Action</strong></td>
<td><strong>Windows</strong></td>
<li><strong>Select all views<br></strong><em>This is only enabled when </em><strong>Select many views</strong><em> is also enabled, and will add all associated views to the set used to colour the structure display.</em>
</li>
<li><strong>Invert selection<br></strong><em>This is only enabled when </em><strong>Select many views</strong><em> is also enabled, and will replace the current set of views with any remaining views not currently used to colour the structure display.</em>
- </li></ul></li>
+ </li></ul></li></ul>
<li><strong>Colours<br>
</strong>
<ul>
</head>
<body>
<p><strong>Multiple Alignment Views</strong></p>
-<p>Multiple alignment views allows the same alignment to be viewed
+<p>Multiple alignment views allow the same alignment to be viewed
independently in many different ways simultaneously. Each view is an
independent visualization of the same alignment, so each may have a
-different ordering, colouring, row and column hiding and seuqence
+different ordering, colouring, row and column hiding and sequence
feature and annotation display setting, but alignment, feature and
annotation edits are common to all, since this affects the underlying
data.</p>
<p><a name="structure"><strong>"Structure"
Preferences tab</strong></a><em> added in Jalview 2.8.2</em></p>
<p><em>Process secondary structure from PDB</em> - if selected, then structure information
-read from PDB will be processed to derive secondary structure annotation.
-<p><em>Use RNAView for secondary structure</em> - if selected, the RNAView service will be
-automatically called to derive secondary structure information.
-<p><em>Add secondary structure annotation to alignment</em> - if selected, PDB secondary structure
-annotation will be shown on the alignment when available.
-<p><em>Add Temperature Factor annotation to alignment</em> - if selected, PDB Temperature Factor
-annotation will be shown on the alignment when available.
+read from PDB will be processed and annotation added to associated sequences.
+<p><em>Use RNAView for secondary structure</em> - if selected, the pyRNA RNAView service (<a href="https://github.com/fjossinet/PyRNA">https://github.com/fjossinet/PyRNA</a>) will be
+called to derive secondary structure information for RNA chains.
+<p><em>Add secondary structure annotation to alignment</em> - if selected, <a href="http://swift.cmbi.ru.nl/gv/dssp/">Jmol's implementation DSSP</a> will be used to add annotation to polypeptide chains in the structure.
+<p><em>Add Temperature Factor annotation to alignment</em> - if selected, values extracted from the Temperature Factor
+column for the backbone atoms in the PDB file will be extracted as annotation lines shown on the alignment.
<p><em>Default structure viewer</em> - choose JMOL or CHIMERA for viewing 3D structures.
+<p><em>Path to Chimera program</em> - Optional, as Jalview will search standard installation paths for Windows, Linux or MacOS.
+If you have installed Chimera in a non-standard location, you can specify it here, by entering the full path to the Chimera executable program.
+Double-click this field to open a file chooser dialog.
<p><a name="connections"><strong>"Connections"
Preferences tab</strong></a></p>
<body>
<p><strong>Sequence Fetcher</strong></p>
<p>Jalview can retrieve sequences from certain databases using either the
-WSDBFetch service provided by the European Bioinformatics Institute, and, since Jalview 2.4, DAS servers capable of the <em>sequence</em> command (configured in <a href="dassettings.html">DAS settings</a>).</p>
+WSDBFetch service provided by the European Bioinformatics Institute, or, since Jalview 2.4, DAS servers capable of the <em>sequence</em> command (configured in <a href="dassettings.html">DAS settings</a>).</p>
<img src="seqfetcher.gif" align="center"
alt="The Jalview Sequence Fetcher Dialog Box">
<p>The Sequence Fetcher dialog box can be opened via the "File"
Structure:"</strong> option in
the <a href="../menus/popupMenu.html">sequence id pop-up menu</a> (if
you can't see this, then no RNA structure is associated with your
-sequence or alignment. In the pop-up menu all structures that
+sequence or alignment). In the pop-up menu all structures that
are associated with this sequence and all sequences that are
associated with the alignment are available.
<b>Individual structures</b>:
this is a structure associated with the individual sequence and therefore not related to the alignment
</li>
-
+</ul>
<p><strong>Controls</strong><br>
<ul>
<li>Rotate view - Left Click and drag</li>
</head>
<body>
<p><strong>Viewing PDB Structures</strong></p>
-
-<p>Jalview can view protein structures associated with a sequence
-via the <strong>"Structure→"</strong> submenu from a
-sequence's <a href="../menus/popupMenu.html">pop-up menu</a>.</p>
-<p>The following menu entries are provided for viewing structure data<br>
+ <p>
+ Jalview can view protein structures associated with a sequence via the
+ <strong>"Structure→"</strong> submenu from a sequence's <a
+ href="../menus/popupMenu.html">pop-up menu</a>.
+ </p>
+ The
+ <a href="jmol.html">Jmol viewer</a> has been included since Jalview
+ 2.3. Jalview 2.8.2 included support for <a href="chimera.html">Chimera</a>, provided it is
+ installed and can be launched by Jalview. The default viewer can be
+ configured in the
+ <a href="preferences.html#structure">Structure tab</a> in the
+ <strong>Tools→Preferences</strong> dialog box.
+ <p>
+ Structure data imported into Jalview can also be processed to display
+ secondary structure and temperature factor annotation. See the <a
+ href="xsspannotation.html">Annotation from Structure</a> page for
+ more information.
+ </p>
+ <p>The following menu entries are provided for viewing structure data<br>
<ul>
<li>The <strong>"Structure→View
Structure→</strong> submenu allows a single PDB structure to be chosen
with the current selection, superposed according to the currently selected region of the alignment.<br/><em>This
capability was added in Jalview 2.7</em>
</li>
- <li><a name="viewreps"/>The <strong>"Structure→View all <em>N</em>
+ <li>The <strong>"Structure→View all <em>N</em>
representative structures
</strong> option will open a new window containing exactly one structure per
currently selected sequence.<br />
<em>The View representative structures option was introduced in
Jalview 2.8.1</em></li>
</ul>
- <br>
</p>
<p>If a single pdb
<ul>
<li>If no structures are open, then an interactive display of the
- structure will be opened in a new window</li>
+ structure will be opened in a new window.</li>
<li>If another structure is already shown for the current
alignment, then you will be asked if you want to add and <a
href="jmol.html#align">align this structure</a> to the structure in
- the existing view. (<em>new feature in Jalview 2.6</em>)</li>
+ the existing view. (<em>new feature in Jalview 2.6</em>).</li>
<li>If the structure is already shown, then you will be prompted
to associate the sequence with an existing view of the selected
structure. This is useful when working with multi-domain or multi-chain PDB files.</li>
<li style="list-style: none">See the <a href="jmol.html">Jmol
- PDB viewer</a> help page for more information about the display.</li>
+ </a> and <a href="chimera.html">Chimera</a> PDB viewer help pages for more information about the display.</li>
</ul>
<p><strong>Associating PDB files with Sequences</strong></p>
<p>To associate PDB files with a sequence, right click on a sequence
--- /dev/null
+<html>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ -->
+<head>
+<title>Annotation from 3D structure data</title>
+</head>
+<body>
+ <p>
+ <strong>Working with annotation from 3D structure data</strong>
+ </p>
+ <p>
+ Jalview can process PDB data associated with sequences to display
+ values extracted from the <em>Temperature Factor</em> column for
+ corresponding sites, and secondary structure from DSSP or RNAView (as
+ appropriate).
+ </p>
+ <p>
+ <strong>Extracting data from PDB files<br /></strong>Annotation is
+ created for structure files retrieved directly from the PDB loaded
+ from the file system (via the <strong>Structure→Associate
+ Structure...→From file</strong> option, or when displayed via the View
+ Structures Menu.<br /> Structure annotation is not automatically
+ added to an alignment, but any available structure annotation rows for
+ the current selection or a particular sequence can be added via the <strong>Add
+ Reference Annotation</strong> in the <strong>Selection</strong> and <strong>Sequence
+ ID</strong> sub-menus of the Sequence ID Panel's popup menu.<br/> <em>Please
+ note:</em>Protein structures are analysed
+ <em>in situ</em>, but Jalview employs a web service to process RNA
+ structures which can cause long delays if your internet connection is
+ slow.
+ </p>
+ <p>
+ The <a href="../menus/alwannotation.html"><em>Annotations</em>
+ alignment menu</a> provides settings useful for controlling the display
+ of secondary structure annotation.
+ </p>
+ <p>
+ <strong>Shading sequences by associated structure annotation<br /></strong>The
+ annotation colouring dialog (opened by the <strong>Colour→By
+ Annotation</strong> option) allows sequences with associated secondary
+ structure data to be shaded according to secondary structure type.
+ Once the dialog is opened, select the <em>Per Sequence</em> option and
+ then choose <em>Secondary structure</em> from the dropdown menu.<br />When
+ colouring alignments by secondary structure, two modes can be
+ employed. The default is to shade sequences with the same colour as
+ the secondary structure glyph. If, however, <em>original colours</em>
+ is selected and another colourscheme has already been applied, then
+ only portions of the sequence with defined secondary structure will be
+ shaded with the previously applied scheme.<br />
+ </p>
+ <p>
+ <strong>Configuration options for processing PDB files<br /></strong>
+ Occasionally, you may wish to disable secondary structure processing.
+ Configuration options in the <strong>Structure</strong> tab in the <strong>Tools→Preferences</strong>
+ dialog allow the processing of structure data to be disabled, or
+ selectively enabled. For more information, take a look at the <a href="preferences.html#structure">documentation for the structure panel</a>.
+ </p>
+ <p>
+ <em>The display of secondary structure data was introduced in
+ Jalview 2.8.2, and is made possible by Jalview's use of <a
+ href="jmol.html">Jmol's DSSP implementation</a>, based on the
+ original <a href="http://www.ncbi.nlm.nih.gov/pubmed/6667333">Kabsch
+ and Sander algorithm</a> ported by <a
+ href="http://swift.cmbi.ru.nl/gv/dssp/">Robbie P. Joosten and
+ colleagues</a>, and a client for <a
+ href="https://github.com/fjossinet/PyRNA">Fabrice Jossinet's
+ pyRNA services</a> that was developed by Anne Menard, Jim Procter and
+ Yann Ponty as part of the Jalview Summer of Code 2012.
+ </em>
+ </p>
+</body>
+</html>
<p>Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M., Barton, G.J (2009), <br>
"Jalview version 2: A Multiple Sequence Alignment and Analysis Workbench,"<br>
<em>Bioinformatics</em> <strong>25</strong> (9) 1189-1191 doi: 10.1093/bioinformatics/btp033</p>
+ <p><strong>The Jalview Authors</strong><br/>
+ The following people have contributed to Jalview's development:
+ <ul>
+ <li>Jalview 1
+ <ul><li>Michele Clamp</li>
+ <li>James Cuff</li>
+ <li>Steve Searle</li>
+ <li>David Martin</li>
+ <li>Geoff Barton</li>
+ </ul>
+ </li><li>Jalview 2<ul>
+ <li>Jim Procter</li>
+ <li>Andrew Waterhouse</li>
+ <li>Mungo Carstairs</li>
+ <li>Tochukwu 'Charles' Ofoegbu</li>
+ <li>Jan Engelhardt</li>
+ <li>Lauren Lui</li>
+ <li>Anne Menard</li>
+ <li>Natasha Sherstnev</li>
+ <li>Daniel Barton</li>
+ <li>David Roldan-Martinez</li>
+ <li>David Martin</li>
+ <li>Geoff Barton</li>
+ </ul>
+ </li>
+ </ul>
+ </p>
</body>
</html>
</li>
<li>EPS - an Encapsulated Postscript Document<br><em>For high quality
diagrams and publications.</em>
+<li>SVG - a Scalable Vector Graphics document<br><em>For high quality
+diagrams in publications and on the web.</em>
</li></ul>
<p><em>Tips for working with EPS Files</em></p>
want an exact image of the alignment as displayed in Jalview. This is useful
if a 3rd Party EPS viewer does not have the same Font which the EPS file was
created with.</li>
-<li>When importing an EPS into to a Microsoft office document, a snapshot image of the
+<li>When importing an EPS file into a Microsoft office document, a snapshot image of the
file will be displayed which often looks blurred. Right-click the
image and choose "Edit image." to convert it to word
drawing objects which give a truer WYSIWIG representation.
</head>
<body>
-<p><strong>Alignment Fileformats</strong>
+<p><strong>Alignment File Formats</strong>
<p>Jalview understands a wide range of sequence alignment formats. In
order to determine which format has been used for an alignment,
jalview tries to detect some text or formatting unique to one of the formats:
<td width="60%"># STOCKHOLM VersionNumber<br>
<em>...</em><br>//</td>
<td width="23%">.stk, .sto</td>
+</tr><tr>
+<td width="17%">Phylip</td>
+<td width="60%">Line starts with two numbers separated by white space<br>
+<em>...</em><br>//</td>
+<td width="23%">.phy</td>
</tr>
</table>
<p>The file extensions are used to associate jalview alignment icons
+++ /dev/null
-<html>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
- *
- * This file is part of Jalview.
- *
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
- * The Jalview Authors are detailed in the 'AUTHORS' file.
- -->
-<head>
-<title>Jalview local Jnlp File</title>
-</head>
-<body>
-<h1>Jalview local Jnlp File</h1>
-<pre>
-<jnlp spec="1.0+" codebase="http://www.jalview.org/webstart/">
- <information>
- <title>Jalview</title>
- <vendor>The Barton Group</vendor>
- <homepage href="http://www.jalview.org"/>
- <description>Jalview Multiple Alignment Editor</description>
- <description kind="short">Jalview</description>
- <icon href="http://www.jalview.org/webstart/logo_big.gif" kind="default"/>
- <association extensions="fa" mime-type="application-x/ext-file"/>
- <association extensions="fasta" mime-type="application-x/ext-file"/>
- <association extensions="fastq" mime-type="application-x/ext-file"/>
- <association extensions="blc" mime-type="application-x/ext-file"/>
- <association extensions="msf" mime-type="application-x/ext-file"/>
- <association extensions="pfam" mime-type="application-x/ext-file"/>
- <association extensions="aln" mime-type="application-x/ext-file"/>
- <association extensions="pir" mime-type="application-x/ext-file"/>
- <association extensions="stk" mime-type="application-x/ext-file"/>
- <offline-allowed/>
- </information>
- <security>
- <all-permissions/>
- </security>
- <resources>
- <!-- <em>the additional memory parameters are here</em> -->
- <j2se version="1.5+" initial-heap-size="500M" max-heap-size="1000M"/>
- <jar href="jalview.jar"/>
- <jar href="JGoogleAnalytics-0.2.1-SNAPSHOT.jar"/>
- <jar href="Jmol-12.1.13.jar"/>
- <jar href="activation.jar"/>
- <jar href="axis.jar"/>
- <jar href="castor-1.1-cycle-xml.jar"/>
- <jar href="commons-discovery.jar"/>
- <jar href="commons-logging.jar"/>
- <jar href="jaxrpc.jar"/>
- <jar href="jhall.jar"/>
- <jar href="log4j-1.2.8.jar"/>
- <jar href="mail.jar"/>
- <jar href="min-jaba-client.jar"/>
- <jar href="regex.jar"/>
- <jar href="saaj.jar"/>
- <jar href="vamsas-client.jar"/>
- <jar href="wsdl4j.jar"/>
- <jar href="xercesImpl.jar"/>
- <jar href="xml-apis.jar"/>
- <property name="jalview.version" value="2.6.1"/>
- </resources>
- <application-desc main-class="jalview.bin.Jalview"/>
-</jnlp>
-</pre>
-<address><a
- href="http://www.jalview.org/mailman/listinfo/jalview-discuss">If
-you have problems, send an email to jalview-discuss</a></address>
-</body>
-</html>
The way you increase the memory settings for the JVM depends on which installation
of Jalview you use:</p>
<ul>
- <li><em><font size="3">Web Start Version</font></em>
- <p>JavaWS sets the JVM parameters through special tags in the JNLP file. You'll
- need to <a href="jalviewjnlp.html">make your own jnlp file</a> and add the following parameter into the
- <resources> element.
- <pre>
-<j2se version="1.5+" initial-heap-size="500M" max-heap-size="1000M"/>
-</pre>
- Save the jnlp file somewhere and then - if you start Jalview through your
- web browser, point your browser at the file's url, othewise simply run javaws
- with the file location as its argument. The file's url is something like :<br>
- <pre>
+ <li><em><font size="3">Web Start Version</font></em>
+ <p>
+ JavaWS sets the JVM parameters through special tags in the JNLP
+ file. You can obtain a JNLP file with modified memory settings from
+ our service with the following link (replace 2G with desired memory
+ in G or M):<br /> <a
+ href="http://www.jalview.org/services/launchApp?jvm-max-heap=2G">http://www.jalview.org/services/launchApp?jvm-max-heap=2G</a>
+ </p>
+ <p>
+ Alternatively, if you want to create your own JNLP file then please
+ download the latest JNLP file from <a
+ href="http://www.jalview.org/webstart/jalview.jnlp">http://www.jalview.org/webstart/jalview.jnlp</a>
+ and modify the max-heap-size parameter for the j2se tag in the
+ <resources> element. e.g.
+ <pre>
+<j2se version="1.7+" initial-heap-size="500M" max-heap-size="1000M"/>
+</pre> In both cases, you should save your new jnlp file somewhere and
+ then either point your web browser at the file's url, launch it from
+ your file browser, or from a terminal window run javaws (located in
+ your Java installation's bin directory) with the file location as its
+ argument. The file's url is something like :<br> <pre>
file://<full path to file>
-</pre>
- If jalview doesn't start up, see <a href="#memsetting">below</a>. You'll have
- to edit the above settings in the JNLP file using a text editor, save it,
- and try starting Jalview with it once more.
- <p></li>
- <li><em><font size="3">Install Anywhere version</font></em>
+</pre> If jalview doesn't start up, see <a href="#memsetting">below</a>.
+ You'll have to edit the above settings in the JNLP file using a text
+ editor, save it, and try starting Jalview with it once more.
+ </p></li>
+ <li><em><font size="3">Install Anywhere version</font></em>
<p> You need to change the InstallAnywhere configuration settings for the
application. These are found in different places depending upon which operating
system you have :
Select the format of the text by selecting one of the following
menu items.</em>
<ul>
- <li><strong>FASTA</strong> <em></em>
- </li>
- <li><strong>MSF</strong>
- </li>
- <li><strong>CLUSTAL</strong>
- </li>
- <li><strong>BLC</strong>
- </li>
- <li><strong>PIR</strong>
- </li>
- <li><strong>PFAM</strong>
- </li>
+ <li><strong>FASTA</strong> </li>
+ <li><strong>MSF</strong></li>
+ <li><strong>CLUSTAL</strong></li>
+ <li><strong>BLC</strong></li>
+ <li><strong>PIR</strong></li>
+ <li><strong>PFAM</strong></li>
+ <li><strong>PileUp</strong></li>
+ <li><strong>AMSA</strong></li>
+ <li><strong>STH</strong></li>
+ <li><strong>Phylip</strong></li>
</ul></li>
<li><strong>Print (Control P)<br> </strong><em>Jalview
will print the alignment using the current fonts and colours of
the last redundancy deletion.</em>
</li>
<li><strong>Pad Gaps<br> </strong><em>When selected,
- the alignment will be kept at minimal width (so there no empty
+ the alignment will be kept at minimal width (so there are no empty
columns before or after the first or last aligned residue) and all
- sequences will be padded with gap characters to the before and
+ sequences will be padded with gap characters before and
after their terminating residues.<br> This switch is useful
when making a tree using unaligned sequences and when working with
alignment analysis programs which require 'properly aligned
undo the last redundancy deletion.</em></li>
<li><strong>Pad Gaps<br>
</strong><em>When selected, the alignment will be kept at minimal width (so
- there no empty columns before or after the first or last aligned
- residue) and all sequences will be padded with gap characters to the
+ there are no empty columns before or after the first or last aligned
+ residue) and all sequences will be padded with gap characters
before and after their terminating residues.<br>
This switch is useful when making a tree using unaligned sequences and
when working with alignment analysis programs which require 'properly
<li><strong>BLC</strong></li>
<li><strong>PIR</strong></li>
<li><strong>PFAM</strong></li>
+ <li><strong>PileUp</strong></li>
+ <li><strong>AMSA</strong></li>
+ <li><strong>STH</strong></li>
+ <li><strong>Phylip</strong></li>
</ul>
</li>
<li><strong>Page Setup ...</strong><br>
<li><strong>PNG<br>
</strong><em>Create a <a href="../io/export.html">Portable Network
Graphics</a> file from your alignment.</em></li>
+ <li><strong>SVG<br>
+ </strong><em>Create a <a href="../io/export.html">Scalable Vector Graphics</a> file from your alignment for embedding in web pages.</em></li>
</ul>
</li>
<li><strong>Export Features</strong><em><br>
<li><strong>Hide Annotations...<br>
</strong><em>Choose to hide either All or
a selected type of annotation for the selected sequences. (Since Jalview 2.8.2)</em></li>
- <li><strong>Add Reference Annotations...<br>
+ <li><a name="addrefannot"><strong>Add Reference Annotations<br>
</strong><em>Add to the alignment window any annotations on the selected sequences
which have been read from reference sources or calculated (for example,
secondary structure derived from 3D structure). (Since Jalview 2.8.2)</em></li>
window will be displayed asking for a new sequence name and sequence description
to be entered. Press OK to accept your edit. To save sequence descriptions,
you must save in Fasta, PIR or Jalview File format.</em></li>
- <li><em> </em></li>
+ <li><a href="sqaddrefannot"><strong>Add Reference Annotations<br></strong><em>When enabled, copies any available alignment annotation for this sequence to the current view.</em></li>
<li><strong>Represent Group With (Sequence Id)</strong><br>
<em>All sequences in the current selection group will be hidden, apart
from (Sequence Id). Any edits performed on the visible representative
as <a href="http://rna.informatik.uni-freiburg.de:8080/LocARNA.jsp">LocaRNA</a>
output consensus RNA secondary structure lines in the line normally
reserved for the Clustal consensus line in a clustal file.</li>
- <!-- <li><em>RNAML</em> - (coming soon) - Jalview can import RNAML files containing sequences and extended secondary structure annotation derived from RNA 3D structure</li> -->
+ <li><em>RNAML</em> Jalview can import RNAML files containing sequences and extended secondary structure annotation derived from RNA 3D structure</li>
</ul>
<p>
<strong>RNA Secondary Structure Visualization and Analysis</strong><br />
Visualization in VARNA</a> - allows linked viewing of the consensus or
an individual sequence's structure</li>
</ul>
+ <p><strong>Pseudo-knots</strong><br/>
+ Jalview 2.8.2 introduced limited support for working with structures including pseudoknots. Where possible, extended WUSS symbols (e.g. different types of parentheses, or upper and lower case letters) are preserved when parsing RNA structure annotation and will be shaded differently when displayed in the structure.<br/>
+ Extended WUSS annotation is also employed to distinguish different base pair interactions obtained from RNAML files.</p>
+
<p><strong>Limitations when working with RNA in Jalview</strong><br/>
Currently, Jalview is not able to export RNA secondary structure annotation in any format other than Jalview annotation
</br>
<body>
<p><strong>Privacy for Jalview Users</strong><br>
<p>The Jalview Desktop application which is available from the
-www.jalview.org site does not contain code designed collect personal or
+www.jalview.org site does not contain code designed to collect personal or
private information without your consent. However, we do collect usage
statistics to work out who is using Jalview, so we can apply for funding
to support Jalview development, and make it better for our users.</p>
</ul><br>
</li>
<li><em>Google Analytics</em><br>
- Since jalview 2.4.0b2, the Jalview Desktop records usage data with
+ Since Jalview 2.4.0b2, the Jalview Desktop records usage data with
Google Analytics via the <a
href="http://code.google.com/p/jgoogleanalytics/">JGoogleAnalytics</a>
class.<br>
href="features/commandline.html">command line options</a> to disable
the questionnaire and usage statistics check. Finally, the <a
href="features/preferences.html#connections">Connections Tab</a> of the
-jalview preferences contains options for controlling the submission of
+Jalview preferences contains options for controlling the submission of
usage statistics.
<p><strong>Other Web Clients in Jalview</strong><br>
The Jalview desktop is intended to make it easier to interact with
<body>
<p><strong>Release History</strong></p>
<table border="1">
- <tr>
- <td width="60" nowrap>
- <div align="center"><em><strong>Release</strong></em></div>
- </td>
- <td>
- <div align="center"><em><strong>New Features</strong></em></div>
- </td>
- <td>
- <div align="center"><em><strong>Issues Resolved</strong></em></div>
- </td>
- </tr>
+ <tr>
+ <td width="60" nowrap>
+ <div align="center">
+ <em><strong>Release</strong></em>
+ </div>
+ </td>
+ <td>
+ <div align="center">
+ <em><strong>New Features</strong></em>
+ </div>
+ </td>
+ <td>
+ <div align="center">
+ <em><strong>Issues Resolved</strong></em>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td><div align="center">
+ <strong><a name="Jalview.2.8.2">2.8.2</a><br /> <em>3/12/2014</em></strong>
+ </div></td>
+ <td><em>General</em>
+ <ul>
+ <li>Updated Java code signing certificate donated by Certum.PL.</li>
+ <li>Features and annotation preserved when performing pairwise
+ alignment</li>
+ <li>RNA pseudoknot annotation can be
+ imported/exported/displayed</li>
+ <li>'colour by annotation' can colour by RNA and
+ protein secondary structure</li>
+ </ul> <em>Application</em>
+ <ul>
+ <li>Extract and display secondary structure for sequences with
+ 3D structures</li>
+ <li>Support for parsing RNAML</li>
+ <li>Annotations menu for layout
+ <ul>
+ <li>sort sequence annotation rows by alignment</li>
+ <li>place sequence annotation above/below alignment
+ annotation</li>
+ </ul>
+ <li>Output in Stockholm format</li>
+ <li>Internationalisation: improved Spanish (es) translation</li>
+ <li>Structure viewer preferences tab</li>
+ <li>Disorder and Secondary Structure annotation tracks shared
+ between alignments</li>
+ <li>UCSF Chimera launch and linked highlighting from Jalview</li>
+ <li>Show/hide all sequence associated annotation rows for all
+ or current selection</li>
+ <li>disorder and secondary structure predictions available as
+ dataset annotation</li>
+ <li>Per-sequence rna helices colouring</li>
+
+
+ <li>Sequence database accessions imported when fetching
+ alignments from Rfam</li>
+ <li>update VARNA version to 3.91</li>
+
+ <li>New groovy scripts for exporting aligned positions,
+ conservation values, and calculating sum of pairs scores.</li>
+ <li>Command line argument to set default JABAWS server</li>
+ <li>include installation type in build properties and console
+ log output</li>
+ <li>Updated Jalview project format to preserve dataset annotation</li>
+ </ul></td>
+ <td>
+ <!-- issues resolved --> <em>Application</em>
+ <ul>
+ <li>Distinguish alignment and sequence associated RNA
+ structure in structure->view->VARNA</li>
+ <li>Raise dialog box if user deletes all sequences in an
+ alignment</li>
+ <li>Pressing F1 results in documentation opening twice</li>
+ <li>Sequence feature tooltip is wrapped</li>
+ <li>Double click on sequence associated annotation selects
+ only first column</li>
+ <li>Redundancy removal doesn't result in unlinked leaves
+ shown in tree</li>
+ <li>Undos after several redundancy removals don't undo
+ properly</li>
+ <li>Hide sequence doesn't hide associated annotation</li>
+ <li>User defined colours dialog box too big to fit on screen
+ and buttons not visible</li>
+ <li>author list isn't updated if already written to jalview
+ properties</li>
+ <li>Popup menu won't open after retrieving sequence from
+ database</li>
+ <li>File open window for associate PDB doesn't open</li>
+ <li>Left-then-right click on a sequence id opens a browser
+ search window</li>
+ <li>Cannot open sequence feature shading/sort popup menu in
+ feature settings dialog</li>
+ <li>better tooltip placement for some areas of Jalview desktop</li>
+ <li>Allow addition of JABAWS Server which doesn't pass
+ validation</li>
+ <li>Web services parameters dialog box is too large to fit on
+ screen</li>
+ <li>Muscle nucleotide alignment preset obscured by tooltip</li>
+ <li>JABAWS preset submenus don't contain newly defined
+ user preset</li>
+ <li>MSA web services warns user if they were launched with
+ invalid input</li>
+ <li>Jalview cannot contact DAS Registy when running on Java 8</li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1273'>JAL-1273</a>] -->
+ 'Superpose with' submenu not shown when new view created
+ </li>
+
+ </ul> <!-- <em>Applet</em>
+ <ul>
+ </ul> <em>General</em>
+ <ul>
+ </ul>--> <em>Deployment and Documentation</em>
+ <ul>
+ <li>2G and 1G options in launchApp have no effect on memory
+ allocation</li>
+ <li>launchApp service doesn't automatically open
+ www.jalview.org/examples/exampleFile.jar if no file is given</li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1511'>JAL-1511</a>] -->
+ InstallAnywhere reports cannot find valid JVM when Java 1.7_055 is
+ available
+ </li>
+ </ul> <em>Application Known issues</em>
+ <ul>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-830'>JAL-830</a>] -->
+ corrupted or unreadable alignment display when scrolling alignment
+ to right
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1329'>JAL-1329</a>] -->
+ retrieval fails but progress bar continues for DAS retrieval with
+ large number of ID
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1486'>JAL-1486</a>] -->
+ flatfile output of visible region has incorrect sequence start/end
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1487'>JAL-1487</a>] -->
+ rna structure consensus doesn't update when secondary
+ structure tracks are rearranged
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1591'>JAL-1591</a>] -->
+ invalid rna structure positional highlighting does not highlight
+ position of invalid base pairs
+ </li>
+ <li>
+ <!-- <a href='http://issues.jalview.org/browse/JAL-1539'>JAL-1539</a>] -->
+ out of memory errors are not raised when saving jalview project
+ from alignment window file menu
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1576'>JAL-1576</a>] -->
+ Switching to RNA Helices colouring doesn't propagate to
+ structures
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1577'>JAL-1577</a>] -->
+ colour by RNA Helices not enabled when user created annotation
+ added to alignment
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1439'>JAL-1439</a>] -->
+ Jalview icon not shown on dock in Mountain Lion/Webstart
+ </li>
+ </ul> <em>Applet Known Issues</em>
+ <ul>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1394'>JAL-1394</a>] -->
+ JalviewLite needs JmolApplet and VARNA-3.91 jar dependencies
+ </li>
+ <li>
+ <!-- [<a href='http://issues.jalview.org/browse/JAL-1510'>JAL-1510</a>] -->
+ Jalview and Jmol example not compatible with IE9
+ </li>
+
+ <li>Sort by annotation score doesn't reverse order when
+ selected</li>
+ </ul>
+ </td>
+ </tr>
<tr>
<td><div align="center">
<strong><a name="Jalview.2.8.1">2.8.1</a><br /> <em>4/6/2014</em></strong>
whilst it is still connected to a session, that session can be recovered
in a new Jalview instance using the <strong>Vamsas→"Existing
session"</strong> sub menu.</p>
-<strong>A quick Demo</strong>
+<p><strong>A quick Demo</strong>
<br>
Jalview can talk to itself through VAMSAS. Simply start two copies of
the application, create a new vamsas session in one, and connect to the
will only have to configure Jalview once for each new server.</p>
<p><em>Support for accessing JABAWS servers was introduced in
Jalview 2.6.</em></p>
+<p><em>Option for adding JABAWS servers which fails validation
+was introduced from version 2.8.2 </em></p>
</body>
</html>
<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 pseudo bracket notation, as well as the centroid structure
+ form of a pseudo 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 labeled
<p><strong>The Sequence Identification Process</strong><br>
The method of accession id discovery is derived from the method which
earlier Jalview versions used for Uniprot sequence feature retrieval,
-and was originally restricted to the identifaction of valid Uniprot
+and was originally restricted to the identification of valid Uniprot
accessions.<br>
Essentially, Jalview will try to retrieve records from a subset of the databases
accessible by the <a href="../features/seqfetch.html">sequence
invoked to rationalise significantly different primary predictions.</em></li>
</ul>
</p>
+<em>JNet annotation created in Jalview 2.8.2 and later versions can be displayed on other alignments via the <a href="">Add reference annotation</a></em>
<em>As of Jalview 2.6, the Jnet service accessed accessed via the
'Secondary structure prediction' submenu should be considered a legacy
Jalview SOAP service, and will be replaced in the near future by a
-JABAWS Jnet service.</em>
+JABAWS Jnet service (now available in the Jalview 2.9 development version).</em>
</body>
</html>
</head>
<body>
<p>
- <strong>What's new ?</strong></p>
+ <strong>What's new ?</strong>
+ </p>
+ <p>
+ Jalview 2.8.2 is the first release produced by our new core
+ development team.<br /> It incorporates many minor improvements and
+ bug-fixes, and new features for working with 3D structure data,
+ shading alignments by secondary structure and generation of alignment
+ figures as Scalable Vector Graphics. <br />The majority of
+ improvements in this version of Jalview concern the desktop
+ application. As ever, the highlights are detailed below,
+ and the full list is given in the <a
+ href="releases.html#Jalview.2.8.2">Jalview 2.8.2 Release Notes</a>.
+ </p>
<p>
- Jalview 2.8.1 includes new features for group creation, RNA secondary
- structure prediction and a host bug fixes. It also includes support
- for <a href="http://www.compbio.dundee.ac.uk/JABAWS">version 2.1
- of JABA</a> and includes a Spanish translation of its user interface.<br />
- The highlights are detailed below, and the full list is given in the <a
- href="releases.html#Jalview2.8.1">Jalview 2.8.1 Release Notes</a>.
+ <strong>Annotation visualisation</strong> <br /> The alignment window
+ includes a new <em>Annotations</em> menu which provides controls for
+ the layout and display of sequence, group and alignment associated
+ annotation rows. It also now includes the <em>Autocalculated
+ Annotation</em> submenu (formerly located in the View menu), which
+ includes settings for the calculation and display of sequence
+ consensus, logos, and amino acid conservation for the alignment and
+ subgroups.
</p>
- <p>The Desktop and web based applet include new keystrokes for
- defining and undefining groups, and PAM250 has been added to the range
- of score models available for use by the tree and PCA calculations.
- The Jalview project file format has also been extended for handling
- RNA and protein secondary structure annotation, in anticipation for
- new structure based secondary structure support in Jalview 2.8.2.</p>
- <p><strong>Internationalisation</strong></p>
- <p>Jalview 2.8.1 is the first release to include support for
- displaying Jalview's user interface in different languages. In August
- 2013, David Roldán-Martinez took on the task of
- internationalising Jalview's user interface. He also recruited Sara
- Hernández Díaz and Laura Ferrandis Martinez who created
- Jalview's first spanish user interface translation.</p>
<p>
- If you notice any problems, or would like to help translate Jalview's
- user interface into other languages, head over to <a
- href="http://issues.jalview.org">issues.jalview.org</a> and put in a
- feature request describing the translations you can provide to the <a
- href="http://issues.jalview.org/browse/JAL/component/10682">i18n
- component</a>. David has also <a
- href="https://wiki.jalview.org/index.php/Development:i18n">documented
- the process of creating i18n translations</a> to help you get started.
+ <strong>Sequence associated annotation</strong><br /> New controls
+ have also been added to the Sequence ID popup menu for the propagation
+ and display of sequence associated annotation such as secondary
+ structure assignments and disorder predictions. Annotation associated
+ with one or a group of sequence already shown on the alignment may be
+ shown or hidden, and any available annotation from 3D structure or
+ calculations performed in other Jalview windows can be copied to the
+ alignment
+ <em>via</em> the <strong>Add Reference Annotation</strong> option.<br />
+ The <strong>Colour by annotation</strong> function has also been
+ improved, allowing secondary structure annotation to be used to shade
+ sequences and alignment columns. Protein sequences can be coloured
+ according to the presence of a helix or sheet at each position, and
+ RNA sequences can be shaded according to each structure's stem/helix
+ pattern - which enables different RNA folding topologies to be quickly
+ identified.
</p>
- <p><strong>RNA Secondary Structure Prediction with JABA 2.1</strong></p>
<p>
- This version of Jalview includes a client to access the new services available in <a
- href="http://www.compbio.dundee.ac.uk/jabaws/">JABA v2.1</a> , which
- provides services for RNA consensus secondary structure prediction and
- two new alignment programs (<a
- href="http://sourceforge.net/projects/glprobs/">GLProbs</a> and <a
- href="http://sourceforge.net/projects/msaprobs/">MSAProbs</a>).</p>
+ <strong>3D Structural data analysis and display</strong><br />
+ Jalview now employs Jmol's PDB data API to retrieve secondary
+ structure assignments made by the DSSP algorithm. It can also employ
+ web services to obtain secondary structure assignments from RNA
+ structures. These assignments are shown as sequence associated
+ annotation for sequences which have cross-references to the PDB, or
+ have had PDB files associated with them via the <em>Structures</em>
+ submenu of the sequence ID popup menu. The extraction and display of
+ secondary structure and B-factor column annotation is controlled <em>via</em>
+ a new <strong>Structure</strong> tab in the Jalview Desktop's
+ Preferences dialog box.
+ </p>
+ <p>
+ <Strong>Interoperation with UCSF Chimera</Strong><br /> The desktop
+ application can now be configured to employ UCSF Chimera for the
+ display of 3D structure data. UCSF Chimera is a python-based
+ high-performance molecular graphics and animation system developed by
+ the Resource for Biocomputing, Visualisation, and Informatics at the
+ University of California.<br />Jalview employs the 'StructureViz'
+ communication mechanism developed for Cytoscape by Morris et al.
+ (http://www.ncbi.nlm.nih.gov/pubmed/17623706) in 2007. This mechanism
+ allows Jalview to send commands to Chimera, enabling structures to be
+ superimposed and shaded according to associated multiple aligmment
+ views. <br />Support for Chimera in Jalview 2.8.2 is experimental, and we
+ would appreciate feedback ! Please send your comments to
+ jalview-discuss@jalview.org, and keep up to date with this feature's
+ development via http://issues.jalview.org/browse/JAL-1333.
+ </p>
<p>
- To see how to perform RNA secondary structure predictions like the one below, take a look at the <a href="webServices/RNAalifold.html">RNAAliFold
- client documentation</a>.
+ <strong>Export of alignment figures as Scalable Vector
+ Graphics</strong> <br />Scalable Vector Graphics (SVG) files are now widely
+ supported by web browsers and graphics design programs, and allow
+ high-quality graphics for interactive exploration and publication.
+ Jalview now supports the generation of SVGs interactively (via the
+ Export) menu, and from the command line for server-side figure
+ generation.
</p>
- <div align="center">
- <img src="webServices/RNAalifoldAnnotationRows.png" width="500" height="216"> <br> <em>The RNAalifold client was implemented by Jalview's 2013
- summer student, Dan Barton.</em>
- </div>
+
</body>
</html>
YEAR=2014
-AUTHORS=J Procter, AM Waterhouse, J Engelhardt, LM Lui, A Menard, D Barton, N Sherstnev, D Roldan-Martinez, M Clamp, S Searle, G Barton
-AUTHORFNAMES=Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, Anne Menard, Daniel Barton, Natasha Sherstnev, David Roldan-Martinez, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton
+AUTHORS=J Procter, AM Waterhouse, M Carstairs, TC Ofoegbu, J Engelhardt, LM Lui, A Menard, D Barton, N Sherstnev, D Roldan-Martinez, M Clamp, S Searle, G Barton
+AUTHORFNAMES=Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu 'Charles' Ofoegbu, Jan Engelhardt, Lauren Lui, Anne Menard, Daniel Barton, Natasha Sherstnev, David Roldan-Martinez, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton
\ No newline at end of file
action.apply = Apply
action.apply_threshold_all_groups = Apply threshold to all groups
action.apply_all_groups = Apply to all Groups
-action.by_chain = By chain
+action.by_chain = By Chain
action.by_sequence = By Sequence
action.paste_annotations = Paste Annotations
action.format = Format
label.autoadd_temp = Add Temperature Factor annotation to alignment
label.structure_viewer = Default structure viewer
label.chimera_path = Path to Chimera program
-label.chimera_path_tip = Jalview will try standard locations, plus any path entered here.
-label.invalid_path = File not found or not executable
+label.chimera_path_tip = Jalview will first try any path entered here, else standard installation locations.<br>Double-click to browse for file.
+label.invalid_chimera_path = Chimera path not found or not executable
+label.chimera_missing = Chimera structure viewer not found.<br/>Please enter the path to Chimera (if installed),<br/>or download and install UCSF Chimera.
label.min_colour = Minimum Colour
label.max_colour = Maximum Colour
label.use_original_colours = Use Original Colours
label.select_eps_character_rendering_style = Select EPS character rendering style
label.invert_selection = Invert Selection
label.optimise_order = Optimise Order
-label.seq_sort_by_score = Seq sort by Score
+label.seq_sort_by_score = Sequence sort by Score
label.load_colours = Load Colours
label.save_colours = Save Colours
label.fetch_das_features = Fetch DAS Features
label.user_defined_colours = User defined colours
label.jalviewLite_release = JalviewLite - Release {0}
label.jaview_build_date = Build date: {0}
-label.jalview_authors_1 = Authors: : Jim Procter, Andrew Waterhouse, Lauren Lui, Jan Engelhardt, Natasha Sherstnev,
-label.jalview_authors_2 = Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.
+label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt,
+label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.
label.jalview_dev_managers = Development managed by The Barton Group, University of Dundee, Scotland, UK.
label.jalview_distribution_lists = For help, see the FAQ at www.jalview.org and/or join the jalview-discuss@jalview.org mailing list
label.jalview_please_cite = If you use Jalview, please cite:
label.rest_client_submit = {0} using {1}
label.fetch_retrieve_from =Retrieve from {0}</html>
label.fetch_retrieve_from_all_sources = Retrieve from all {0} sources in {1}<br>First is :{2}<html>
-label.feature_settings_click_drag = <html>Click/drag feature types up or down to change render order.<br/>Double click to select columns containing feature in alignment/current selection<br/>Pressing Alt will select columns outside features rather than inside<br/>Pressing Shift to modify current selection (rather than clear current selection)<br/>Press CTRL or Command/Meta to toggle columns in/outside features<br/></html>
+#label.feature_settings_click_drag = <html>Click/drag feature types up or down to change render order.<br/>Double click to select columns containing feature in alignment/current selection<br/>Pressing Alt will select columns outside features rather than inside<br/>Pressing Shift to modify current selection (rather than clear current selection)<br/>Press CTRL or Command/Meta to toggle columns in/outside features<br/></html>
+label.feature_settings_click_drag = Drag up or down to change render order.<br/>Double click to select columns containing feature.
+label.transparency_tip = Adjust transparency to 'see through' feature colours.
label.opt_and_params_further_details = see further details by right-clicking
label.opt_and_params_show_brief_desc_image_link = <html>Click to show brief description<br><img src="{0}"/> Right click for further information.</html>
label.opt_and_params_show_brief_desc = <html>Click to show brief description<br></html>
warn.service_not_supported = Service not supported!
warn.input_is_too_big = Input is too big!
warn.invalid_job_param_set = Invalid job parameter set!
+warn.oneseq_msainput_selection = The current selection only contains a single sequence. Do you want to submit all sequences for alignment instead ?
info.job_couldnt_be_run_server_doesnt_support_program = Job could not be run because the server doesn't support this program.\n{0}
info.job_couldnt_be_run_exceeded_hard_limit = Job could not be run because it exceeded a hard limit on the server.\n{0}
info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service\!\n
info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n
info.alignment_object_method_notes = \nAlignment Object Method Notes\n
info.server_exception = \n{0} Server exception\!\n{1}
+info.invalid_msa_input_mininfo = Need at least two sequences with at least 3 residues each, with no hidden regions between them.
+info.invalid_msa_notenough = Not enough sequence data to align
status.processing_commandline_args = Processing commandline arguments...
status.das_features_being_retrived = DAS features being retrieved...
status.searching_for_sequences_from = Searching for sequences from {0}
label.user_defined_colours = Colores definidos del usuario
label.jalviewLite_release = JalviewLite - versión {0}
label.jaview_build_date = Fecha de creación: {0}
-label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui,
-label.jalview_authors_2 = Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.
+label.jalview_authors_1 = Authors: Jim Procter, Andrew Waterhouse, Mungo Carstairs, Tochukwu Ofoegbu, Lauren Lui, Jan Engelhardt,
+label.jalview_authors_2 = Natasha Sherstnev, Daniel Barton, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton.
label.jalview_dev_managers = Desarrollo gestionado por The Barton Group, University of Dundee, Scotland, UK.
label.jalview_distribution_lists = Para ayuda, ver el FAQ at www.jalview.org y/o adjuntar la lista de envÃo jalview-discuss@jalview.org
label.jalview_please_cite = Si usa Jalview incluya la siguiente cita, por favor:
label.rest_client_submit = {0} utilizando {1}
label.fetch_retrieve_from =Recuperar de {0}
label.fetch_retrieve_from_all_sources = Recuperar de todas las fuentes {0} en {1}<br>La primera es :{2}
-label.feature_settings_click_drag = Haga clic o arrastre los tipos de las caracterÃsticas hacia arriba o hacia abajo para cambiar el orden de visualización.<br/>Haga doble clic para seleccionar las columnas que contienen las caracterÃsticas del alineamiento/selección actual.<br/>Presionando Alt seleccionará las columnas exteriores a las caracterÃsticas en lugar de las interiores<br/>Presione Shift para modificar la selección actual (en lugar de borrarla)<br/>Presione CTRL o Command/Meta para cambiar las columans externas o internas a las caracterÃsticas<br/>
+label.feature_settings_click_drag = Haga clic o arrastre los tipos de las caracterÃsticas hacia arriba o hacia abajo para cambiar el orden de visualización.<br/>Haga doble clic para seleccionar las columnas que contienen las caracterÃsticas del alineamiento/selección actual.<br/>
label.opt_and_params_further_details = ver los detalles adicionales haciendo clic en el botón derecho
label.opt_and_params_show_brief_desc_image_link = Haga clic para ver una descripción breve<br><img src="{0}"/>Haga clic en el botón derecho para obtener información adicional.
label.opt_and_params_show_brief_desc = Haga clic para ver una descripción breve<br>
<!-- <script src="https://s3-eu-west-1.amazonaws.com/biojs/msa/latest/msa.js"></script> -->
<!-- <link type=text/css rel=stylesheet href=https://s3-eu-west-1.amazonaws.com/biojs/msa/latest/msa.css /> -->
- <img src="#jalview_logo#" alt="Jalview Logo" title="This html page was generated from Jalview, to import the data back to Jalview, please drag the generated html file and drop it unto the Jalview workbench.
+ <img src="http://www.jalview.org/help/html/Jalview_Logo.png" alt="Jalview Logo" title="This html page was generated from Jalview, to import the data back to Jalview, please drag the generated html file and drop it unto the Jalview workbench.
Alternatively, you could copy the url from the address bar and use Jalview's url importer (main menu-> File-> Input Alignment-> from URL) to import back the alignment jalview." >
</br>
</br>
-<button onclick="javascipt:openJalviewUsingCurrentUrl();">Launch in Jalview</button>
<input type="button" name="divToggleButton" id="divToggleButton" onclick="javascipt:toggleMenuVisibility();" value="Show Menu"></input>
+<button onclick="javascipt:openJalviewUsingCurrentUrl();">Launch in Jalview</button>
</br>
</br>
<script>
function toggleMenuVisibility(){
- //alert("toggleMenuVisibility called!");
-
var menu = document.getElementsByClassName("biojs_msa_menubar");
var divToggleButton = document.getElementById("divToggleButton");
if(menu[0].style.display == 'block'){
divToggleButton.value="Hide Menu";
}
}
-function openJalviewUsingCurrentUrl2(){
-var jnpl = "<!--"+
-"Hi!"+
-"If you have downloaded this file after pressing \"Launch Full Application\" from Jalview on a web page and you don't know what to do with this file, you must install Java from http://www.java.sun.com then try opening this file again."+
-" \n"+
-" JNLP generated by /jalviewServlet/services/launchAppDev"+
-" JNLP generated from http://www.jalview.org/builds/develop/webstart/jalview.jnlp"+
-"Available servlet parameters (please URLEncode):"+
-" open=<alignment file URL>"+
-" jvm-max-heap=heap size in M or G"+
-" features maps to '-features'"+
-" treeFile maps to '-tree'"+
-" tree maps to '-tree'"+
-" annotations maps to '-annotations'"+
-" colour maps to '-colour'"+
-" "+
-"-->"+
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?><jnlp spec=\"1.0+\" codebase=\"http://www.jalview.org/builds/develop/webstart\"> <information> <title>Jalview</title> <vendor>The Barton Group</vendor> <homepage href=\"http://www.jalview.org\"/> <description>Jalview Multiple Alignment Editor</description> <description kind=\"short\">Jalview</description> <icon href=\"JalviewLogo_big.png\"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version=\"1.7+\" initial-heap-size=\"10M\" max-heap-size=\"2G\"/> <jar href=\"jalview.jar\"/> <jar href=\"JGoogleAnalytics_0.3.jar\"/> <jar href=\"Jmol-12.2.4.jar\"/> <jar href=\"VARNAv3-91.jar\"/> <jar href=\"activation.jar\"/> <jar href=\"apache-mime4j-0.6.jar\"/> <jar href=\"axis.jar\"/> <jar href=\"castor-1.1-cycle-xml.jar\"/> <jar href=\"commons-codec-1.3.jar\"/> <jar href=\"commons-discovery.jar\"/> <jar href=\"commons-logging-1.1.1.jar\"/> <jar href=\"groovy-all-1.8.2.jar\"/> <jar href=\"httpclient-4.0.3.jar\"/> <jar href=\"httpcore-4.0.1.jar\"/> <jar href=\"httpmime-4.0.3.jar\"/> <jar href=\"jalview_jnlp_vm.jar\"/> <jar href=\"jaxrpc.jar\"/> <jar href=\"jdas-1.0.4.jar\"/> <jar href=\"jhall.jar\"/> <jar href=\"json_simple-1.1.jar\"/> <jar href=\"jsoup-1.8.1.jar\"/> <jar href=\"jswingreader-0.3.jar\"/> <jar href=\"log4j-to-slf4j-2.0-rc2.jar\"/> <jar href=\"mail.jar\"/> <jar href=\"miglayout-4.0-swing.jar\"/> <jar href=\"min-jabaws-client-2.1.0.jar\"/> <jar href=\"regex.jar\"/> <jar href=\"saaj.jar\"/> <jar href=\"slf4j-api-1.7.7.jar\"/> <jar href=\"slf4j-log4j12-1.7.7.jar\"/> <jar href=\"spring-core-3.0.5.RELEASE.jar\"/> <jar href=\"spring-web-3.0.5.RELEASE.jar\"/> <jar href=\"vamsas-client.jar\"/> <jar href=\"wsdl4j.jar\"/> <jar href=\"xercesImpl.jar\"/> <jar href=\"xml-apis.jar\"/> <property name=\"jalview.version\" value=\"Development Branch Build\"/> </resources>"+
-"<application-desc main-class=\"jalview.bin.Jalview\">"+
-"<argument>-open</argument>"+
-"<argument>file:///Users/tcnofoegbu/Documents/workspace/java/dev/jalview/examples/example_biojs.html</argument>"+
-"</application-desc>"+
-" <security>"+
-" <all-permissions/>"+
-" </security>"+
-"</jnlp>"
-
-var encodedUri = encodeURI(jnpl);
-window.open(encodedUri)
-//alert(jnpl)
-}
+
function openJalviewUsingCurrentUrl(){
- var url = "http://webservices.compbio.dundee.ac.uk:38080/jalviewServlet/services/launchAppDev";
+ var jalviewData = JSON.parse(document.getElementById("seqData").value)
+ var jalviewVersion = jalviewData['jalviewVersion'];
+ var url = jalviewData['webStartUrl'];
var myForm = document.createElement("form");
myForm.action = url;
- var myInput = document.createElement("input") ;
- myInput.setAttribute("name", "jvm-max-heap") ;
- myInput.setAttribute("value", "2G");
- myForm.appendChild(myInput) ;
+ var heap = document.createElement("input") ;
+ heap.setAttribute("name", "jvm-max-heap") ;
+ heap.setAttribute("value", "2G");
+ myForm.appendChild(heap) ;
+
+ var target = document.createElement("input") ;
+ target.setAttribute("name", "open") ;
+ target.setAttribute("value", document.URL);
+ myForm.appendChild(target) ;
- var myInput1 = document.createElement("input") ;
- myInput1.setAttribute("name", "open") ;
- myInput1.setAttribute("value", document.URL);
- myForm.appendChild(myInput1) ;
+ var jvVersion = document.createElement("input") ;
+ jvVersion.setAttribute("name", "version") ;
+ jvVersion.setAttribute("value", jalviewVersion);
+ myForm.appendChild(jvVersion) ;
document.body.appendChild(myForm) ;
// call render at the end to display the whole MSA
m.render();
-
toggleMenuVisibility();
toggleMenuVisibility();
});
bonds.addElement(new Bond(start, end, at1, at2));
}
- public void makeResidueList()
+ public void makeResidueList(boolean visibleChainAnnotation)
{
int count = 0;
Object symbol;
.elementAt(i));
resFeatures.setElementAt(null, i);
}
- Annotation[] annots = new Annotation[resAnnotation.size()];
- float max = 0;
- for (i = 0, iSize = annots.length; i < iSize; i++)
+ if (visibleChainAnnotation)
{
- annots[i] = (Annotation) resAnnotation.elementAt(i);
- if (annots[i].value > max)
+ Annotation[] annots = new Annotation[resAnnotation.size()];
+ float max = 0;
+ for (i = 0, iSize = annots.length; i < iSize; i++)
{
- max = annots[i].value;
+ annots[i] = (Annotation) resAnnotation.elementAt(i);
+ if (annots[i].value > max)
+ {
+ max = annots[i].value;
+ }
+ resAnnotation.setElementAt(null, i);
}
- resAnnotation.setElementAt(null, i);
+
+ AlignmentAnnotation tfactorann = new AlignmentAnnotation(
+ "Temperature Factor", "Temperature Factor for " + pdbid + id,
+ annots, 0, max,
+ AlignmentAnnotation.LINE_GRAPH);
+ tfactorann.setSequenceRef(sequence);
+ sequence.addAlignmentAnnotation(tfactorann);
}
- AlignmentAnnotation tfactorann = new AlignmentAnnotation(
- "PDB.TempFactor", "Temperature Factor for "
- + sequence.getName(), annots, 0, max,
- AlignmentAnnotation.LINE_GRAPH);
- tfactorann.setSequenceRef(sequence);
- sequence.addAlignmentAnnotation(tfactorann);
}
public void setChargeColours()
ana.getCalcId(), ana.label);
if (transfer == null || transfer.size() == 0)
{
+ ana = new AlignmentAnnotation(ana);
ana.liftOver(sequence, shadowMap);
ana.liftOver(dsq, sqmpping);
dsq.addAlignmentAnnotation(ana);
}
else
{
- if (sequence != null && sequence.getAnnotation() != null)
- {
- for (AlignmentAnnotation ana : sequence.getAnnotation())
+ if (sequence != null && sequence.getAnnotation() != null)
{
- List<AlignmentAnnotation> transfer = sq.getAlignmentAnnotations(
- ana.getCalcId(), ana.label);
- if (transfer == null || transfer.size() == 0)
- {
- ana.liftOver(dsq, sqmpping);
- // mapping.transfer(ana);
- }
- else
+ for (AlignmentAnnotation ana : sequence.getAnnotation())
{
- continue;
+ List<AlignmentAnnotation> transfer = sq
+ .getAlignmentAnnotations(ana.getCalcId(), ana.label);
+ if (transfer == null || transfer.size() == 0)
+ {
+ ana = new AlignmentAnnotation(ana);
+ ana.liftOver(dsq, sqmpping);
+ // mapping.transfer(ana);
+ }
+ else
+ {
+ continue;
+ }
}
}
}
- }
- float min = -1, max = 0;
- Annotation[] an = new Annotation[sq.getEnd() - sq.getStart() + 1];
- for (int i = sq.getStart(), j = sq.getEnd(), k = 0; i <= j; i++, k++)
+ if (false)
{
- int prn = mapping.getPDBResNum(k + 1);
-
- an[k] = new Annotation(prn);
- if (min == -1)
- {
- min = k;
- max = k;
- }
- else
+ // Useful for debugging mappings - adds annotation for mapped position
+ float min = -1, max = 0;
+ Annotation[] an = new Annotation[sq.getEnd() - sq.getStart() + 1];
+ for (int i = sq.getStart(), j = sq.getEnd(), k = 0; i <= j; i++, k++)
{
- if (min > k)
+ int prn = mapping.getPDBResNum(k + 1);
+
+ an[k] = new Annotation(prn);
+ if (min == -1)
{
min = k;
+ max = k;
}
- else if (max < k)
+ else
{
- max = k;
+ if (min > k)
+ {
+ min = k;
+ }
+ else if (max < k)
+ {
+ max = k;
+ }
}
}
+ sq.addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM",
+ "PDB Residue Numbering for " + this.pdbid + ":" + this.id,
+ an, min, max, AlignmentAnnotation.LINE_GRAPH));
}
- sq.addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM",
- "PDB Residue Numbering for " + this.pdbid + ":" + this.id,
- an, min, max, AlignmentAnnotation.LINE_GRAPH));
-
}
}
}
try
{
tmpPDBFile = pdbentry.getFile();
- PDBfile pdbfile = new PDBfile(false,false,tmpPDBFile,
+ PDBfile pdbfile = new PDBfile(false, false, false, tmpPDBFile,
jalview.io.AppletFormatAdapter.FILE);
pdbcanvas.init(pdbentry, seq, chains, ap, protocol);
*/
boolean VisibleChainAnnotation = false;
- boolean processSecondaryStructure=true;
-
+ boolean processSecondaryStructure = true;
+
+ boolean externalSecondaryStructure = false;
public PDBfile(boolean visibleChainAnnotation,
- boolean processSecondaryStructure)
+ boolean processSecondaryStructure, boolean externalSecStr)
{
super();
VisibleChainAnnotation = visibleChainAnnotation;
this.processSecondaryStructure = processSecondaryStructure;
+ this.externalSecondaryStructure = externalSecStr;
}
public PDBfile(boolean visibleChainAnnotation,
- boolean processSecondaryStructure, String file, String protocol) throws IOException
+ boolean processSecondaryStructure, boolean externalSecStr,
+ String file, String protocol) throws IOException
{
super(false, file, protocol);
VisibleChainAnnotation = visibleChainAnnotation;
this.processSecondaryStructure = processSecondaryStructure;
+ this.externalSecondaryStructure = externalSecStr;
doParse();
}
public PDBfile(boolean visibleChainAnnotation,
- boolean processSecondaryStructure, FileParse source) throws IOException
+ boolean processSecondaryStructure, boolean externalSecStr,
+ FileParse source) throws IOException
{
super(false, source);
VisibleChainAnnotation = visibleChainAnnotation;
this.processSecondaryStructure = processSecondaryStructure;
+ this.externalSecondaryStructure = externalSecStr;
doParse();
}
entry.setProperty(new Hashtable());
if (chains.elementAt(i).id != null)
{
- entry.getProperty().put("CHAIN",
- chains.elementAt(i).id);
+ entry.getProperty().put("CHAIN", chains.elementAt(i).id);
}
if (inFile != null)
{
AlignmentAnnotation[] chainannot = chainseq.getAnnotation();
- if (chainannot != null)
+ if (chainannot != null && VisibleChainAnnotation)
{
for (int ai = 0; ai < chainannot.length; ai++)
{
}
if (processSecondaryStructure)
{
- if (rna.size() > 0)
- {
- try
+ if (externalSecondaryStructure && rna.size() > 0)
{
- processPdbFileWithAnnotate3d(rna);
- } catch (Exception x)
- {
- System.err
- .println("Exceptions when dealing with RNA in pdb file");
- x.printStackTrace();
+ try
+ {
+ processPdbFileWithAnnotate3d(rna);
+ } catch (Exception x)
+ {
+ System.err
+ .println("Exceptions when dealing with RNA in pdb file");
+ x.printStackTrace();
+ }
}
- }
- ;
- if (prot.size() > 0)
- {
- try
+ ;
+ if (prot.size() > 0)
{
- processPdbFileWithJmol(prot);
- } catch (Exception x)
- {
- System.err
- .println("Exceptions from Jmol when processing data in pdb file");
- x.printStackTrace();
+ try
+ {
+ processPdbFileWithJmol(prot);
+ } catch (Exception x)
+ {
+ System.err
+ .println("Exceptions from Jmol when processing data in pdb file");
+ x.printStackTrace();
+ }
}
}
- }
} catch (OutOfMemoryError er)
{
System.out.println("OUT OF MEMORY LOADING PDB FILE");
public static boolean isCalcIdHandled(String calcId)
{
- return calcId != null
- && (calcIdPrefix.equals(calcId));
+ return calcId != null && (calcIdPrefix.equals(calcId));
}
- public static boolean isCalcIdForFile(AlignmentAnnotation alan, String pdbFile)
+ public static boolean isCalcIdForFile(AlignmentAnnotation alan,
+ String pdbFile)
{
return alan.getCalcId() != null
&& calcIdPrefix.equals(alan.getCalcId())
{
for (SequenceI sq : seqs)
{
- for (AlignmentAnnotation aa : sq.getAnnotation())
+ if (sq.getAnnotation() != null)
{
- String oldId = aa.getCalcId();
- if (oldId == null)
+ for (AlignmentAnnotation aa : sq.getAnnotation())
{
- oldId = "";
+ String oldId = aa.getCalcId();
+ if (oldId == null)
+ {
+ oldId = "";
+ }
+ aa.setCalcId(calcIdPrefix);
+ aa.setProperty("PDBID", id);
+ aa.setProperty("oldCalcId", oldId);
}
- aa.setCalcId(calcIdPrefix);
- aa.setProperty("PDBID", id);
- aa.setProperty("oldCalcId", oldId);
}
}
}
+
private void processPdbFileWithJmol(ArrayList<SequenceI> prot)
throws Exception
{
AlignmentI al, String pep, boolean b)
{
List<List<? extends Object>> replaced = AlignSeq
- .replaceMatchingSeqsWith(seqs,
- annotations, prot, al, AlignSeq.PEP, false);
+ .replaceMatchingSeqsWith(seqs, annotations, prot, al, pep,
+ false);
for (PDBChain ch : chains)
{
int p = 0;
p = -p - 1;
// set shadow entry for chains
ch.shadow = (SequenceI) replaced.get(1).get(p);
- ch.shadowMap = ((AlignSeq) replaced.get(2)
-.get(p))
+ ch.shadowMap = ((AlignSeq) replaced.get(2).get(p))
.getMappingFromS1(false);
}
}
{
for (int i = 0; i < chains.size(); i++)
{
- chains.elementAt(i).makeResidueList();
+ chains.elementAt(i).makeResidueList(VisibleChainAnnotation);
}
}
{
for (int i = 0; i < chains.size(); i++)
{
- chains.elementAt(i).setChainColours(Color.getHSBColor(
- 1.0f / i, .4f, 1.0f));
+ chains.elementAt(i).setChainColours(
+ Color.getHSBColor(1.0f / i, .4f, 1.0f));
}
}
StructureSettings defaultSettings = null;
// TODO: [Optional] Change priority of Chimera paths
- public List<String> getChimeraPaths()
+ public static List<String> getChimeraPaths()
{
List<String> pathList = new ArrayList<String>();
// if no network is available and the settings have been modified by the
// user, check for a
// path to chimera
- if (defaultSettings != null)
- {
- String defaultPath = defaultSettings.getChimeraPath();
- if (defaultPath != null && !defaultPath.equals(""))
- {
- pathList.add(defaultPath);
- return pathList;
- }
- }
+ //
+ // For Jalview, Preferences/Cache plays this role instead
+ // if (defaultSettings != null)
+ // {
+ // String defaultPath = defaultSettings.getChimeraPath();
+ // if (defaultPath != null && !defaultPath.equals(""))
+ // {
+ // pathList.add(defaultPath);
+ // return pathList;
+ // }
+ // }
/*
* Jalview addition: check if path set in user preferences.
String userPath = Cache.getDefault(Preferences.CHIMERA_PATH, null);
if (userPath != null)
{
- pathList.add(userPath);
+ pathList.add(0, userPath);
}
// Add default installation paths
ap++;
}
}
- if (sq.getAnnotation() != null)
+ if (sq.getAnnotation() != null && sq.getAnnotation().length > 0)
{
annotations.addAll(inspos, Arrays.asList(sq.getAnnotation()));
}
*/
package jalview.analysis;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
}
AlignmentI newAl = new jalview.datamodel.Alignment(
sq.toArray(new SequenceI[0]));
+ for (SequenceI s : sq)
+ {
+ if (s.getAnnotation() != null)
+ {
+ for (AlignmentAnnotation aa : s.getAnnotation())
+ {
+ newAl.addAnnotation(aa);
+ }
+ }
+ }
newAl.setDataset(core.getDataset());
return newAl;
}
public void sort(AlignmentAnnotation[] alignmentAnnotations,
SequenceAnnotationOrder order)
{
+ if (alignmentAnnotations == null)
+ {
+ return;
+ }
// cache 'alignment sequence position' for the annotations
saveSequenceIndices(alignmentAnnotations);
package jalview.analysis;
+import jalview.analysis.SecStrConsensus.SimpleBP;
+import jalview.datamodel.SequenceFeature;
+import jalview.util.MessageManager;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Stack;
import java.util.Vector;
-import jalview.analysis.SecStrConsensus.SimpleBP;
-import jalview.datamodel.SequenceFeature;
-import jalview.util.MessageManager;
-
public class Rna
{
{
for (int i = 0; i < openingPars.length; i++)
{
- System.out.println(closingPars[i] + "->" + openingPars[i]);
+ // System.out.println(closingPars[i] + "->" + openingPars[i]);
put(closingPars[i], openingPars[i]);
}
}
public static Vector<SimpleBP> GetSimpleBPs(CharSequence line)
throws WUSSParseException
{
- System.out.println(line);
Hashtable<Character, Stack<Integer>> stacks = new Hashtable<Character, Stack<Integer>>();
Vector<SimpleBP> pairs = new Vector<SimpleBP>();
int i = 0;
FeatureRenderer cloneFeatureRenderer();
+ /**
+ *
+ * @return displayed name for the view
+ */
+ String getViewName();
}
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.analysis.*;
-import jalview.commands.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
-import jalview.util.MessageManager;
-import jalview.util.UrlLink;
+import jalview.analysis.AAFrequency;
+import jalview.analysis.Conservation;
+import jalview.commands.ChangeCaseCommand;
+import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.PDBEntry;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
import jalview.io.AppletFormatAdapter;
import jalview.io.SequenceAnnotationReport;
+import jalview.schemes.Blosum62ColourScheme;
+import jalview.schemes.BuriedColourScheme;
+import jalview.schemes.ClustalxColourScheme;
+import jalview.schemes.HelixColourScheme;
+import jalview.schemes.HydrophobicColourScheme;
+import jalview.schemes.NucleotideColourScheme;
+import jalview.schemes.PIDColourScheme;
+import jalview.schemes.ResidueProperties;
+import jalview.schemes.StrandColourScheme;
+import jalview.schemes.TaylorColourScheme;
+import jalview.schemes.TurnColourScheme;
+import jalview.schemes.ZappoColourScheme;
+import jalview.util.MessageManager;
+import jalview.util.UrlLink;
+
+import java.awt.CheckboxMenuItem;
+import java.awt.Frame;
+import java.awt.Menu;
+import java.awt.MenuItem;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.util.Vector;
public class APopupMenu extends java.awt.PopupMenu implements
ActionListener, ItemListener
if (sg != null)
{
if (seq == null)
+ {
seq = (Sequence) sg.getSequenceAt(0);
+ }
EditNameDialog dialog = new EditNameDialog(seq.getSequenceAsString(
sg.getStartRes(), sg.getEndRes() + 1), null,
if (dialog.accept)
{
EditCommand editCommand = new EditCommand(MessageManager.getString("label.edit_sequences"),
- EditCommand.REPLACE, dialog.getName().replace(' ',
+ Action.REPLACE, dialog.getName().replace(' ',
ap.av.getGapCharacter()),
sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
sg.getStartRes(), sg.getEndRes() + 1,
PDBEntry entry = (PDBEntry) seq.getPDBId().firstElement();
if (ap.av.applet.jmolAvailable)
+ {
new jalview.appletgui.AppletJmol(entry, new Sequence[]
{ seq }, null, ap, AppletFormatAdapter.URL);
+ }
else
+ {
new MCview.AppletPDBViewer(entry, new Sequence[]
{ seq }, null, ap, AppletFormatAdapter.URL);
+ }
}
else
import jalview.bin.JalviewLite;
import jalview.commands.CommandI;
import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
import jalview.commands.OrderCommand;
import jalview.commands.RemoveGapColCommand;
import jalview.commands.RemoveGapsCommand;
}
// !newAlignment
- addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE,
+ addHistoryItem(new EditCommand(
+ MessageManager.getString("label.add_sequences"), Action.PASTE,
seqs, 0, viewport.getAlignment().getWidth(),
viewport.getAlignment()));
/*
* //ADD HISTORY ITEM
*/
- addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut,
- sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
+ addHistoryItem(new EditCommand(
+ MessageManager.getString("label.cut_sequences"), Action.CUT,
+ cut, sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
viewport.getAlignment()));
viewport.setSelectionGroup(null);
*/
package jalview.appletgui;
-import java.awt.*;
-import java.awt.event.*;
-
import jalview.api.AlignmentViewPanel;
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.SequenceI;
import jalview.structure.StructureSelectionManager;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FontMetrics;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Panel;
+import java.awt.Scrollbar;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+
public class AlignmentPanel extends Panel implements AdjustmentListener,
AlignmentViewPanel
{
}
@Override
+ public String getViewName()
+ {
+ return getName();
+ }
+
+ @Override
public StructureSelectionManager getStructureSelectionManager()
{
return StructureSelectionManager
anot[index] = new Annotation(label, "", type, 0);
}
- anot[index].secondaryStructure = type;
+
+ anot[index].secondaryStructure = type != 'S' ? type : label
+ .length() == 0 ? ' ' : label.charAt(0);
anot[index].displayCharacter = label;
}
}
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.analysis.*;
-import jalview.datamodel.*;
+import jalview.analysis.AlignSeq;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
import jalview.util.MessageManager;
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.Panel;
+import java.awt.ScrollPane;
+import java.awt.TextArea;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Vector;
+
public class PairwiseAlignPanel extends Panel implements ActionListener
{
Vector sequences = new Vector();
totscore = totscore + scores[i][j];
textarea.append(as.getOutput());
- seq = new Sequence(as.getS1().getName(), as.getAStr1(), as.getS1()
- .getStart(), as.getS1().getEnd());
- sequences.addElement(seq);
-
- seq = new Sequence(as.getS2().getName(), as.getAStr2(), as.getS2()
- .getStart(), as.getS2().getEnd());
- sequences.addElement(seq);
+ sequences.add(as.getAlignedSeq1());
+ sequences.add(as.getAlignedSeq1());
}
}
*/
package jalview.appletgui;
-import java.util.*;
-import java.util.List;
-import java.awt.*;
-import java.awt.event.*;
-
import jalview.analysis.AlignSeq;
-import jalview.commands.*;
-import jalview.datamodel.*;
+import jalview.commands.CommandI;
+import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
import jalview.util.MessageManager;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Stack;
+import java.util.Vector;
+
public class RedundancyPanel extends SliderPanel implements Runnable,
WindowListener
{
}
EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"),
- EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
+ Action.CUT, deleted, 0, width, ap.av.getAlignment());
AlignmentI alignment = ap.av.getAlignment();
for (int i = 0; i < del.size(); i++)
{
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.commands.*;
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.schemes.ResidueProperties;
import jalview.structure.SelectionSource;
import jalview.structure.SequenceListener;
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Panel;
+import java.awt.Point;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.util.Vector;
+
public class SeqPanel extends Panel implements MouseMotionListener,
MouseListener, SequenceListener
{
void setCursorPosition()
{
- SequenceI sequence = (Sequence) av.getAlignment().getSequenceAt(
+ SequenceI sequence = av.getAlignment().getSequenceAt(
seqCanvas.cursorY);
seqCanvas.cursorX = sequence.findIndex(getKeyboardNo1()) - 1;
void setSelectionAreaAtCursor(boolean topLeft)
{
- SequenceI sequence = (Sequence) av.getAlignment().getSequenceAt(
+ SequenceI sequence = av.getAlignment().getSequenceAt(
seqCanvas.cursorY);
if (av.getSelectionGroup() != null)
{
String tmp = sequence.hashCode() + index + "";
if (lastMessage == null || !lastMessage.equals(tmp))
+ {
ssm.mouseOverSequence(sequence, index, pos, av);
+ }
lastMessage = tmp;
}
int respos = sequence.findPosition(res);
if (ssm != null)
+ {
mouseOverSequence(sequence, res, respos);
+ }
StringBuffer text = new StringBuffer("Sequence " + (seq + 1) + " ID: "
+ sequence.getName());
{
if (av.isHiddenRepSequence(seq))
{
- sg = (SequenceGroup) av.getRepresentedSequences(seq);
+ sg = av.getRepresentedSequences(seq);
groupEditing = true;
}
}
}
else
{
- editCommand.appendEdit(EditCommand.INSERT_GAP, groupSeqs,
+ editCommand.appendEdit(Action.INSERT_GAP, groupSeqs,
startres, startres - lastres, av.getAlignment(), true);
}
}
}
else
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, groupSeqs,
+ editCommand.appendEdit(Action.DELETE_GAP, groupSeqs,
startres, lastres - startres, av.getAlignment(), true);
}
}
else
{
- editCommand.appendEdit(EditCommand.INSERT_GAP, new SequenceI[]
+ editCommand.appendEdit(Action.INSERT_GAP, new SequenceI[]
{ seq }, lastres, startres - lastres, av.getAlignment(), true);
}
}
if (max > 0)
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, new SequenceI[]
+ editCommand.appendEdit(Action.DELETE_GAP, new SequenceI[]
{ seq }, startres, max, av.getAlignment(), true);
}
}
}
}
- editCommand.appendEdit(EditCommand.DELETE_GAP, seq, blankColumn, 1,
+ editCommand.appendEdit(Action.DELETE_GAP, seq, blankColumn, 1,
av.getAlignment(), true);
- editCommand.appendEdit(EditCommand.INSERT_GAP, seq, j, 1,
+ editCommand.appendEdit(Action.INSERT_GAP, seq, j, 1,
av.getAlignment(), true);
}
void deleteChar(int j, SequenceI[] seq, int fixedColumn)
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, seq, j, 1,
+ editCommand.appendEdit(Action.DELETE_GAP, seq, j, 1,
av.getAlignment(), true);
- editCommand.appendEdit(EditCommand.INSERT_GAP, seq, fixedColumn, 1,
+ editCommand.appendEdit(Action.INSERT_GAP, seq, fixedColumn, 1,
av.getAlignment(), true);
}
return;
}
- SequenceI sequence = (Sequence) av.getAlignment().getSequenceAt(seq);
+ SequenceI sequence = av.getAlignment().getSequenceAt(seq);
if (sequence == null || res > sequence.getLength())
{
* <li>FOLLOW_SELECTIONS (true) Controls whether a new alignment view should
* respond to selections made in other alignments containing the same sequences.
* </li>
+ * <li>JWS2HOSTURLS comma-separated list of URLs to try for JABAWS services</li>
* <li>SHOW_WSDISCOVERY_ERRORS (true) Controls if the web service URL discovery
* warning dialog box is displayed.</li>
* <li>ANNOTATIONCOLOUR_MIN (orange) Shade used for minimum value of annotation
String jnlpVersion = System.getProperty("jalview.version");
String codeVersion = getProperty("VERSION");
-
+ String codeInstallation = getProperty("INSTALLATION");
if (codeVersion == null)
{
// THIS SHOULD ONLY BE THE CASE WHEN TESTING!!
codeVersion = "Test";
jnlpVersion = "Test";
+ codeInstallation = "";
+ }
+ else
+ {
+ codeInstallation = " (" + codeInstallation + ")";
}
- System.out.println("Jalview Version: " + codeVersion);
+ System.out
+ .println("Jalview Version: " + codeVersion + codeInstallation);
// jnlpVersion will be null if we're using InstallAnywhere
// Dont do this check if running in headless mode
applicationProperties.remove("AUTHORS");
applicationProperties.remove("AUTHORFNAMES");
applicationProperties.remove("YEAR");
+ applicationProperties.remove("BUILD_DATE");
+ applicationProperties.remove("INSTALLATION");
}
/**
*/
package jalview.bin;
-import java.awt.FlowLayout;
-import java.awt.Frame;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.io.HtmlSvgOutput;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+import jalview.ws.jws2.Jws2Discoverer;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Constructor;
+import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.net.URLDecoder;
import java.security.PermissionCollection;
import java.security.Permissions;
import java.security.Policy;
-import java.util.*;
-
-import javax.swing.*;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Vector;
-import jalview.gui.*;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
+import javax.swing.UIManager;
/**
* Main class for Jalview Application <br>
}
/**
- * Put protein=true for get a protein example
- */
- private static boolean protein = false;
-
- /**
* main class for Jalview application
*
* @param args
if (aparser.contains("help") || aparser.contains("h"))
{
- System.out
- .println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"
- + "-nodisplay\tRun Jalview without User Interface.\n"
- + "-props FILE\tUse the given Jalview properties file instead of users default.\n"
- + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n"
- + "-annotations FILE\tAdd precalculated annotations to the alignment.\n"
- + "-tree FILE\tLoad the given newick format tree file onto the alignment\n"
- + "-features FILE\tUse the given file to mark features on the alignment.\n"
- + "-fasta FILE\tCreate alignment file FILE in Fasta format.\n"
- + "-clustal FILE\tCreate alignment file FILE in Clustal format.\n"
- + "-pfam FILE\tCreate alignment file FILE in PFAM format.\n"
- + "-msf FILE\tCreate alignment file FILE in MSF format.\n"
- + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
- + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
- + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
- + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
- + "-png FILE\tCreate PNG image FILE from alignment.\n"
- + "-imgMap FILE\tCreate HTML file FILE with image map of PNG image.\n"
- + "-eps FILE\tCreate EPS file FILE from alignment.\n"
- + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
- + "-noquestionnaire\tTurn off questionnaire check.\n"
- + "-nousagestats\tTurn off google analytics tracking for this session.\n"
- + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
- // +
- // "-setprop PROPERTY=VALUE\tSet the given Jalview property, after all other properties files have been read\n\t (quote the 'PROPERTY=VALUE' pair to ensure spaces are passed in correctly)"
- + "-dasserver nickname=URL\tAdd and enable a das server with given nickname\n\t\t\t(alphanumeric or underscores only) for retrieval of features for all alignments.\n"
- + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n"
- + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n"
- + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
- // +
- // "-vdoc vamsas-document\tImport vamsas document into new session or join existing session with same URN\n"
- // + "-vses vamsas-session\tJoin session with given URN\n"
- + "-groovy FILE\tExecute groovy script in FILE, after all other arguments have been processed (if FILE is the text 'STDIN' then the file will be read from STDIN)\n"
- + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
+ showUsage();
System.exit(0);
}
if (aparser.contains("nodisplay") || aparser.contains("nogui")
}
Cache.loadProperties(aparser.getValue("props")); // must do this before
// anything else!
+
+ final String jabawsUrl = aparser.getValue("jabaws");
+ if (jabawsUrl != null)
+ {
+ try
+ {
+ Jws2Discoverer.getDiscoverer().setPreferredUrl(jabawsUrl);
+ } catch (MalformedURLException e)
+ {
+ System.err.println("Invalid jabaws parameter: " + jabawsUrl
+ + " ignored");
+ }
+ }
+
String defs = aparser.getValue("setprop");
while (defs != null)
{
{
af.getViewport().setSortByTree(true);
}
+ if (aparser.contains("no-annotation"))
+ {
+ af.getViewport().setShowAnnotation(false);
+ }
if (aparser.contains("nosortbytree"))
{
af.getViewport().setSortByTree(false);
{
FeatureFetcher ff = startFeatureFetching(getFeatures);
if (ff != null)
+ {
while (!ff.allFinished() || af.operationInProgress())
{
// wait around until fetching is finished.
}
}
+ }
getFeatures = null; // have retrieved features - forget them now.
}
if (groovyscript != null)
System.out.println("Creating PNG image: " + file);
continue;
}
+ else if (format.equalsIgnoreCase("svg"))
+ {
+ File imageFile = new java.io.File(file);
+ imageName = imageFile.getName();
+ af.createSVG(imageFile);
+ System.out.println("Creating SVG image: " + file);
+ continue;
+ }
+ else if (format.equalsIgnoreCase("html"))
+ {
+ File imageFile = new java.io.File(file);
+ imageName = imageFile.getName();
+ new HtmlSvgOutput(new java.io.File(file), af.alignPanel);
+ System.out.println("Creating HTML image: " + file);
+ continue;
+ }
else if (format.equalsIgnoreCase("imgMap"))
{
af.createImageMap(new java.io.File(file), imageName);
// ////////////////////
if (!headless && file == null && vamsasImport == null
- && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true)
- && protein == true)
+ && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
{
file = jalview.bin.Cache.getDefault(
"STARTUP_FILE",
}
}
+ private static void showUsage()
+ {
+ System.out
+ .println("Usage: jalview -open [FILE] [OUTPUT_FORMAT] [OUTPUT_FILE]\n\n"
+ + "-nodisplay\tRun Jalview without User Interface.\n"
+ + "-props FILE\tUse the given Jalview properties file instead of users default.\n"
+ + "-colour COLOURSCHEME\tThe colourscheme to be applied to the alignment\n"
+ + "-annotations FILE\tAdd precalculated annotations to the alignment.\n"
+ + "-tree FILE\tLoad the given newick format tree file onto the alignment\n"
+ + "-features FILE\tUse the given file to mark features on the alignment.\n"
+ + "-fasta FILE\tCreate alignment file FILE in Fasta format.\n"
+ + "-clustal FILE\tCreate alignment file FILE in Clustal format.\n"
+ + "-pfam FILE\tCreate alignment file FILE in PFAM format.\n"
+ + "-msf FILE\tCreate alignment file FILE in MSF format.\n"
+ + "-pileup FILE\tCreate alignment file FILE in Pileup format\n"
+ + "-pir FILE\tCreate alignment file FILE in PIR format.\n"
+ + "-blc FILE\tCreate alignment file FILE in BLC format.\n"
+ + "-jalview FILE\tCreate alignment file FILE in Jalview format.\n"
+ + "-png FILE\tCreate PNG image FILE from alignment.\n"
+ + "-svg FILE\tCreate SVG image FILE from alignment.\n"
+ + "-html FILE\tCreate HTML file from alignment.\n"
+ + "-imgMap FILE\tCreate HTML file FILE with image map of PNG image.\n"
+ + "-eps FILE\tCreate EPS file FILE from alignment.\n"
+ + "-questionnaire URL\tQueries the given URL for information about any Jalview user questionnaires.\n"
+ + "-noquestionnaire\tTurn off questionnaire check.\n"
+ + "-nousagestats\tTurn off google analytics tracking for this session.\n"
+ + "-sortbytree OR -nosortbytree\tEnable or disable sorting of the given alignment by the given tree\n"
+ // +
+ // "-setprop PROPERTY=VALUE\tSet the given Jalview property, after all other properties files have been read\n\t (quote the 'PROPERTY=VALUE' pair to ensure spaces are passed in correctly)"
+ + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n"
+ + "-dasserver nickname=URL\tAdd and enable a das server with given nickname\n\t\t\t(alphanumeric or underscores only) for retrieval of features for all alignments.\n"
+ + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n"
+ + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n"
+ + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n"
+ // +
+ // "-vdoc vamsas-document\tImport vamsas document into new session or join existing session with same URN\n"
+ // + "-vses vamsas-session\tJoin session with given URN\n"
+ + "-groovy FILE\tExecute groovy script in FILE, after all other arguments have been processed (if FILE is the text 'STDIN' then the file will be read from STDIN)\n"
+ + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
+ }
+
private static void startUsageStats(final Desktop desktop)
{
/**
public void run()
{
Cache.log
- .info("Initialising googletracker for usage stats.");
+ .debug("Initialising googletracker for usage stats.");
Cache.initGoogleTracker();
Cache.log.debug("Tracking enabled.");
}
{
public void run()
{
- Cache.log.info("Not enabling Google Tracking.");
+ Cache.log.debug("Not enabling Google Tracking.");
}
}, null, true);
desktop.addDialogThread(prompter);
public static boolean debug = false;
- static String builddate = null, version = null;
+ static String builddate = null, version = null, installation = null;
private static void initBuildDetails()
{
{
builddate = "unknown";
version = "test";
+ installation = "Webstart";
java.net.URL url = JalviewLite.class
.getResource("/.build_properties");
if (url != null)
{
builddate = line.substring(line.indexOf("=") + 1);
}
+ if (line.indexOf("INSTALLATION") > -1)
+ {
+ installation = line.substring(line.indexOf("=") + 1);
+ }
}
} catch (Exception ex)
{
return builddate;
}
+ public static String getInstallation()
+ {
+ initBuildDetails();
+ return installation;
+ }
+
public static String getVersion()
{
initBuildDetails();
System.err.println("JalviewLite Version " + getVersion());
System.err.println("Build Date : " + getBuildDate());
+ System.err.println("Installation : " + getInstallation());
}
String externalsviewer = getParameter("externalstructureviewer");
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.ListIterator;
/**
*
*/
public class EditCommand implements CommandI
{
- public static final int INSERT_GAP = 0;
-
- public static final int DELETE_GAP = 1;
-
- public static final int CUT = 2;
-
- public static final int PASTE = 3;
-
- public static final int REPLACE = 4;
-
- public static final int INSERT_NUC = 5;
+ public enum Action
+ {
+ INSERT_GAP, DELETE_GAP, CUT, PASTE, REPLACE, INSERT_NUC
+ };
- Edit[] edits;
+ private List<Edit> edits = new ArrayList<Edit>();
String description;
this.description = description;
}
- public EditCommand(String description, int command, SequenceI[] seqs,
+ public EditCommand(String description, Action command, SequenceI[] seqs,
int position, int number, AlignmentI al)
{
this.description = description;
- if (command == CUT || command == PASTE)
+ if (command == Action.CUT || command == Action.PASTE)
{
- edits = new Edit[]
- { new Edit(command, seqs, position, number, al) };
+ setEdit(new Edit(command, seqs, position, number, al));
}
performEdit(0, null);
}
- public EditCommand(String description, int command, String replace,
+ public EditCommand(String description, Action command, String replace,
SequenceI[] seqs, int position, int number, AlignmentI al)
{
this.description = description;
- if (command == REPLACE)
+ if (command == Action.REPLACE)
{
- edits = new Edit[]
- { new Edit(command, seqs, position, number, al, replace) };
+ setEdit(new Edit(command, seqs, position, number, al, replace));
}
performEdit(0, null);
}
+ /**
+ * Set the list of edits to the specified item (only).
+ *
+ * @param e
+ */
+ protected void setEdit(Edit e)
+ {
+ edits.clear();
+ edits.add(e);
+ }
+
+ /**
+ * Add the given edit command to the stored list of commands.
+ *
+ * @param e
+ */
+ protected void addEdit(Edit e)
+ {
+ edits.add(e);
+ }
+
+ /**
+ * Clear the list of stored edit commands.
+ *
+ */
+ protected void clearEdits()
+ {
+ edits.clear();
+ }
+
+ /**
+ * Returns the i'th stored Edit command.
+ *
+ * @param i
+ * @return
+ */
+ protected Edit getEdit(int i)
+ {
+ if (i >= 0 && i < edits.size())
+ {
+ return edits.get(i);
+ }
+ return null;
+ }
+
@Override
final public String getDescription()
{
@Override
public int getSize()
{
- return edits == null ? 0 : edits.length;
+ return edits.size();
}
+ /**
+ * Return the alignment for the first edit (or null if no edit).
+ *
+ * @return
+ */
final public AlignmentI getAlignment()
{
- return edits[0].al;
+ return (edits.isEmpty() ? null : edits.get(0).al);
}
/**
* @param al
* @param performEdit
*/
- final public void appendEdit(int command, SequenceI[] seqs, int position,
+ final public void appendEdit(Action command, SequenceI[] seqs,
+ int position,
int number, AlignmentI al, boolean performEdit)
{
appendEdit(command, seqs, position, number, al, performEdit, null);
* @param performEdit
* @param views
*/
- final public void appendEdit(int command, SequenceI[] seqs, int position,
+ final public void appendEdit(Action command, SequenceI[] seqs,
+ int position,
int number, AlignmentI al, boolean performEdit, AlignmentI[] views)
{
Edit edit = new Edit(command, seqs, position, number,
edit.fullAlignmentHeight = true;
}
- if (edits != null)
- {
- Edit[] temp = new Edit[edits.length + 1];
- System.arraycopy(edits, 0, temp, 0, edits.length);
- edits = temp;
- edits[edits.length - 1] = edit;
- }
- else
- {
- edits = new Edit[]
- { edit };
- }
+ edits.add(edit);
if (performEdit)
{
- performEdit(edits.length - 1, views);
+ performEdit(edit, views);
}
}
+ /**
+ * Execute all the edit commands, starting at the given commandIndex
+ *
+ * @param commandIndex
+ * @param views
+ */
final void performEdit(int commandIndex, AlignmentI[] views)
{
- int eSize = edits.length;
- for (int e = commandIndex; e < eSize; e++)
+ ListIterator<Edit> iterator = edits.listIterator(commandIndex);
+ while (iterator.hasNext())
{
- switch (edits[e].command)
- {
- case INSERT_GAP:
- insertGap(edits[e]);
- break;
- case DELETE_GAP:
- deleteGap(edits[e]);
- break;
- case CUT:
- cut(edits[e], views);
- break;
- case PASTE:
- paste(edits[e], views);
- break;
- case REPLACE:
- replace(edits[e]);
- break;
+ Edit edit = iterator.next();
+ performEdit(edit, views);
+ }
+ }
+
+ /**
+ * Execute one edit command in all the specified alignment views
+ *
+ * @param edit
+ * @param views
+ */
+ protected void performEdit(Edit edit, AlignmentI[] views)
+ {
+ switch (edit.command)
+ {
+ case INSERT_GAP:
+ insertGap(edit);
+ break;
+ case DELETE_GAP:
+ deleteGap(edit);
+ break;
+ case CUT:
+ cut(edit, views);
+ break;
+ case PASTE:
+ paste(edit, views);
+ break;
+ case REPLACE:
+ replace(edit);
+ break;
+ case INSERT_NUC:
// TODO:add deleteNuc for UNDO
// case INSERT_NUC:
// insertNuc(edits[e]);
- // break;
- }
+ break;
+ default:
+ break;
}
}
performEdit(0, views);
}
+ /**
+ * Undo the stored list of commands, in reverse order.
+ */
@Override
final public void undoCommand(AlignmentI[] views)
{
- for(Edit e : edits){
- switch (e.command)
- {
- case INSERT_GAP:
- deleteGap(e);
- break;
- case DELETE_GAP:
- insertGap(e);
- break;
- case CUT:
- paste(e, views);
- break;
- case PASTE:
- cut(e, views);
- break;
- case REPLACE:
- replace(e);
- break;
- }
+ ListIterator<Edit> iterator = edits.listIterator(edits.size());
+ while (iterator.hasPrevious())
+ {
+ Edit e = iterator.previous();
+ switch (e.command)
+ {
+ case INSERT_GAP:
+ deleteGap(e);
+ break;
+ case DELETE_GAP:
+ insertGap(e);
+ break;
+ case CUT:
+ paste(e, views);
+ break;
+ case PASTE:
+ cut(e, views);
+ break;
+ case REPLACE:
+ replace(e);
+ break;
+ case INSERT_NUC:
+ // not implemented
+ break;
+ default:
+ break;
+ }
}
}
- final void insertGap(Edit command)
+ /**
+ * Insert gap(s) in sequences as specified by the command, and adjust
+ * annotations.
+ *
+ * @param command
+ */
+ final private void insertGap(Edit command)
{
for (int s = 0; s < command.seqs.length; s++)
// adjustAnnotations(command, true, false, null);
// }
- final void deleteGap(Edit command)
+ /**
+ * Delete gap(s) in sequences as specified by the command, and adjust
+ * annotations.
+ *
+ * @param command
+ */
+ final private void deleteGap(Edit command)
{
for (int s = 0; s < command.seqs.length; s++)
{
adjustAnnotations(command, false, false, null);
}
+ /**
+ * Carry out a Cut action. The cut characters are saved in case Undo is
+ * requested.
+ *
+ * @param command
+ * @param views
+ */
void cut(Edit command, AlignmentI[] views)
{
boolean seqDeleted = false;
for (int i = 0; i < command.seqs.length; i++)
{
- if (command.seqs[i].getLength() > command.position)
+ final SequenceI sequence = command.seqs[i];
+ if (sequence.getLength() > command.position)
{
- command.string[i] = command.seqs[i].getSequence(command.position,
+ command.string[i] = sequence.getSequence(command.position,
command.position + command.number);
- SequenceI oldds = command.seqs[i].getDatasetSequence();
+ SequenceI oldds = sequence.getDatasetSequence();
if (command.oldds != null && command.oldds[i] != null)
{
// we are redoing an undone cut.
- command.seqs[i].setDatasetSequence(null);
+ sequence.setDatasetSequence(null);
}
- command.seqs[i].deleteChars(command.position, command.position
+ sequence.deleteChars(command.position, command.position
+ command.number);
if (command.oldds != null && command.oldds[i] != null)
{
// oldds entry contains the cut dataset sequence.
- command.seqs[i].setDatasetSequence(command.oldds[i]);
+ sequence.setDatasetSequence(command.oldds[i]);
command.oldds[i] = oldds;
}
else
{
// modify the oldds if necessary
- if (oldds != command.seqs[i].getDatasetSequence()
- || command.seqs[i].getSequenceFeatures() != null)
+ if (oldds != sequence.getDatasetSequence()
+ || sequence.getSequenceFeatures() != null)
{
if (command.oldds == null)
{
adjustFeatures(
command,
i,
- command.seqs[i].findPosition(command.position),
- command.seqs[i].findPosition(command.position
+ sequence.findPosition(command.position),
+ sequence.findPosition(command.position
+ command.number), false);
}
}
}
- if (command.seqs[i].getLength() < 1)
+ if (sequence.getLength() < 1)
{
- command.al.deleteSequence(command.seqs[i]);
+ command.al.deleteSequence(sequence);
seqDeleted = true;
}
}
adjustAnnotations(command, false, seqDeleted, views);
}
+ /**
+ * Perform the given Paste command. This may be to add cut or copied sequences
+ * to an alignment, or to undo a 'Cut' action on a region of the alignment.
+ *
+ * @param command
+ * @param views
+ */
void paste(Edit command, AlignmentI[] views)
{
StringBuffer tmp;
if (modifyVisibility && !insert)
{
// only occurs if a sequence was added or deleted.
- command.deletedAnnotationRows = new Hashtable();
+ command.deletedAnnotationRows = new Hashtable<SequenceI, AlignmentAnnotation[]>();
}
if (command.fullAlignmentHeight)
{
&& command.deletedAnnotationRows
.containsKey(command.seqs[s]))
{
- AlignmentAnnotation[] revealed = (AlignmentAnnotation[]) command.deletedAnnotationRows
+ AlignmentAnnotation[] revealed = command.deletedAnnotationRows
.get(command.seqs[s]);
command.seqs[s].setAlignmentAnnotation(revealed);
if (revealed != null)
if (!insert)
{
- command.deletedAnnotations = new Hashtable();
+ command.deletedAnnotations = new Hashtable<String, Annotation[]>();
}
int aSize;
&& command.deletedAnnotations
.containsKey(annotations[a].annotationId))
{
- Annotation[] restore = (Annotation[]) command.deletedAnnotations
+ Annotation[] restore = command.deletedAnnotations
.get(annotations[a].annotationId);
System.arraycopy(restore, 0, temp, command.position,
&& command.deletedAnnotations
.containsKey(annotations[a].annotationId))
{
- Annotation[] restore = (Annotation[]) command.deletedAnnotations
+ Annotation[] restore = command.deletedAnnotations
.get(annotations[a].annotationId);
temp = new Annotation[annotations[a].annotations.length
if (command.editedFeatures != null
&& command.editedFeatures.containsKey(seq))
{
- sequence.setSequenceFeatures((SequenceFeature[]) command.editedFeatures
+ sequence.setSequenceFeatures(command.editedFeatures
.get(seq));
}
if (command.editedFeatures == null)
{
- command.editedFeatures = new Hashtable();
+ command.editedFeatures = new Hashtable<SequenceI, SequenceFeature[]>();
}
command.editedFeatures.put(seq, oldsf);
boolean fullAlignmentHeight = false;
- Hashtable deletedAnnotationRows;
+ Hashtable<SequenceI, AlignmentAnnotation[]> deletedAnnotationRows;
- Hashtable deletedAnnotations;
+ Hashtable<String, Annotation[]> deletedAnnotations;
- Hashtable editedFeatures;
+ Hashtable<SequenceI, SequenceFeature[]> editedFeatures;
AlignmentI al;
- int command;
+ Action command;
char[][] string;
char gapChar;
- Edit(int command, SequenceI[] seqs, int position, int number,
+ Edit(Action command, SequenceI[] seqs, int position, int number,
char gapChar)
{
this.command = command;
this.gapChar = gapChar;
}
- Edit(int command, SequenceI[] seqs, int position, int number,
+ Edit(Action command, SequenceI[] seqs, int position, int number,
AlignmentI al)
{
this.gapChar = al.getGapCharacter();
fullAlignmentHeight = (al.getHeight() == seqs.length);
}
- Edit(int command, SequenceI[] seqs, int position, int number,
+ Edit(Action command, SequenceI[] seqs, int position, int number,
AlignmentI al, String replace)
{
this.command = command;
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
public class RemoveGapColCommand extends EditCommand
{
int startCol = -1, endCol = -1;
columnsDeleted = 0;
- edits = new Edit[0];
+ clearEdits();
boolean delete = true;
for (int i = start; i <= end; i++)
if (!delete && startCol > -1)
{
- this.appendEdit(DELETE_GAP, seqs, startCol - columnsDeleted, endCol
+ this.appendEdit(Action.DELETE_GAP, seqs, startCol - columnsDeleted,
+ endCol
- startCol, al, false, null);
columnsDeleted += (endCol - startCol);
// This is for empty columns at the
// end of the alignment
- this.appendEdit(DELETE_GAP, seqs, startCol - columnsDeleted, end
+ this.appendEdit(Action.DELETE_GAP, seqs, startCol - columnsDeleted,
+ end
- startCol + 1, al, false, null);
columnsDeleted += (end - startCol + 1);
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
public class RemoveGapsCommand extends EditCommand
{
int j, jSize;
- edits = new Edit[0];
+ clearEdits();
boolean delete = true;
char[] sequence;
if (!delete && startCol > -1)
{
- this.appendEdit(DELETE_GAP, new SequenceI[]
+ this.appendEdit(Action.DELETE_GAP, new SequenceI[]
{ seqs[s] }, start + startCol - deletedCols, endCol - startCol,
al, false, null);
}
if (delete && startCol > -1)
{
- this.appendEdit(DELETE_GAP, new SequenceI[]
+ this.appendEdit(Action.DELETE_GAP, new SequenceI[]
{ seqs[s] }, start + startCol - deletedCols, jSize - startCol, al,
false, null);
}
*/
package jalview.commands;
-import jalview.datamodel.*;
+import jalview.datamodel.SequenceI;
public class SlideSequencesCommand extends EditCommand
{
for (i = 0; i < lSize; i++)
{
for (j = 0; j < slideSize; j++)
+ {
if (!jalview.util.Comparison.isGap(seqsLeft[i].getCharAt(j)))
{
gapsInsertedBegin = true;
break;
}
+ }
}
+ Edit e = null;
+
if (!gapsInsertedBegin)
- edits = new Edit[]
- { new Edit(DELETE_GAP, seqsLeft, 0, slideSize, gapChar) };
+ {
+ e = new Edit(Action.DELETE_GAP, seqsLeft, 0, slideSize, gapChar);
+ setEdit(e);
+ }
else
- edits = new Edit[]
- { new Edit(INSERT_GAP, seqsRight, 0, slideSize, gapChar) };
+ {
+ e = new Edit(Action.INSERT_GAP, seqsRight, 0, slideSize, gapChar);
+ setEdit(e);
+ }
- performEdit(0, null);
+ performEdit(e, null);
}
public boolean getGapsInsertedBegin()
{
boolean same = false;
- if (command.edits[0].seqs.length == edits[0].seqs.length)
+ if (command.getEdit(0).seqs.length == getEdit(0).seqs.length)
{
same = true;
- for (int i = 0; i < command.edits[0].seqs.length; i++)
+ for (int i = 0; i < command.getEdit(0).seqs.length; i++)
{
- if (edits[0].seqs[i] != command.edits[0].seqs[i])
+ if (getEdit(0).seqs[i] != command.getEdit(0).seqs[i])
{
same = false;
}
if (same)
{
- Edit[] temp = new Edit[command.edits.length + 1];
- System.arraycopy(command.edits, 0, temp, 0, command.edits.length);
- command.edits = temp;
- command.edits[command.edits.length - 1] = edits[0];
+ command.addEdit(getEdit(0));
}
return same;
*/
package jalview.commands;
-import java.util.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.util.ShiftList;
-import jalview.datamodel.*;
-import jalview.util.*;
+import java.util.List;
public class TrimRegionCommand extends EditCommand
{
SequenceGroup selectionGroup;
- Vector deletedHiddenColumns;
+ List<int[]> deletedHiddenColumns;
int columnsDeleted;
columnsDeleted = column;
- edits = new Edit[]
- { new Edit(CUT, seqs, 0, column, al) };
+ setEdit(new Edit(Action.CUT, seqs, 0, column, al));
}
else if (command.equalsIgnoreCase(TRIM_RIGHT))
{
columnsDeleted = width - 1;
- edits = new Edit[]
- { new Edit(CUT, seqs, column + 1, width, al) };
+ setEdit(new Edit(Action.CUT, seqs, column + 1, width, al));
}
// We need to keep a record of the sequence start
// in order to restore the state after a redo
- int i, isize = edits[0].seqs.length;
+ int i, isize = getEdit(0).seqs.length;
start = new int[isize];
for (i = 0; i < isize; i++)
{
- start[i] = edits[0].seqs[i].getStart();
+ start[i] = getEdit(0).seqs[i].getStart();
}
performEdit(0, null);
int[] region;
for (int i = 0; i < deletedHiddenColumns.size(); i++)
{
- region = (int[]) deletedHiddenColumns.elementAt(i);
+ region = deletedHiddenColumns.get(i);
colSel.hideColumns(region[0], region[1]);
}
}
public SequenceI[] getSequencesArray()
{
if (sequences == null)
+ {
return null;
+ }
synchronized (sequences)
{
return sequences.toArray(new SequenceI[sequences.size()]);
}
}
if (hiddenSequences != null)
+ {
hiddenSequences.adjustHeightSequenceAdded();
+ }
}
/**
public void finalize()
{
if (getDataset() != null)
+ {
getDataset().removeAlignmentRef();
+ }
dataset = null;
sequences = null;
continue;
}
if (tIndex < temp.length)
+ {
temp[tIndex++] = annotations[i];
+ }
}
if (swap)
else if (dataset == null && data != null)
{
dataset = data;
+ for (int i = 0; i < getHeight(); i++)
+ {
+ SequenceI currentSeq = getSequenceAt(i);
+ SequenceI dsq = currentSeq.getDatasetSequence();
+ if (dsq == null)
+ {
+ dsq = currentSeq.createDatasetSequence();
+ dataset.addSequence(dsq);
+ }
+ else
+ {
+ while (dsq.getDatasetSequence() != null)
+ {
+ dsq = dsq.getDatasetSequence();
+ }
+ if (dataset.findIndex(dsq) == -1)
+ {
+ dataset.addSequence(dsq);
+ }
+ }
+ }
}
dataset.addAlignmentRef();
}
public void setProperty(Object key, Object value)
{
if (alignmentProperties == null)
+ {
alignmentProperties = new Hashtable();
+ }
alignmentProperties.put(key, value);
}
public Object getProperty(Object key)
{
if (alignmentProperties != null)
+ {
return alignmentProperties.get(key);
+ }
else
+ {
return null;
+ }
}
@Override
public void addCodonFrame(AlignedCodonFrame codons)
{
if (codons == null)
+ {
return;
+ }
if (codonFrameList == null)
{
codonFrameList = new AlignedCodonFrame[]
public AlignedCodonFrame[] getCodonFrame(SequenceI seq)
{
if (seq == null || codonFrameList == null)
+ {
return null;
+ }
Vector cframes = new Vector();
for (int f = 0; f < codonFrameList.length; f++)
{
if (codonFrameList[f].involvesSequence(seq))
+ {
cframes.addElement(codonFrameList[f]);
+ }
}
if (cframes.size() == 0)
+ {
return null;
+ }
AlignedCodonFrame[] cfr = new AlignedCodonFrame[cframes.size()];
cframes.copyInto(cfr);
return cfr;
public boolean removeCodonFrame(AlignedCodonFrame codons)
{
if (codons == null || codonFrameList == null)
+ {
return false;
+ }
boolean removed = false;
int i = 0, iSize = codonFrameList.length;
while (i < iSize)
return aa;
}
+ /**
+ * Returns an iterable collection of any annotations that match on given
+ * sequence ref, calcId and label (ignoring null values).
+ */
+ @Override
+ public Iterable<AlignmentAnnotation> findAnnotations(SequenceI seq,
+ String calcId, String label)
+ {
+ ArrayList<AlignmentAnnotation> aa = new ArrayList<AlignmentAnnotation>();
+ for (AlignmentAnnotation ann : getAlignmentAnnotation())
+ {
+ if (ann.getCalcId() != null && ann.getCalcId().equals(calcId)
+ && ann.sequenceRef != null && ann.sequenceRef == seq
+ && ann.label != null && ann.label.equals(label))
+ {
+ aa.add(ann);
+ }
+ }
+ return aa;
+ }
+
@Override
public void moveSelectedSequencesByOne(SequenceGroup sg,
Map<SequenceI, SequenceCollectionI> map, boolean up)
public SequenceFeature[] _rnasecstr = null;
/**
- * position of annotation resulting in invalid WUSS parsing or -1
+ * position of annotation resulting in invalid WUSS parsing or -1. -2 means
+ * there was no RNA structure in this annotation
*/
- private long invalidrnastruc = -1;
+ private long invalidrnastruc = -2;
/**
* Updates the _rnasecstr field Determines the positions that base pair and
isrna = true;
showAllColLabels = true;
scaleColLabel = true;
+ _markRnaHelices();
}
// System.out.println("featuregroup " + _rnasecstr[0].getFeatureGroup());
+
}
+ private void _markRnaHelices()
+ {
+ int mxval = 0;
+ // Figure out number of helices
+ // Length of rnasecstr is the number of pairs of positions that base pair
+ // with each other in the secondary structure
+ for (int x = 0; x < _rnasecstr.length; x++)
+ {
+
+ /*
+ * System.out.println(this.annotation._rnasecstr[x] + " Begin" +
+ * this.annotation._rnasecstr[x].getBegin());
+ */
+ // System.out.println(this.annotation._rnasecstr[x].getFeatureGroup());
+ int val = 0;
+ try
+ {
+ val = Integer.valueOf(_rnasecstr[x].getFeatureGroup());
+ if (mxval < val)
+ {
+ mxval = val;
+ }
+ } catch (NumberFormatException q)
+ {
+ }
+ ;
+
+ annotations[_rnasecstr[x].getBegin()].value = val;
+ annotations[_rnasecstr[x].getEnd()].value = val;
+
+ // annotations[_rnasecstr[x].getBegin()].displayCharacter = "" + val;
+ // annotations[_rnasecstr[x].getEnd()].displayCharacter = "" + val;
+ }
+ setScore(mxval);
+ }
/**
* map of positions in the associated annotation
*/
@Override
public char charAt(int index)
{
- String dc;
return ((index + offset < 0) || (index + offset) >= max
- || annotations[index + offset] == null || (dc = annotations[index
- + offset].displayCharacter.trim()).length() < 1) ? '.' : dc
- .charAt(0);
+ || annotations[index + offset] == null || (annotations[index
+ + offset].secondaryStructure < ' ') ? ' '
+ : annotations[index + offset].secondaryStructure);
}
public String toString()
for (int i = offset; i < mx; i++)
{
- String dc;
- string[i] = (annotations[i] == null || (dc = annotations[i].displayCharacter
- .trim()).length() < 1) ? '.' : dc.charAt(0);
+ string[i] = (annotations[i] == null || (annotations[i].secondaryStructure < 32)) ? ' '
+ : annotations[i].secondaryStructure;
}
return new String(string);
}
Iterable<AlignmentAnnotation> findAnnotation(String calcId);
+ Iterable<AlignmentAnnotation> findAnnotations(SequenceI seq,
+ String calcId, String label);
+
/**
* context for this annotated collection
*
*/
package jalview.datamodel;
-import java.util.*;
+import jalview.util.ShiftList;
-import jalview.util.*;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Vector;
/**
* NOTE: Columns are zero based.
* @param left
* shift in edit (+ve for removal, or -ve for inserts)
*/
- public Vector compensateForEdit(int start, int change)
+ public List<int[]> compensateForEdit(int start, int change)
{
- Vector deletedHiddenColumns = null;
+ List<int[]> deletedHiddenColumns = null;
for (int i = 0; i < size(); i++)
{
int temp = columnAt(i);
if (hiddenColumns != null)
{
- deletedHiddenColumns = new Vector();
+ deletedHiddenColumns = new ArrayList<int[]>();
int hSize = hiddenColumns.size();
for (int i = 0; i < hSize; i++)
{
int[] region = (int[]) hiddenColumns.elementAt(i);
if (region[0] > start && start + change > region[1])
{
- deletedHiddenColumns.addElement(hiddenColumns.elementAt(i));
+ deletedHiddenColumns.add(region);
hiddenColumns.removeElementAt(i);
i--;
public boolean isVisible(int column)
{
if (hiddenColumns != null)
+ {
for (int i = 0; i < hiddenColumns.size(); i++)
{
int[] region = (int[]) hiddenColumns.elementAt(i);
return false;
}
}
+ }
return true;
}
w += els.length;
}
if (w == 0)
+ {
return;
+ }
Enumeration e = annels.elements();
alignmentAnnotation.annotations = new Annotation[w];
w = 0;
*/
package jalview.datamodel;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
public class HiddenSequences
{
alignment.deleteSequence(sequence);
}
- public Vector showAll(
+ public List<SequenceI> showAll(
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
- Vector revealedSeqs = new Vector();
+ List<SequenceI> revealedSeqs = new ArrayList<SequenceI>();
for (int i = 0; i < hiddenSequences.length; i++)
{
if (hiddenSequences[i] != null)
{
- Vector tmp = showSequence(i, hiddenRepSequences);
- for (int t = 0; t < tmp.size(); t++)
+ List<SequenceI> tmp = showSequence(i, hiddenRepSequences);
+ for (SequenceI seq : tmp)
{
- revealedSeqs.addElement(tmp.elementAt(t));
+ revealedSeqs.add(seq);
}
}
}
return revealedSeqs;
}
- public Vector showSequence(int alignmentIndex,
+ public List<SequenceI> showSequence(int alignmentIndex,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
- Vector revealedSeqs = new Vector();
+ List<SequenceI> revealedSeqs = new ArrayList<SequenceI>();
SequenceI repSequence = alignment.getSequenceAt(alignmentIndex);
if (repSequence != null && hiddenRepSequences != null
&& hiddenRepSequences.containsKey(repSequence))
{
hiddenRepSequences.remove(repSequence);
- revealedSeqs.addElement(repSequence);
+ revealedSeqs.add(repSequence);
}
int start = adjustForHiddenSeqs(alignmentIndex - 1);
{
if (seq.getLength() > 0)
{
- revealedSeqs.addElement(seq);
+ revealedSeqs.add(seq);
asequences.add(alignmentIndex, seq);
}
else
return datasetSequence;
}
+ /**
+ * Returns a new array containing this sequence's annotations, or null.
+ */
public AlignmentAnnotation[] getAnnotation()
{
- if (annotation == null)
- {
- return null;
- }
-
- AlignmentAnnotation[] ret = new AlignmentAnnotation[annotation.size()];
- for (int r = 0; r < ret.length; r++)
- {
- ret[r] = annotation.elementAt(r);
- }
+ return annotation == null ? null : annotation
+ .toArray(new AlignmentAnnotation[annotation.size()]);
+ }
- return ret;
+ /**
+ * Returns true if this sequence has the given annotation (by object
+ * identity).
+ */
+ @Override
+ public boolean hasAnnotation(AlignmentAnnotation ann)
+ {
+ return annotation == null ? false : annotation.contains(ann);
}
+ /**
+ * Add the given annotation, if not already added, and set its sequence ref to
+ * be this sequence. Does nothing if this sequence's annotations already
+ * include this annotation (by identical object reference).
+ */
public void addAlignmentAnnotation(AlignmentAnnotation annotation)
{
if (this.annotation == null)
endRes = seqsel.endRes;
cs = seqsel.cs;
if (seqsel.description != null)
+ {
description = new String(seqsel.description);
+ }
hidecols = seqsel.hidecols;
hidereps = seqsel.hidereps;
idColour = seqsel.idColour;
}
}
if (!found)
+ {
continue;
+ }
}
AlignmentAnnotation newannot = new AlignmentAnnotation(
seq.getAnnotation()[a]);
}
/**
+ * Returns a list of annotations that match the specified sequenceRef, calcId
+ * and label, ignoring null values.
+ *
+ * @return list of AlignmentAnnotation objects
+ */
+ @Override
+ public Iterable<AlignmentAnnotation> findAnnotations(SequenceI seq,
+ String calcId, String label)
+ {
+ ArrayList<AlignmentAnnotation> aa = new ArrayList<AlignmentAnnotation>();
+ for (AlignmentAnnotation ann : getAlignmentAnnotation())
+ {
+ if (ann.getCalcId() != null && ann.getCalcId().equals(calcId)
+ && ann.sequenceRef != null && ann.sequenceRef == seq
+ && ann.label != null && ann.label.equals(label))
+ {
+ aa.add(ann);
+ }
+ }
+ return aa;
+ }
+
+ /**
* Answer true if any annotation matches the calcId passed in (if not null).
*
* @param calcId
public AlignmentAnnotation[] getAnnotation();
+ public boolean hasAnnotation(AlignmentAnnotation ann);
+
public void addAlignmentAnnotation(AlignmentAnnotation annotation);
public void removeAlignmentAnnotation(AlignmentAnnotation annotation);
--- /dev/null
+package jalview.exceptions;
+
+@SuppressWarnings("serial")
+public class JalviewException extends Exception
+{
+ public JalviewException(String exceptionMessage)
+ {
+ super(exceptionMessage);
+ }
+
+ public JalviewException()
+ {
+ super();
+ }
+
+ public JalviewException(String exceptionMessage, Throwable cause)
+ {
+ super(exceptionMessage, cause);
+ }
+
+ public JalviewException(Throwable cause)
+ {
+ super(cause);
+ }
+}
--- /dev/null
+package jalview.exceptions;
+
+@SuppressWarnings("serial")
+public class NoFileSelectedException extends JalviewException
+{
+ public NoFileSelectedException(String msg)
+ {
+ super(msg);
+ }
+}
seqs.add(sq);
if (!isNa)
{
+ String mt = model.getModelTitle() == null ? getDataName()
+ : model.getModelTitle();
+ if (_lastChainId >= ' ')
+ {
+ mt += _lastChainId;
+ }
AlignmentAnnotation ann = new AlignmentAnnotation(
"Secondary Structure",
- "Secondary Structure from PDB File", asecstr);
+ "Secondary Structure for " + mt, asecstr);
ann.belowAlignment=true;
ann.visible=true;
ann.autoCalculated=false;
private boolean loadingFromArchive = false;
/**
- * second flag to indicate if the jmol viewer should ignore sequence colouring
- * events from the structure manager because the GUI is still setting up
+ * second flag to indicate if the Chimera viewer should ignore sequence
+ * colouring events from the structure manager because the GUI is still
+ * setting up
*/
private boolean loadingFinished = true;
/**
- * state flag used to check if the Jmol viewer's paint method can be called
+ * state flag used to check if the Chimera viewer's paint method can be called
*/
private boolean finishedInit = false;
} catch (Error e)
{
}
- // Explicitly map to the filename used by Jmol ;
+ // Explicitly map to the filename used by Chimera ;
// pdbentry[pe].getFile(), protocol);
if (ssm != null)
}
viewer = new ChimeraManager(
csm = new ext.edu.ucsf.rbvi.strucviz2.StructureManager(true));
- /*
- * viewer = JmolViewer.allocateViewer(renderPanel, new SmarterJmolAdapter(),
- * "jalviewJmol", ap.av.applet .getDocumentBase(),
- * ap.av.applet.getCodeBase(), "", this);
- *
- * jmolpopup = JmolPopup.newJmolPopup(viewer, true, "Jmol", true);
- */
}
public JalviewChimeraBinding(StructureSelectionManager ssm,
{
viewer.exitChimera();
}
- // viewer.evalStringQuiet("zap");
- // viewer.setJmolStatusListener(null);
lastCommand = null;
viewer = null;
releaseUIResources();
}
/**
- * called by JalviewJmolbinding after closeViewer is called - release any
+ * called by JalviewChimerabinding after closeViewer is called - release any
* resources and references so they can be garbage collected.
*/
protected abstract void releaseUIResources();
public void colourByChain()
{
colourBySequence = false;
- // TODO: colour by chain should colour each chain distinctly across all
- // visible models
- // TODO: http://issues.jalview.org/browse/JAL-628
- evalStateCommand("select *;color chain",false);
+ evalStateCommand("rainbow chain", false);
}
public void colourByCharge()
{
colourBySequence = false;
- evalStateCommand("colour *;color white;select ASP,GLU;color red;"
- + "select LYS,ARG;color blue;select CYS;color yellow", false);
+ evalStateCommand(
+ "color white;color red ::ASP;color red ::GLU;color blue ::LYS;color blue ::ARG;color yellow ::CYS",
+ false);
}
/**
assert (_alignment.length == _refStructure.length && _alignment.length != _hiddenCols.length);
StringBuilder allComs = new StringBuilder(128); // Chimera superposition cmd
String[] files = getPdbFile();
- // check to see if we are still waiting for Jmol files
+ // check to see if we are still waiting for Chimera files
long starttime = System.currentTimeMillis();
boolean waiting = true;
do
private void waitForChimera()
{
- while (viewer.isBusy())
+ while (viewer != null && viewer.isBusy())
{
try {
Thread.sleep(15);
}
}
- boolean debug = true;
+ boolean debug = false;
private void log(String message)
{
private void viewerCommandHistory(boolean enable)
{
- log("(Not yet implemented) History "
- + ((debug || enable) ? "on" : "off"));
+ // log("(Not yet implemented) History "
+ // + ((debug || enable) ? "on" : "off"));
}
public void loadInline(String string)
String res;
int index;
Color col;
+ // Chimera expects RBG values in the range 0-1
+ final double normalise = 255D;
viewerCommandHistory(false);
// TODO: Switch between nucleotide or aa selection expressions
Enumeration en = ResidueProperties.aa3Hash.keys();
- StringBuffer command = new StringBuffer("select *;color white;");
+ StringBuilder command = new StringBuilder(128);
+ command.append("color white;");
while (en.hasMoreElements())
{
res = en.nextElement().toString();
}
col = cs.findColour(ResidueProperties.aa[index].charAt(0));
- // TODO: need colour string function and res selection here
- command.append("select " + res + ";color[" + col.getRed() + ","
- + col.getGreen() + "," + col.getBlue() + "];");
+ command.append("color " + col.getRed() / normalise + ","
+ + col.getGreen() / normalise + "," + col.getBlue()
+ / normalise + " ::" + res + ";");
}
evalStateCommand(command.toString(),false);
viewerCommandHistory(true);
}
- public void showHelp()
- {
- // chimera help
- showUrl("http://jmol.sourceforge.net/docs/JmolUserGuide/", "jmolHelp");
- }
-
/**
- * open the URL somehow
- *
- * @param target
- */
- public abstract void showUrl(String url, String target);
-
- /**
- * called when the binding thinks the UI needs to be refreshed after a Jmol
+ * called when the binding thinks the UI needs to be refreshed after a Chimera
* state change. this could be because structures were loaded, or because an
- * error has occured.
+ * error has occurred.
*/
public abstract void refreshGUI();
/**
*
- * @return true if Jmol is still restoring state or loading is still going on
- * (see setFinsihedLoadingFromArchive)
+ * @return true if Chimeral is still restoring state or loading is still going
+ * on (see setFinsihedLoadingFromArchive)
*/
public boolean isLoadingFromArchive()
{
loadingFinished = finishedLoading;
}
- public void setBackgroundColour(java.awt.Color col)
+ /**
+ * Send the Chimera 'background solid <color>" command.
+ *
+ * @see https
+ * ://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/background
+ * .html
+ * @param col
+ */
+ public void setBackgroundColour(Color col)
{
viewerCommandHistory(false);
- // todo set background colour
- viewer.sendChimeraCommand(
- "background [" + col.getRed() + "," + col.getGreen() + ","
- + col.getBlue() + "];", false);
+ double normalise = 255D;
+ final String command = "background solid " + col.getRed() / normalise + ","
+ + col.getGreen() / normalise + "," + col.getBlue()
+ / normalise + ";";
+ viewer.sendChimeraCommand(command, false);
viewerCommandHistory(true);
}
import jalview.analysis.SequenceIdMatcher;
import jalview.api.AlignViewControllerGuiI;
import jalview.api.AlignViewControllerI;
+import jalview.api.AlignmentViewPanel;
import jalview.api.analysis.ScoreModelI;
import jalview.bin.Cache;
import jalview.commands.CommandI;
import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
import jalview.commands.OrderCommand;
import jalview.commands.RemoveGapColCommand;
import jalview.commands.RemoveGapsCommand;
import jalview.io.FeaturesFile;
import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
-import jalview.io.HTMLOutput;
+import jalview.io.HtmlSvgOutput;
import jalview.io.IdentifyFile;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
.getKeyCode() <= KeyEvent.VK_NUMPAD9))
&& Character.isDigit(evt.getKeyChar()))
{
- alignPanel.seqPanel.numberPressed(evt.getKeyChar());
+ alignPanel.getSeqPanel().numberPressed(evt.getKeyChar());
}
switch (evt.getKeyCode())
}
if (viewport.cursorMode)
{
- alignPanel.seqPanel.moveCursor(0, 1);
+ alignPanel.getSeqPanel().moveCursor(0, 1);
}
break;
}
if (viewport.cursorMode)
{
- alignPanel.seqPanel.moveCursor(0, -1);
+ alignPanel.getSeqPanel().moveCursor(0, -1);
}
break;
case KeyEvent.VK_LEFT:
if (evt.isAltDown() || !viewport.cursorMode)
{
- slideSequences(false, alignPanel.seqPanel.getKeyboardNo1());
+ slideSequences(false, alignPanel.getSeqPanel().getKeyboardNo1());
}
else
{
- alignPanel.seqPanel.moveCursor(-1, 0);
+ alignPanel.getSeqPanel().moveCursor(-1, 0);
}
break;
case KeyEvent.VK_RIGHT:
if (evt.isAltDown() || !viewport.cursorMode)
{
- slideSequences(true, alignPanel.seqPanel.getKeyboardNo1());
+ slideSequences(true, alignPanel.getSeqPanel().getKeyboardNo1());
}
else
{
- alignPanel.seqPanel.moveCursor(1, 0);
+ alignPanel.getSeqPanel().moveCursor(1, 0);
}
break;
case KeyEvent.VK_SPACE:
if (viewport.cursorMode)
{
- alignPanel.seqPanel.insertGapAtCursor(evt.isControlDown()
+ alignPanel.getSeqPanel().insertGapAtCursor(evt.isControlDown()
|| evt.isShiftDown() || evt.isAltDown());
}
break;
}
else
{
- alignPanel.seqPanel.deleteGapAtCursor(evt.isControlDown()
+ alignPanel.getSeqPanel().deleteGapAtCursor(evt.isControlDown()
|| evt.isShiftDown() || evt.isAltDown());
}
case KeyEvent.VK_S:
if (viewport.cursorMode)
{
- alignPanel.seqPanel.setCursorRow();
+ alignPanel.getSeqPanel().setCursorRow();
}
break;
case KeyEvent.VK_C:
if (viewport.cursorMode && !evt.isControlDown())
{
- alignPanel.seqPanel.setCursorColumn();
+ alignPanel.getSeqPanel().setCursorColumn();
}
break;
case KeyEvent.VK_P:
if (viewport.cursorMode)
{
- alignPanel.seqPanel.setCursorPosition();
+ alignPanel.getSeqPanel().setCursorPosition();
}
break;
case KeyEvent.VK_COMMA:
if (viewport.cursorMode)
{
- alignPanel.seqPanel.setCursorRowAndColumn();
+ alignPanel.getSeqPanel().setCursorRowAndColumn();
}
break;
case KeyEvent.VK_Q:
if (viewport.cursorMode)
{
- alignPanel.seqPanel.setSelectionAreaAtCursor(true);
+ alignPanel.getSeqPanel().setSelectionAreaAtCursor(true);
}
break;
case KeyEvent.VK_M:
if (viewport.cursorMode)
{
- alignPanel.seqPanel.setSelectionAreaAtCursor(false);
+ alignPanel.getSeqPanel().setSelectionAreaAtCursor(false);
}
break;
{ (viewport.cursorMode ? "on" : "off") }));
if (viewport.cursorMode)
{
- alignPanel.seqPanel.seqCanvas.cursorX = viewport.startRes;
- alignPanel.seqPanel.seqCanvas.cursorY = viewport.startSeq;
+ alignPanel.getSeqPanel().seqCanvas.cursorX = viewport.startRes;
+ alignPanel.getSeqPanel().seqCanvas.cursorY = viewport.startSeq;
}
- alignPanel.seqPanel.seqCanvas.repaint();
+ alignPanel.getSeqPanel().seqCanvas.repaint();
break;
case KeyEvent.VK_F1:
abovePIDThreshold.setSelected(av.getAbovePIDThreshold());
conservationMenuItem.setSelected(av.getConservationSelected());
seqLimits.setSelected(av.getShowJVSuffix());
- idRightAlign.setSelected(av.rightAlignIds);
+ idRightAlign.setSelected(av.isRightAlignIds());
centreColumnLabelsMenuItem.setState(av.centreColumnLabels);
renderGapsMenuItem.setSelected(av.renderGaps);
wrapMenuItem.setSelected(av.wrapAlignment);
scaleAbove.setVisible(av.wrapAlignment);
scaleLeft.setVisible(av.wrapAlignment);
scaleRight.setVisible(av.wrapAlignment);
- annotationPanelMenuItem.setState(av.showAnnotation);
+ annotationPanelMenuItem.setState(av.isShowAnnotation());
/*
* Show/hide annotations only enabled if annotation panel is shown
*/
public FeatureRenderer getFeatureRenderer()
{
- return alignPanel.seqPanel.seqCanvas.getFeatureRenderer();
+ return alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer();
}
@Override
@Override
protected void htmlMenuItem_actionPerformed(ActionEvent e)
{
- new HTMLOutput(alignPanel,
- alignPanel.seqPanel.seqCanvas.getSequenceRenderer(),
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer());
+ // new HTMLOutput(alignPanel,
+ // alignPanel.getSeqPanel().seqCanvas.getSequenceRenderer(),
+ // alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer());
+ new HtmlSvgOutput(null, alignPanel);
}
@Override
public void bioJSMenuItem_actionPerformed(ActionEvent e)
{
new BioJsHTMLOutput(alignPanel,
- alignPanel.seqPanel.seqCanvas.getSequenceRenderer(),
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer());
+ alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer());
}
public void createImageMap(File file, String image)
{
public void exportAnnotations_actionPerformed(ActionEvent e)
{
new AnnotationExporter().exportAnnotations(alignPanel,
- viewport.showAnnotation ? viewport.getAlignment()
+ viewport.isShowAnnotation() ? viewport.getAlignment()
.getAlignmentAnnotation() : null, viewport
.getAlignment().getGroups(), ((Alignment) viewport
.getAlignment()).alignmentProperties);
if (viewport.historyList.size() > 0)
{
undoMenuItem.setEnabled(true);
- CommandI command = (CommandI) viewport.historyList.peek();
+ CommandI command = viewport.historyList.peek();
undoMenuItem.setText(MessageManager.formatMessage(
"label.undo_command", new String[]
{ command.getDescription() }));
{
redoMenuItem.setEnabled(true);
- CommandI command = (CommandI) viewport.redoList.peek();
+ CommandI command = viewport.redoList.peek();
redoMenuItem.setText(MessageManager.formatMessage(
"label.redo_command", new String[]
{ command.getDescription() }));
{
return;
}
- CommandI command = (CommandI) viewport.historyList.pop();
+ CommandI command = viewport.historyList.pop();
viewport.redoList.push(command);
command.undoCommand(getViewAlignments());
return;
}
- CommandI command = (CommandI) viewport.redoList.pop();
+ CommandI command = viewport.redoList.pop();
viewport.historyList.push(command);
command.doCommand(getViewAlignments());
if (viewport.cursorMode)
{
sg.add(viewport.getAlignment().getSequenceAt(
- alignPanel.seqPanel.seqCanvas.cursorY));
+ alignPanel.getSeqPanel().seqCanvas.cursorY));
}
else if (viewport.getSelectionGroup() != null
&& viewport.getSelectionGroup().getSize() != viewport
{
if (viewport.cursorMode)
{
- alignPanel.seqPanel.moveCursor(size, 0);
+ alignPanel.getSeqPanel().moveCursor(size, 0);
}
else
{
{
if (viewport.cursorMode)
{
- alignPanel.seqPanel.moveCursor(-size, 0);
+ alignPanel.getSeqPanel().moveCursor(-size, 0);
}
else
{
// /////
// ADD HISTORY ITEM
//
- addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE,
+ addHistoryItem(new EditCommand(
+ MessageManager.getString("label.add_sequences"),
+ Action.PASTE,
sequences, 0, alignment.getWidth(), alignment));
}
// Add any annotations attached to sequences
// >>>This is a fix for the moment, until a better solution is
// found!!<<<
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer()
+ af.alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer()
.transferSettings(
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer());
+ alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer());
// TODO: maintain provenance of an alignment, rather than just make the
// title a concatenation of operations.
// >>>This is a fix for the moment, until a better solution is
// found!!<<<
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer()
+ af.alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer()
.transferSettings(
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer());
+ alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer());
// TODO: maintain provenance of an alignment, rather than just make the
// title a concatenation of operations.
/*
* //ADD HISTORY ITEM
*/
- addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut,
- sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
+ addHistoryItem(new EditCommand(
+ MessageManager.getString("label.cut_sequences"), Action.CUT,
+ cut, sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1,
viewport.getAlignment()));
viewport.setSelectionGroup(null);
{
if (viewport.cursorMode)
{
- alignPanel.seqPanel.keyboardNo1 = null;
- alignPanel.seqPanel.keyboardNo2 = null;
+ alignPanel.getSeqPanel().keyboardNo1 = null;
+ alignPanel.getSeqPanel().keyboardNo2 = null;
}
viewport.setSelectionGroup(null);
viewport.getColumnSelection().clear();
viewport.setSelectionGroup(null);
- alignPanel.seqPanel.seqCanvas.highlightSearchResults(null);
- alignPanel.idPanel.idCanvas.searchResults = null;
+ alignPanel.getSeqPanel().seqCanvas.highlightSearchResults(null);
+ alignPanel.getIdPanel().getIdCanvas().searchResults = null;
alignPanel.paintAlignment(true);
PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
viewport.sendSelection();
{
viewport.setShowJVSuffix(seqLimits.isSelected());
- alignPanel.idPanel.idCanvas.setPreferredSize(alignPanel
+ alignPanel.getIdPanel().getIdCanvas().setPreferredSize(alignPanel
.calculateIdWidth());
alignPanel.paintAlignment(true);
}
@Override
public void idRightAlign_actionPerformed(ActionEvent e)
{
- viewport.rightAlignIds = idRightAlign.isSelected();
+ viewport.setRightAlignIds(idRightAlign.isSelected());
alignPanel.paintAlignment(true);
}
if (viewport.followHighlight = this.followHighlightMenuItem.getState())
{
alignPanel.scrollToPosition(
- alignPanel.seqPanel.seqCanvas.searchResults, false);
+ alignPanel.getSeqPanel().seqCanvas.searchResults, false);
}
}
*/
msa = viewport.getAlignmentView(true);
}
+ else if (viewport.getSelectionGroup() != null
+ && viewport.getSelectionGroup().getSize() == 1)
+ {
+ int option = JOptionPane.showConfirmDialog(this,
+ MessageManager.getString("warn.oneseq_msainput_selection"),
+ MessageManager.getString("label.invalid_selection"),
+ JOptionPane.OK_CANCEL_OPTION);
+ if (option == JOptionPane.OK_OPTION)
+ {
+ msa = viewport.getAlignmentView(false);
+ }
+ }
else
{
- /*
- * Vector seqs = viewport.getAlignment().getSequences();
- *
- * if (seqs.size() > 1) { msa = new SequenceI[seqs.size()];
- *
- * for (int i = 0; i < seqs.size(); i++) { msa[i] = (SequenceI)
- * seqs.elementAt(i); } }
- */
msa = viewport.getAlignmentView(false);
}
return msa;
try
{
featuresFile = new FeaturesFile(file, type).parse(viewport
- .getAlignment().getDataset(), alignPanel.seqPanel.seqCanvas
+ .getAlignment().getDataset(), alignPanel.getSeqPanel().seqCanvas
.getFeatureRenderer().getFeatureColours(), false,
jalview.bin.Cache.getDefault("RELAXEDSEQIDMATCHING", false));
} catch (Exception ex)
{
viewport.setShowSequenceFeatures(true);
showSeqFeatures.setSelected(true);
- if (alignPanel.seqPanel.seqCanvas.fr != null)
+ if (alignPanel.getSeqPanel().seqCanvas.fr != null)
{
// update the min/max ranges where necessary
- alignPanel.seqPanel.seqCanvas.fr.findAllFeatures(true);
+ alignPanel.getSeqPanel().seqCanvas.fr.findAllFeatures(true);
}
if (featureSettings != null)
{
aa.visible = visible;
}
}
- this.alignPanel.paintAlignment(true);
+ alignPanel.validateAnnotationDimensions(false);
+ alignPanel.alignmentChanged();
}
/**
.setShowAutocalculatedAbove(isShowAutoCalculatedAbove());
alignPanel.paintAlignment(true);
}
+
+ /**
+ *
+ * @return alignment panels in this alignemnt frame
+ */
+ public List<AlignmentViewPanel> getAlignPanels()
+ {
+ return alignPanels == null ? Arrays.asList(alignPanel) : alignPanels;
+ }
}
class PrintThread extends Thread
import jalview.analysis.NJTree;
import jalview.api.AlignViewportI;
import jalview.bin.Cache;
-import jalview.datamodel.AlignmentAnnotation;
+import jalview.commands.CommandI;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.Sequence;
boolean renderGaps = true;
- boolean showAnnotation = true;
-
SequenceAnnotationOrder sortAnnotationsBy = null;
int charHeight;
boolean gatherViewsHere = false;
- Stack historyList = new Stack();
+ Stack<CommandI> historyList = new Stack<CommandI>();
- Stack redoList = new Stack();
+ Stack<CommandI> redoList = new Stack<CommandI>();
int thresholdTextColour = 0;
Color textColour = Color.black;
Color textColour2 = Color.white;
-
- boolean rightAlignIds = false;
-
/**
* Creates a new AlignViewport object.
*
antiAlias = Cache.getDefault("ANTI_ALIAS", false);
showJVSuffix = Cache.getDefault("SHOW_JVSUFFIX", true);
- showAnnotation = Cache.getDefault("SHOW_ANNOTATIONS", true);
+ setShowAnnotation(Cache.getDefault("SHOW_ANNOTATIONS", true));
- rightAlignIds = Cache.getDefault("RIGHT_ALIGN_IDS", false);
+ setRightAlignIds(Cache.getDefault("RIGHT_ALIGN_IDS", false));
centreColumnLabels = Cache.getDefault("CENTRE_COLUMN_LABELS", false);
autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);
false);
showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false);
showConsensus = Cache.getDefault("SHOW_IDENTITY", true);
- consensus = new AlignmentAnnotation("Consensus", "PID",
- new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
- consensus.hasText = true;
- consensus.autoCalculated = true;
}
initAutoAnnotation();
if (jalview.bin.Cache.getProperty("DEFAULT_COLOUR") != null)
*
* @return DOCUMENT ME!
*/
- public boolean getShowAnnotation()
- {
- return showAnnotation;
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param b
- * DOCUMENT ME!
- */
- public void setShowAnnotation(boolean b)
- {
- showAnnotation = b;
- }
-
- /**
- * DOCUMENT ME!
- *
- * @return DOCUMENT ME!
- */
public boolean getScaleAboveWrapped()
{
return scaleAboveWrapped;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.jbgui.GAlignmentPanel;
+import jalview.math.AlignmentDimension;
import jalview.schemes.ResidueProperties;
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
OverviewPanel overviewPanel;
- SeqPanel seqPanel;
+ private SeqPanel seqPanel;
- IdPanel idPanel;
+ private IdPanel idPanel;
+ private boolean headless;
IdwidthAdjuster idwidthAdjuster;
/** DOCUMENT ME!! */
public AlignFrame alignFrame;
- ScalePanel scalePanel;
+ private ScalePanel scalePanel;
- AnnotationPanel annotationPanel;
+ private AnnotationPanel annotationPanel;
- AnnotationLabels alabels;
+ private AnnotationLabels alabels;
// this value is set false when selection area being dragged
boolean fastPaint = true;
{
alignFrame = af;
this.av = av;
- seqPanel = new SeqPanel(av, this);
- idPanel = new IdPanel(av, this);
+ setSeqPanel(new SeqPanel(av, this));
+ setIdPanel(new IdPanel(av, this));
- scalePanel = new ScalePanel(av, this);
+ setScalePanel(new ScalePanel(av, this));
- idPanelHolder.add(idPanel, BorderLayout.CENTER);
+ idPanelHolder.add(getIdPanel(), BorderLayout.CENTER);
idwidthAdjuster = new IdwidthAdjuster(this);
idSpaceFillerPanel1.add(idwidthAdjuster, BorderLayout.CENTER);
- annotationPanel = new AnnotationPanel(this);
- alabels = new AnnotationLabels(this);
+ setAnnotationPanel(new AnnotationPanel(this));
+ setAlabels(new AnnotationLabels(this));
- annotationScroller.setViewportView(annotationPanel);
- annotationSpaceFillerHolder.add(alabels, BorderLayout.CENTER);
+ annotationScroller.setViewportView(getAnnotationPanel());
+ annotationSpaceFillerHolder.add(getAlabels(), BorderLayout.CENTER);
- scalePanelHolder.add(scalePanel, BorderLayout.CENTER);
- seqPanelHolder.add(seqPanel, BorderLayout.CENTER);
+ scalePanelHolder.add(getScalePanel(), BorderLayout.CENTER);
+ seqPanelHolder.add(getSeqPanel(), BorderLayout.CENTER);
setScrollValues(0, 0);
idSpaceFillerPanel1.setPreferredSize(new Dimension(10, av.charHeight
+ fm.getDescent()));
- idPanel.idCanvas.gg = null;
- seqPanel.seqCanvas.img = null;
- annotationPanel.adjustPanelHeight();
+ getIdPanel().getIdCanvas().gg = null;
+ getSeqPanel().seqCanvas.img = null;
+ getAnnotationPanel().adjustPanelHeight();
Dimension d = calculateIdWidth();
d.setSize(d.width + 4, d.height);
- idPanel.idCanvas.setPreferredSize(d);
+ getIdPanel().getIdCanvas().setPreferredSize(d);
hscrollFillerPanel.setPreferredSize(d);
if (overviewPanel != null)
if (al.getAlignmentAnnotation() != null)
{
- fm = c.getFontMetrics(alabels.getFont());
+ fm = c.getFontMetrics(getAlabels().getFont());
while (i < al.getAlignmentAnnotation().length)
{
public void highlightSearchResults(SearchResults results)
{
scrollToPosition(results);
- seqPanel.seqCanvas.highlightSearchResults(results);
+ getSeqPanel().seqCanvas.highlightSearchResults(results);
}
/**
void scrollToWrappedVisible(int res)
{
- int cwidth = seqPanel.seqCanvas
- .getWrappedCanvasWidth(seqPanel.seqCanvas.getWidth());
+ int cwidth = getSeqPanel().seqCanvas
+ .getWrappedCanvasWidth(getSeqPanel().seqCanvas.getWidth());
if (res < av.getStartRes() || res >= (av.getStartRes() + cwidth))
{
vscroll.setValue((res / cwidth));
*/
protected void validateAnnotationDimensions(boolean adjustPanelHeight)
{
- int height = annotationPanel.adjustPanelHeight();
+ int height = getAnnotationPanel().adjustPanelHeight();
int theight = av.getCharHeight()
* (av.getAlignment().getHeight() + (!av.hasHiddenRows() ? 0
annotationScroller.setVisible(false);
annotationSpaceFillerHolder.setVisible(false);
}
- else if (av.showAnnotation)
+ else if (av.isShowAnnotation())
{
annotationScroller.setVisible(true);
annotationSpaceFillerHolder.setVisible(true);
width = av.getColumnSelection().findColumnPosition(width);
}
- av.setEndRes((x + (seqPanel.seqCanvas.getWidth() / av.charWidth)) - 1);
+ av.setEndRes((x + (getSeqPanel().seqCanvas.getWidth() / av.charWidth)) - 1);
- hextent = seqPanel.seqCanvas.getWidth() / av.charWidth;
- vextent = seqPanel.seqCanvas.getHeight() / av.charHeight;
+ hextent = getSeqPanel().seqCanvas.getWidth() / av.charWidth;
+ vextent = getSeqPanel().seqCanvas.getHeight() / av.charHeight;
if (hextent > width)
{
{
int x = hscroll.getValue();
av.setStartRes(x);
- av.setEndRes((x + (seqPanel.seqCanvas.getWidth() / av.getCharWidth())) - 1);
+ av.setEndRes((x + (getSeqPanel().seqCanvas.getWidth() / av.getCharWidth())) - 1);
}
if (evt.getSource() == vscroll)
{
if (offy > -1)
{
- int rowSize = seqPanel.seqCanvas
- .getWrappedCanvasWidth(seqPanel.seqCanvas.getWidth());
+ int rowSize = getSeqPanel().seqCanvas
+ .getWrappedCanvasWidth(getSeqPanel().seqCanvas.getWidth());
av.setStartRes(offy * rowSize);
av.setEndRes((offy + 1) * rowSize);
}
{
av.setStartSeq(offy);
av.setEndSeq(offy
- + (seqPanel.seqCanvas.getHeight() / av.getCharHeight()));
+ + (getSeqPanel().seqCanvas.getHeight() / av.getCharHeight()));
}
}
if (scrollX != 0 || scrollY != 0)
{
- idPanel.idCanvas.fastPaint(scrollY);
- seqPanel.seqCanvas.fastPaint(scrollX, scrollY);
- scalePanel.repaint();
+ getIdPanel().getIdCanvas().fastPaint(scrollY);
+ getSeqPanel().seqCanvas.fastPaint(scrollX, scrollY);
+ getScalePanel().repaint();
if (av.getShowAnnotation() && scrollX != 0)
{
- annotationPanel.fastPaint(scrollX);
+ getAnnotationPanel().fastPaint(scrollX);
}
}
}
{
invalidate();
- Dimension d = idPanel.idCanvas.getPreferredSize();
+ Dimension d = getIdPanel().getIdCanvas().getPreferredSize();
idPanelHolder.setPreferredSize(d);
hscrollFillerPanel.setPreferredSize(new Dimension(d.width, 12));
validate();
maxwidth = av.getColumnSelection().findColumnPosition(maxwidth) - 1;
}
- int canvasWidth = seqPanel.seqCanvas
- .getWrappedCanvasWidth(seqPanel.seqCanvas.getWidth());
+ int canvasWidth = getSeqPanel().seqCanvas
+ .getWrappedCanvasWidth(getSeqPanel().seqCanvas.getWidth());
if (canvasWidth > 0)
{
int max = maxwidth
- / seqPanel.seqCanvas
- .getWrappedCanvasWidth(seqPanel.seqCanvas
+ / getSeqPanel().seqCanvas
+ .getWrappedCanvasWidth(getSeqPanel().seqCanvas
.getWidth()) + 1;
vscroll.setMaximum(max);
vscroll.setUnitIncrement(1);
int pagesHigh = ((av.getAlignment().getHeight() / totalSeq) + 1)
* pheight;
- if (av.showAnnotation)
+ if (av.isShowAnnotation())
{
- pagesHigh += annotationPanel.adjustPanelHeight() + 3;
+ pagesHigh += getAnnotationPanel().adjustPanelHeight() + 3;
}
pagesHigh /= pheight;
// draw Scale
pg.translate(idWidth, 0);
- scalePanel.drawScale(pg, startRes, endRes, pwidth - idWidth,
+ getScalePanel().drawScale(pg, startRes, endRes, pwidth - idWidth,
scaleHeight);
pg.translate(-idWidth, scaleHeight);
Color currentColor = null;
Color currentTextColor = null;
- pg.setFont(idPanel.idCanvas.idfont);
+ pg.setFont(getIdPanel().getIdCanvas().getIdfont());
SequenceI seq;
for (int i = startSeq; i < endSeq; i++)
pg.setColor(currentTextColor);
int xPos = 0;
- if (av.rightAlignIds)
+ if (av.isRightAlignIds())
{
fm = pg.getFontMetrics();
xPos = idWidth
// draw main sequence panel
pg.translate(idWidth, 0);
- seqPanel.seqCanvas.drawPanel(pg, startRes, endRes, startSeq, endSeq, 0);
+ getSeqPanel().seqCanvas.drawPanel(pg, startRes, endRes, startSeq, endSeq, 0);
- if (av.showAnnotation && (endSeq == av.getAlignment().getHeight()))
+ if (av.isShowAnnotation() && (endSeq == av.getAlignment().getHeight()))
{
// draw annotation - need to offset for current scroll position
- int offset = -alabels.scrollOffset;
+ int offset = -getAlabels().getScrollOffset();
pg.translate(0, offset);
pg.translate(-idWidth - 3, (endSeq - startSeq) * av.charHeight + 3);
- alabels.drawComponent(pg, idWidth);
+ getAlabels().drawComponent(pg, idWidth);
pg.translate(idWidth + 3, 0);
- annotationPanel.renderer.drawComponent(annotationPanel, av,
+ getAnnotationPanel().renderer.drawComponent(getAnnotationPanel(), av,
pg, -1, startRes, endRes + 1);
pg.translate(0, -offset);
}
int annotationHeight = 0;
AnnotationLabels labels = null;
- if (av.showAnnotation)
+ if (av.isShowAnnotation())
{
- annotationHeight = annotationPanel.adjustPanelHeight();
+ annotationHeight = getAnnotationPanel().adjustPanelHeight();
labels = new AnnotationLabels(av);
}
maxwidth = av.getColumnSelection().findColumnPosition(maxwidth) - 1;
}
- int resWidth = seqPanel.seqCanvas.getWrappedCanvasWidth(pwidth
+ int resWidth = getSeqPanel().seqCanvas.getWrappedCanvasWidth(pwidth
- idWidth);
int totalHeight = cHeight * (maxwidth / resWidth + 1);
{
for (int i = 0; i < av.getAlignment().getHeight(); i++)
{
- pg.setFont(idPanel.idCanvas.idfont);
+ pg.setFont(getIdPanel().getIdCanvas().getIdfont());
SequenceI s = av.getAlignment().getSequenceAt(i);
String string = s.getDisplayId(av.getShowJVSuffix());
int xPos = 0;
- if (av.rightAlignIds)
+ if (av.isRightAlignIds())
{
FontMetrics fm = pg.getFontMetrics();
xPos = idWidth - fm.stringWidth(string) - 4;
pg.translate(idWidth, 0);
- seqPanel.seqCanvas.drawWrappedPanel(pg, pwidth - idWidth, totalHeight,
+ getSeqPanel().seqCanvas.drawWrappedPanel(pg, pwidth - idWidth, totalHeight,
0);
if ((pi * pheight) < totalHeight)
*
* @return
*/
- int getVisibleIdWidth()
+ public int getVisibleIdWidth()
{
return getVisibleIdWidth(true);
}
* be returned
* @return
*/
- int getVisibleIdWidth(boolean onscreen)
+ public int getVisibleIdWidth(boolean onscreen)
{
// see if rendering offscreen - check preferences and calc width accordingly
if (!onscreen && Cache.getDefault("FIGURE_AUTOIDWIDTH", false))
if (onscreen
|| (idwidth = Cache.getIntegerProperty("FIGURE_FIXEDIDWIDTH")) == null)
{
- return (idPanel.getWidth() > 0 ? idPanel.getWidth()
+ return (getIdPanel().getWidth() > 0 ? getIdPanel().getWidth()
: calculateIdWidth().width + 4);
}
return idwidth.intValue() + 4;
void makeAlignmentImage(jalview.util.ImageMaker.TYPE type, File file)
{
long progress = System.currentTimeMillis();
- boolean headless = (System.getProperty("java.awt.headless") != null && System
+ headless = (System.getProperty("java.awt.headless") != null && System
.getProperty("java.awt.headless").equals("true"));
if (alignFrame != null && !headless)
{
}
try
{
- int maxwidth = av.getAlignment().getWidth();
- if (av.hasHiddenColumns())
- {
- maxwidth = av.getColumnSelection().findColumnPosition(maxwidth);
- }
-
- int height = ((av.getAlignment().getHeight() + 1) * av.charHeight)
- + scalePanel.getHeight();
- int width = getVisibleIdWidth(false) + (maxwidth * av.charWidth);
-
- if (av.getWrapAlignment())
- {
- height = getWrappedHeight();
- if (headless)
- {
- // need to obtain default alignment width and then add in any
- // additional allowance for id margin
- // this duplicates the calculation in getWrappedHeight but adjusts for
- // offscreen idWith
- width = alignFrame.getWidth() - vscroll.getPreferredSize().width
- - alignFrame.getInsets().left
- - alignFrame.getInsets().right - getVisibleIdWidth()
- + getVisibleIdWidth(false);
- }
- else
- {
- width = seqPanel.getWidth() + getVisibleIdWidth(false);
- }
-
- }
- else if (av.getShowAnnotation())
- {
- height += annotationPanel.adjustPanelHeight() + 3;
- }
-
+ AlignmentDimension aDimension = getAlignmentDimension();
try
{
-
jalview.util.ImageMaker im;
final String imageAction, imageTitle;
if (type == jalview.util.ImageMaker.TYPE.PNG)
imageTitle = alignFrame.getTitle();
}
- im = new jalview.util.ImageMaker(this, type, imageAction, width,
- height, file, imageTitle);
+ im = new jalview.util.ImageMaker(this, type, imageAction,
+ aDimension.getWidth(), aDimension.getHeight(), file,
+ imageTitle);
if (av.getWrapAlignment())
{
if (im.getGraphics() != null)
{
- printWrappedAlignment(im.getGraphics(), width, height, 0);
+ printWrappedAlignment(im.getGraphics(), aDimension.getWidth(),
+ aDimension.getHeight(), 0);
im.writeImage();
}
}
{
if (im.getGraphics() != null)
{
- printUnwrapped(im.getGraphics(), width, height, 0);
+ printUnwrapped(im.getGraphics(), aDimension.getWidth(),
+ aDimension.getHeight(), 0);
im.writeImage();
}
}
}
}
+ public AlignmentDimension getAlignmentDimension()
+ {
+ int maxwidth = av.getAlignment().getWidth();
+ if (av.hasHiddenColumns())
+ {
+ maxwidth = av.getColumnSelection().findColumnPosition(maxwidth);
+ }
+
+ int height = ((av.getAlignment().getHeight() + 1) * av.charHeight)
+ + getScalePanel().getHeight();
+ int width = getVisibleIdWidth(false) + (maxwidth * av.charWidth);
+
+ if (av.getWrapAlignment())
+ {
+ height = getWrappedHeight();
+ if (headless)
+ {
+ // need to obtain default alignment width and then add in any
+ // additional allowance for id margin
+ // this duplicates the calculation in getWrappedHeight but adjusts for
+ // offscreen idWith
+ width = alignFrame.getWidth() - vscroll.getPreferredSize().width
+ - alignFrame.getInsets().left
+ - alignFrame.getInsets().right - getVisibleIdWidth()
+ + getVisibleIdWidth(false);
+ }
+ else
+ {
+ width = getSeqPanel().getWidth() + getVisibleIdWidth(false);
+ }
+
+ }
+ else if (av.getShowAnnotation())
+ {
+ height += getAnnotationPanel().adjustPanelHeight() + 3;
+ }
+ return new AlignmentDimension(width, height);
+
+ }
+
/**
* DOCUMENT ME!
*/
int getWrappedHeight()
{
- int seqPanelWidth = seqPanel.seqCanvas.getWidth();
+ int seqPanelWidth = getSeqPanel().seqCanvas.getWidth();
if (System.getProperty("java.awt.headless") != null
&& System.getProperty("java.awt.headless").equals("true"))
- alignFrame.getInsets().left - alignFrame.getInsets().right;
}
- int chunkWidth = seqPanel.seqCanvas
+ int chunkWidth = getSeqPanel().seqCanvas
.getWrappedCanvasWidth(seqPanelWidth);
int hgap = av.charHeight;
}
int annotationHeight = 0;
- if (av.showAnnotation)
+ if (av.isShowAnnotation())
{
- annotationHeight = annotationPanel.adjustPanelHeight();
+ annotationHeight = getAnnotationPanel().adjustPanelHeight();
}
int cHeight = av.getAlignment().getHeight() * av.charHeight + hgap
*/
public void closePanel()
{
- PaintRefresher.RemoveComponent(seqPanel.seqCanvas);
- PaintRefresher.RemoveComponent(idPanel.idCanvas);
+ PaintRefresher.RemoveComponent(getSeqPanel().seqCanvas);
+ PaintRefresher.RemoveComponent(getIdPanel().getIdCanvas());
PaintRefresher.RemoveComponent(this);
if (av != null)
{
jalview.structure.StructureSelectionManager ssm = av
.getStructureSelectionManager();
- ssm.removeStructureViewerListener(seqPanel, null);
- ssm.removeSelectionListener(seqPanel);
+ ssm.removeStructureViewerListener(getSeqPanel(), null);
+ ssm.removeSelectionListener(getSeqPanel());
av.setAlignment(null);
av = null;
}
return av.getAlignment();
}
- /**
- * get the name for this view
- *
- * @return
- */
+
+ @Override
public String getViewName()
{
return av.viewName;
}
public void updateFeatureRenderer(jalview.renderer.seqfeatures.FeatureRenderer fr)
{
- fr.transferSettings(seqPanel.seqCanvas.getFeatureRenderer());
+ fr.transferSettings(getSeqPanel().seqCanvas.getFeatureRenderer());
}
public void updateFeatureRendererFrom(jalview.api.FeatureRenderer fr)
{
- if (seqPanel.seqCanvas.getFeatureRenderer() != null)
+ if (getSeqPanel().seqCanvas.getFeatureRenderer() != null)
{
- seqPanel.seqCanvas.getFeatureRenderer().transferSettings(fr);
+ getSeqPanel().seqCanvas.getFeatureRenderer().transferSettings(fr);
}
}
+
+ public ScalePanel getScalePanel()
+ {
+ return scalePanel;
+ }
+
+ public void setScalePanel(ScalePanel scalePanel)
+ {
+ this.scalePanel = scalePanel;
+ }
+
+ public SeqPanel getSeqPanel()
+ {
+ return seqPanel;
+ }
+
+ public void setSeqPanel(SeqPanel seqPanel)
+ {
+ this.seqPanel = seqPanel;
+ }
+
+ public AnnotationPanel getAnnotationPanel()
+ {
+ return annotationPanel;
+ }
+
+ public void setAnnotationPanel(AnnotationPanel annotationPanel)
+ {
+ this.annotationPanel = annotationPanel;
+ }
+
+ public AnnotationLabels getAlabels()
+ {
+ return alabels;
+ }
+
+ public void setAlabels(AnnotationLabels alabels)
+ {
+ this.alabels = alabels;
+ }
+
+ public IdPanel getIdPanel()
+ {
+ return idPanel;
+ }
+
+ public void setIdPanel(IdPanel idPanel)
+ {
+ this.idPanel = idPanel;
+ }
}
*/
package jalview.gui;
-import java.util.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.SequenceGroup;
+import jalview.io.AnnotationFile;
+import jalview.io.FeaturesFile;
+import jalview.io.JalviewFileChooser;
+import jalview.io.JalviewFileView;
+import jalview.util.MessageManager;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Hashtable;
import java.util.List;
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-
-import jalview.datamodel.*;
-import jalview.io.*;
-import jalview.util.MessageManager;
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JInternalFrame;
+import javax.swing.JLabel;
+import javax.swing.JLayeredPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.SwingConstants;
/**
*
close_actionPerformed(null);
}
-
public void close_actionPerformed(ActionEvent e)
{
try
int selectedRow;
- int scrollOffset = 0;
+ private int scrollOffset = 0;
Font font = new Font("Arial", Font.PLAIN, 11);
addMouseListener(this);
addMouseMotionListener(this);
- addMouseWheelListener(ap.annotationPanel);
+ addMouseWheelListener(ap.getAnnotationPanel());
}
public AnnotationLabels(AlignViewport av)
*/
public void mousePressed(MouseEvent evt)
{
- getSelectedRow(evt.getY() - scrollOffset);
+ getSelectedRow(evt.getY() - getScrollOffset());
oldY = evt.getY();
}
public void mouseReleased(MouseEvent evt)
{
int start = selectedRow;
- getSelectedRow(evt.getY() - scrollOffset);
+ getSelectedRow(evt.getY() - getScrollOffset());
int end = selectedRow;
if (start != end)
resizePanel = false;
dragEvent = null;
repaint();
- ap.annotationPanel.repaint();
+ ap.getAnnotationPanel().repaint();
}
/**
{
resizePanel = evt.getY() < 10;
- getSelectedRow(evt.getY() - scrollOffset);
+ getSelectedRow(evt.getY() - getScrollOffset());
if (selectedRow > -1
&& ap.av.getAlignment().getAlignmentAnnotation().length > selectedRow)
{
desc.append("<br/>");
}
-
+ // if (aa.hasProperties())
+ // {
+ // desc.append("<table>");
+ // for (String prop : aa.getProperties())
+ // {
+ // desc.append("<tr><td>" + prop + "</td><td>"
+ // + aa.getProperty(prop) + "</td><tr>");
+ // }
+ // desc.append("</table>");
+ // }
}
else
{
// begin the tooltip's html fragment
desc.append("<html>");
+ if (aa.hasScore())
+ {
+ // TODO: limit precision of score to avoid noise from imprecise
+ // doubles
+ // (64.7 becomes 64.7+/some tiny value).
+ desc.append(" Score: " + aa.score);
+ }
}
- if (aa.hasScore())
- {
- // TODO: limit precision of score to avoid noise from imprecise doubles
- // (64.7 becomes 64.7+/some tiny value).
- desc.append(" Score: " + aa.score);
- }
-
if (desc.length() > 6)
{
desc.append("</html>");
this.setToolTipText(null);
}
}
-
}
/**
{
// todo: make the ap scroll to the selection - not necessary, first
// click highlights/scrolls, second selects
- ap.seqPanel.ap.idPanel.highlightSearchResults(null);
+ ap.getSeqPanel().ap.getIdPanel().highlightSearchResults(null);
ap.av.setSelectionGroup(// new SequenceGroup(
aa[selectedRow].groupRef); // );
ap.paintAlignment(false);
}
else
{
- ap.seqPanel.ap.idPanel
+ ap.getSeqPanel().ap.getIdPanel()
.highlightSearchResults(aa[selectedRow].groupRef
.getSequences(null));
}
{
if (evt.getClickCount() == 1)
{
- ap.seqPanel.ap.idPanel.highlightSearchResults(Arrays
+ ap.getSeqPanel().ap.getIdPanel().highlightSearchResults(Arrays
.asList(new SequenceI[]
{ aa[selectedRow].sequenceRef }));
}
else if (evt.getClickCount() >= 2)
{
- ap.seqPanel.ap.idPanel.highlightSearchResults(null);
+ ap.getSeqPanel().ap.getIdPanel().highlightSearchResults(null);
SequenceGroup sg = ap.av.getSelectionGroup();
if (sg!=null)
{
{
// TODO: pass on reference to ap so the view can be updated.
aaa.groupRef.setIgnoreGapsConsensus(cbmi.getState());
- ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ ap.getAnnotationPanel().paint(ap.getAnnotationPanel().getGraphics());
}
else
{
g.setColor(Color.white);
g.fillRect(0, 0, getWidth(), getHeight());
- g.translate(0, scrollOffset);
+ g.translate(0, getScrollOffset());
g.setColor(Color.black);
AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
int ofontH = fontHeight;
int sOffset = 0;
int visHeight = 0;
- int[] visr = (ap != null && ap.annotationPanel != null) ? ap.annotationPanel
+ int[] visr = (ap != null && ap.getAnnotationPanel() != null) ? ap.getAnnotationPanel()
.getVisibleVRange() : null;
if (clip && visr != null)
{
if (resizePanel)
{
- g.drawImage(image, 2, 0 - scrollOffset, this);
+ g.drawImage(image, 2, 0 - getScrollOffset(), this);
}
else if (dragEvent != null && aa != null)
{
g.setColor(Color.lightGray);
g.drawString(aa[selectedRow].label, dragEvent.getX(),
- dragEvent.getY() - scrollOffset);
+ dragEvent.getY() - getScrollOffset());
}
if (!av.wrapAlignment && ((aa == null) || (aa.length < 1)))
18);
}
}
+
+ public int getScrollOffset()
+ {
+ return scrollOffset;
+ }
}
*/
package jalview.gui;
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-
-import javax.swing.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SequenceI;
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
import jalview.util.MessageManager;
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import java.awt.image.BufferedImage;
+
+import javax.swing.JColorChooser;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.Scrollable;
+import javax.swing.SwingUtilities;
+import javax.swing.ToolTipManager;
+
/**
* AnnotationPanel displays visible portion of annotation rows below unwrapped
* alignment
public void adjustmentValueChanged(AdjustmentEvent evt)
{
// update annotation label display
- ap.alabels.setScrollOffset(-evt.getValue());
+ ap.getAlabels().setScrollOffset(-evt.getValue());
}
/**
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
anot[index] = new Annotation(label, "", type, 0);
}
- anot[index].secondaryStructure = type;
+
+ anot[index].secondaryStructure = type != 'S' ? type : label
+ .length() == 0 ? ' ' : label.charAt(0);
anot[index].displayCharacter = label;
}
int index = columnSelection.columnAt(i);
// always check for current display state - just in case
if (!viscols.isVisible(index))
+ {
continue;
+ }
String tlabel = null;
if (anot[index] != null)
{ // LML added stem code
return;
}
- ap.scalePanel.mousePressed(evt);
+ ap.getScalePanel().mousePressed(evt);
}
graphStretch = -1;
graphStretchY = -1;
mouseDragging = false;
- ap.scalePanel.mouseReleased(evt);
+ ap.getScalePanel().mouseReleased(evt);
}
/**
@Override
public void mouseEntered(MouseEvent evt)
{
- ap.scalePanel.mouseEntered(evt);
+ ap.getScalePanel().mouseEntered(evt);
}
/**
@Override
public void mouseExited(MouseEvent evt)
{
- ap.scalePanel.mouseExited(evt);
+ ap.getScalePanel().mouseExited(evt);
}
/**
}
else
{
- ap.scalePanel.mouseDragged(evt);
+ ap.getScalePanel().mouseDragged(evt);
}
}
}
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;
if (imgWidth < 1)
+ {
return;
+ }
if (image == null || imgWidth != image.getWidth(this)
|| image.getHeight(this) != getHeight())
{
try
{
- image = new BufferedImage(imgWidth, ap.annotationPanel.getHeight(),
+ image = new BufferedImage(imgWidth, ap.getAnnotationPanel().getHeight(),
BufferedImage.TYPE_INT_RGB);
} catch (OutOfMemoryError oom)
{
@Override
public int[] getVisibleVRange()
{
- if (ap != null && ap.alabels != null)
+ if (ap != null && ap.getAlabels() != null)
{
- int sOffset = -ap.alabels.scrollOffset;
+ int sOffset = -ap.getAlabels().getScrollOffset();
int visHeight = sOffset + ap.annotationSpaceFillerHolder.getHeight();
bounds[0] = sOffset;
bounds[1] = visHeight;
return bounds;
}
else
+ {
return null;
+ }
}
}
// TODO : Fix multiple seq to one chain issue here.
ap.getStructureSelectionManager().setMapping(seq, chains,
alreadyMapped, AppletFormatAdapter.FILE);
- if (ap.seqPanel.seqCanvas.fr != null)
+ if (ap.getSeqPanel().seqCanvas.fr != null)
{
- ap.seqPanel.seqCanvas.fr.featuresAdded();
+ ap.getSeqPanel().seqCanvas.fr.featuresAdded();
ap.paintAlignment(true);
}
import java.awt.BorderLayout;
import java.awt.Component;
+import java.awt.Dialog.ModalExclusionType;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Rectangle;
-import java.awt.Dialog.ModalExclusionType;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
{
if (parent != null)
{
- Cache.log.info("News window closed.");
+ Cache.log.debug("News window closed.");
jd = null;
parent.showNews(false);
}
public BlogReader(Desktop desktop)
{
- Cache.log.info("Constructing news reader.");
+ Cache.log.debug("Constructing news reader.");
parent = desktop;
_channelModel = new ChannelListModel();
if (setvisible)
{
- Cache.log.info("Will show jalview news automatically");
+ Cache.log.debug("Will show jalview news automatically");
showNews();
}
- Cache.log.info("Completed construction of reader.");
+ Cache.log.debug("Completed construction of reader.");
}
jd.initDialogFrame(me, false, false, MessageManager.getString("label.news_from_jalview"),
bounds.width, bounds.height);
jd.frame.setModalExclusionType(ModalExclusionType.NO_EXCLUDE);
- Cache.log.info("Displaying news.");
+ Cache.log.debug("Displaying news.");
jd.waitForInput();
}
}
{
jalview.bin.Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED",
lastDate);
- jalview.bin.Cache.log.info("Saved last read date as "
+ jalview.bin.Cache.log.debug("Saved last read date as "
+ jalview.bin.Cache.date_format.format(lastDate));
}
+ jalview.bin.Cache.date_format.format(lastread.getTime()));
if (me.isNewsNew())
{
- Cache.log.info("There is news to read.");
+ Cache.log.debug("There is news to read.");
}
else
{
- Cache.log.info("There is no new news.");
+ Cache.log.debug("There is no new news.");
me.xf.setTitle("Testing : Last read is " + me.lastDate);
me.showNews();
me.xf.toFront();
}
- Cache.log.info("Waiting for closure.");
+ Cache.log.debug("Waiting for closure.");
do
{
try
if (me.isNewsNew())
{
- Cache.log.info("Still new news after reader displayed.");
+ Cache.log.debug("Still new news after reader displayed.");
}
if (lastread.getTime().before(me.lastDate))
{
- Cache.log.info("The news was read.");
+ Cache.log.debug("The news was read.");
lastread.setTime(me.lastDate);
}
else
_alignwith = new Vector<AlignmentPanel>();
}
+ // save As not yet implemented
+ savemenu.setVisible(false);
+
ViewSelectionMenu seqColourBy = new ViewSelectionMenu(
MessageManager.getString("label.colour_by"), this, _colourwith,
new ItemListener()
// TODO : Fix multiple seq to one chain issue here.
ap.getStructureSelectionManager().setMapping(seq, chains,
alreadyMapped, AppletFormatAdapter.FILE);
- if (ap.seqPanel.seqCanvas.fr != null)
+ if (ap.getSeqPanel().seqCanvas.fr != null)
{
- ap.seqPanel.seqCanvas.fr.featuresAdded();
+ ap.getSeqPanel().seqCanvas.fr.featuresAdded();
ap.paintAlignment(true);
}
{
if (progressBar != null)
{
- progressBar.setProgressBar(
- MessageManager.getString("label.state_completed"), hdl);
+ progressBar
+ .setProgressBar(
+ pdbid
+ + " "
+ + MessageManager
+ .getString("label.state_completed"),
+ hdl);
}
}
/*
import jalview.io.IdentifyFile;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
+import jalview.structure.StructureSelectionManager;
import jalview.util.ImageMaker;
import jalview.util.MessageManager;
import jalview.ws.params.ParamManager;
instance = this;
doVamsasClientCheck();
doGroovyCheck();
-
+ doConfigureStructurePrefs();
setTitle("Jalview " + jalview.bin.Cache.getProperty("VERSION"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
boolean selmemusage = jalview.bin.Cache.getDefault("SHOW_MEMUSAGE",
}
jconsole = new Console(this, showjconsole);
// add essential build information
- jconsole.setHeader("Jalview Desktop "
+ jconsole.setHeader("Jalview Version: "
+ jalview.bin.Cache.getProperty("VERSION") + "\n"
+ + "Jalview Installation: "
+ + jalview.bin.Cache.getDefault("INSTALLATION", "unknown")
+ + "\n"
+ "Build Date: "
+ jalview.bin.Cache.getDefault("BUILD_DATE", "unknown") + "\n"
+ "Java version: " + System.getProperty("java.version") + "\n"
});
}
+ public void doConfigureStructurePrefs()
+ {
+ // configure services
+ StructureSelectionManager ssm = StructureSelectionManager
+ .getStructureSelectionManager(this);
+ if (jalview.bin.Cache.getDefault(Preferences.ADD_SS_ANN, true))
+ {
+ ssm.setAddTempFacAnnot(jalview.bin.Cache.getDefault(
+ Preferences.ADD_TEMPFACT_ANN, true));
+ ssm.setProcessSecondaryStructure(jalview.bin.Cache.getDefault(Preferences.STRUCT_FROM_PDB, true));
+ ssm.setSecStructServices(jalview.bin.Cache.getDefault(Preferences.USE_RNAVIEW,
+ true));
+ }
+ else
+ {
+ ssm.setAddTempFacAnnot(false);
+ ssm.setProcessSecondaryStructure(false);
+ ssm.setSecStructServices(false);
+ }
+ }
+
public void checkForNews()
{
final Desktop me = this;
* Adds and opens the given frame to the desktop
*
* @param frame
- * DOCUMENT ME!
+ * Frame to show
* @param title
- * DOCUMENT ME!
+ * Visible Title
* @param w
- * DOCUMENT ME!
+ * width
* @param h
- * DOCUMENT ME!
+ * height
*/
public static synchronized void addInternalFrame(
final JInternalFrame frame, String title, int w, int h)
{
- addInternalFrame(frame, title, w, h, true);
+ addInternalFrame(frame, title, true, w, h, true);
}
+
/**
- * DOCUMENT ME!
+ * Add an internal frame to the Jalview desktop
*
* @param frame
- * DOCUMENT ME!
+ * Frame to show
* @param title
- * DOCUMENT ME!
+ * Visible Title
+ * @param makeVisible
+ * When true, display frame immediately, otherwise, caller must call
+ * setVisible themselves.
* @param w
- * DOCUMENT ME!
+ * width
* @param h
- * DOCUMENT ME!
+ * height
+ */
+ public static synchronized void addInternalFrame(
+ final JInternalFrame frame, String title, boolean makeVisible,
+ int w, int h)
+ {
+ addInternalFrame(frame, title, makeVisible, w, h, true);
+ }
+
+ /**
+ * Add an internal frame to the Jalview desktop and make it visible
+ *
+ * @param frame
+ * Frame to show
+ * @param title
+ * Visible Title
+ * @param w
+ * width
+ * @param h
+ * height
* @param resizable
- * DOCUMENT ME!
+ * Allow resize
*/
public static synchronized void addInternalFrame(
final JInternalFrame frame, String title, int w, int h,
boolean resizable)
{
+ addInternalFrame(frame, title, true, w, h, resizable);
+ }
+
+ /**
+ * Add an internal frame to the Jalview desktop
+ *
+ * @param frame
+ * Frame to show
+ * @param title
+ * Visible Title
+ * @param makeVisible
+ * When true, display frame immediately, otherwise, caller must call
+ * setVisible themselves.
+ * @param w
+ * width
+ * @param h
+ * height
+ * @param resizable
+ * Allow resize
+ */
+ public static synchronized void addInternalFrame(
+ final JInternalFrame frame, String title, boolean makeVisible,
+ int w, int h, boolean resizable)
+ {
// TODO: allow callers to determine X and Y position of frame (eg. via
// bounds object).
openFrameCount++;
- frame.setVisible(true);
+ frame.setVisible(makeVisible);
frame.setClosable(true);
frame.setResizable(resizable);
frame.setMaximizable(resizable);
{
CutAndPasteTransfer cap = new CutAndPasteTransfer();
cap.setForInput(viewport);
- Desktop.addInternalFrame(cap, MessageManager.getString("label.cut_paste_alignmen_file"), 600, 500);
+ Desktop.addInternalFrame(cap,
+ MessageManager.getString("label.cut_paste_alignmen_file"),
+ true, 600, 500);
}
/*
+ ermsg
+ "</td></tr></table>"
+ "<p>It may be that you have invalid JABA URLs<br/>in your web service preferences,"
- + " or mis-configured HTTP proxy settings.</p>"
+ + "<br>or as a command-line argument, or mis-configured HTTP proxy settings.</p>"
+ "<p>Check the <em>Connections</em> and <em>Web services</em> tab<br/>of the"
+ " Tools->Preferences dialog box to change them.</p></html>"),
"Web Service Configuration Problem",
super();
this.ap = ap;
this.av = ap.av;
- if (ap != null && ap.seqPanel != null && ap.seqPanel.seqCanvas != null
- && ap.seqPanel.seqCanvas.fr != null)
+ if (ap != null && ap.getSeqPanel() != null && ap.getSeqPanel().seqCanvas != null
+ && ap.getSeqPanel().seqCanvas.fr != null)
{
- transferSettings(ap.seqPanel.seqCanvas.fr);
+ transferSettings(ap.getSeqPanel().seqCanvas.fr);
}
}
highlight.addResult(sequences[0], features[index].getBegin(),
features[index].getEnd());
- ap.seqPanel.seqCanvas.highlightSearchResults(highlight);
+ ap.getSeqPanel().seqCanvas.highlightSearchResults(highlight);
}
Object col = getFeatureStyle(name.getText());
import jalview.bin.Cache;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.gui.Help.HelpId;
import jalview.io.JalviewFileChooser;
import jalview.schemes.AnnotationColourGradient;
import jalview.schemes.GraduatedColor;
import java.util.Set;
import java.util.Vector;
+import javax.help.HelpSetException;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
import javax.swing.Icon;
ex.printStackTrace();
}
- table = new JTable();
+ table = new JTable() {
+ @Override
+ public String getToolTipText(MouseEvent e) {
+ if (table.columnAtPoint(e.getPoint()) == 0) {
+ /*
+ * Tooltip for feature name only
+ */
+ return JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.feature_settings_click_drag"));
+ }
+ return null;
+ }
+ };
table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12));
table.setFont(new Font("Verdana", Font.PLAIN, 12));
table.setDefaultRenderer(Color.class, new ColorRenderer());
}
}
});
- table.setToolTipText(JvSwingUtils
- .wrapTooltip(true, MessageManager.getString("label.feature_settings_click_drag")));
+// table.setToolTipText(JvSwingUtils.wrapTooltip(true,
+// MessageManager.getString("label.feature_settings_click_drag")));
scrollPane.setViewportView(table);
dassourceBrowser = new DasSourceBrowser(this);
public void itemStateChanged(ItemEvent evt)
{
fr.setGroupVisibility(check.getText(), check.isSelected());
- af.alignPanel.seqPanel.seqCanvas.repaint();
+ af.alignPanel.getSeqPanel().seqCanvas.repaint();
if (af.alignPanel.overviewPanel != null)
{
af.alignPanel.overviewPanel.updateOverviewImage();
JButton sortByDens = new JButton();
- JPanel transbuttons = new JPanel(new GridLayout(4, 1));
+ JButton help = new JButton();
+
+ JPanel transbuttons = new JPanel(new GridLayout(5, 1));
private void jbInit() throws Exception
{
af.avc.sortAlignmentByFeatureDensity(null);
}
});
+ help.setFont(JvSwingUtils.getLabelFont());
+ help.setText(MessageManager.getString("action.help"));
+ help.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ try
+ {
+ Help.showHelpWindow(HelpId.SequenceFeatureSettings);
+ } catch (HelpSetException e1)
+ {
+ e1.printStackTrace();
+ }
+ }
+ });
cancel.setFont(JvSwingUtils.getLabelFont());
cancel.setText(MessageManager.getString("action.cancel"));
cancel.addActionListener(new ActionListener()
});
transparency.setMaximum(70);
+ transparency.setToolTipText(MessageManager
+ .getString("label.transparency_tip"));
fetchDAS.setText(MessageManager.getString("label.fetch_das_features"));
fetchDAS.addActionListener(new ActionListener()
{
transbuttons.add(invert);
transbuttons.add(sortByScore);
transbuttons.add(sortByDens);
+ transbuttons.add(help);
+ JPanel sliderPanel = new JPanel();
+ sliderPanel.add(transparency);
transPanel.add(transparency);
transPanel.add(transbuttons);
buttonPanel.add(ok);
searchResults.getResultEnd(i), "Search Results");
}
- if (ap.seqPanel.seqCanvas.getFeatureRenderer().amendFeatures(seqs,
+ if (ap.getSeqPanel().seqCanvas.getFeatureRenderer().amendFeatures(seqs,
features, true, ap))
{
ap.alignFrame.showSeqFeatures.setSelected(true);
if ((idMatch.size() > 0))
{
haveResults = true;
- ap.idPanel.highlightSearchResults(idMatch);
+ ap.getIdPanel().highlightSearchResults(idMatch);
}
else
{
- ap.idPanel.highlightSearchResults(null);
+ ap.getIdPanel().highlightSearchResults(null);
}
if (searchResults.getSize() > 0)
public void smoothFont_actionPerformed(ActionEvent e)
{
ap.av.antiAlias = smoothFont.isSelected();
- ap.annotationPanel.image = null;
+ ap.getAnnotationPanel().image = null;
ap.paintAlignment(true);
}
--- /dev/null
+package jalview.gui;
+
+import jalview.util.MessageManager;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+public class HTMLOptions extends JPanel
+{
+ JDialog dialog;
+
+ public boolean cancelled = false;
+
+ String value;
+
+ public HTMLOptions()
+ {
+ try
+ {
+ jbInit();
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ ButtonGroup bg = new ButtonGroup();
+ bg.add(lineart);
+ bg.add(text);
+
+ JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
+ JOptionPane.DEFAULT_OPTION, null, new Object[]
+ { this });
+
+ dialog = pane.createDialog(Desktop.desktop, "HTML Rendering options");
+ dialog.setVisible(true);
+
+ }
+
+ private void jbInit() throws Exception
+ {
+ lineart.setFont(JvSwingUtils.getLabelFont());
+ lineart.setText(MessageManager.getString("label.lineart"));
+ text.setFont(JvSwingUtils.getLabelFont());
+ text.setText(MessageManager.getString("action.text"));
+ text.setSelected(true);
+ askAgain.setFont(JvSwingUtils.getLabelFont());
+ askAgain.setText(MessageManager.getString("label.dont_ask_me_again"));
+ ok.setText(MessageManager.getString("action.ok"));
+ ok.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ ok_actionPerformed(e);
+ }
+ });
+ cancel.setText(MessageManager.getString("action.cancel"));
+ cancel.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ cancel_actionPerformed(e);
+ }
+ });
+ jLabel1.setFont(JvSwingUtils.getLabelFont());
+ jLabel1.setText("Select HTML character rendering style");
+ this.setLayout(borderLayout1);
+ jPanel3.setBorder(BorderFactory.createEtchedBorder());
+ jPanel2.add(text);
+ jPanel2.add(lineart);
+ jPanel2.add(askAgain);
+ jPanel1.add(ok);
+ jPanel1.add(cancel);
+ jPanel3.add(jLabel1);
+ jPanel3.add(jPanel2);
+ this.add(jPanel3, java.awt.BorderLayout.CENTER);
+ this.add(jPanel1, java.awt.BorderLayout.SOUTH);
+ }
+
+ JRadioButton lineart = new JRadioButton();
+
+ JRadioButton text = new JRadioButton();
+
+ JCheckBox askAgain = new JCheckBox();
+
+ JButton ok = new JButton();
+
+ JButton cancel = new JButton();
+
+ JPanel jPanel1 = new JPanel();
+
+ JLabel jLabel1 = new JLabel();
+
+ JPanel jPanel2 = new JPanel();
+
+ JPanel jPanel3 = new JPanel();
+
+ BorderLayout borderLayout1 = new BorderLayout();
+
+ public void ok_actionPerformed(ActionEvent e)
+ {
+ if (lineart.isSelected())
+ {
+ value = "Lineart";
+ }
+ else
+ {
+ value = "Text";
+ }
+
+ if (!askAgain.isSelected())
+ {
+ jalview.bin.Cache.applicationProperties.remove("HTML_RENDERING");
+ }
+ else
+ {
+ jalview.bin.Cache.setProperty("HTML_RENDERING", value);
+ }
+
+ dialog.setVisible(false);
+ }
+
+ public void cancel_actionPerformed(ActionEvent e)
+ {
+ cancelled = true;
+ dialog.setVisible(false);
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+}
import java.net.URL;
+import javax.help.BadIDException;
import javax.help.HelpBroker;
import javax.help.HelpSet;
import javax.help.HelpSetException;
*/
public class Help
{
+ public enum HelpId
+ {
+ Home("home"), SequenceFeatureSettings("seqfeatures.settings"), StructureViewer(
+ "viewingpdbs");
+
+ private String id;
+
+ private HelpId(String loc)
+ {
+ this.id = loc;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.id;
+ }
+ }
private static final long HALF_A_MO = 500; // half a second
*
* This is a workaround for issue JAL-914 - both Desktop and AlignFrame
* responding to F1 key, resulting in duplicate help windows opened.
+ * @param id TODO
*
* @throws HelpSetException
*/
- public static void showHelpWindow() throws HelpSetException
+ public static void showHelpWindow(HelpId id) throws HelpSetException
{
long timeNow = System.currentTimeMillis();
HelpSet hs = new HelpSet(cl, url);
HelpBroker hb = hs.createHelpBroker();
- hb.setCurrentID("home");
+ try
+ {
+ hb.setCurrentID(id.toString());
+ } catch (BadIDException bad)
+ {
+ System.out.println("Bad help link: " + id.toString()
+ + ": must match a target in help.jhm");
+ throw bad;
+ }
hb.setDisplayed(true);
}
}
+
+ public static void showHelpWindow() throws HelpSetException
+ {
+ showHelpWindow(HelpId.Home);
+ }
}
AnnotationPanel ap;
- Font idfont;
+ private Font idfont;
/**
* Creates a new IdCanvas object.
gg.setColor(Color.black);
}
- if (av.rightAlignIds)
+ if (av.isRightAlignIds())
{
xPos = panelWidth
- fm.stringWidth(s.getDisplayId(av.getShowJVSuffix())) - 4;
{
if (av.seqNameItalics)
{
- idfont = new Font(av.getFont().getName(), Font.ITALIC, av.getFont()
- .getSize());
+ setIdfont(new Font(av.getFont().getName(), Font.ITALIC, av.getFont()
+ .getSize()));
}
else
{
- idfont = av.getFont();
+ setIdfont(av.getFont());
}
- gg.setFont(idfont);
+ gg.setFont(getIdfont());
fm = gg.getFontMetrics();
if (av.antiAlias)
int annotationHeight = 0;
- if (av.showAnnotation)
+ if (av.isShowAnnotation())
{
if (ap == null)
{
}
else
{
- gg.setFont(idfont);
+ gg.setFont(getIdfont());
}
drawIdString(gg, s, i, 0, ypos);
}
- if (labels != null && av.showAnnotation)
+ if (labels != null && av.isShowAnnotation())
{
gg.translate(0, ypos + (alheight * av.charHeight));
labels.drawComponent(gg, getWidth());
String string = sequence.getDisplayId(av.getShowJVSuffix());
- if (av.rightAlignIds)
+ if (av.isRightAlignIds())
{
xPos = panelWidth - fm.stringWidth(string) - 4;
}
}
else
{
- gg.setFont(idfont);
+ gg.setFont(getIdfont());
}
}
searchResults = list;
repaint();
}
+
+ public Font getIdfont()
+ {
+ return idfont;
+ }
+
+ public void setIdfont(Font idfont)
+ {
+ this.idfont = idfont;
+ }
}
public class IdPanel extends JPanel implements MouseListener,
MouseMotionListener, MouseWheelListener
{
- protected IdCanvas idCanvas;
+ private IdCanvas idCanvas;
protected AlignViewport av;
{
this.av = av;
alignPanel = parent;
- idCanvas = new IdCanvas(av);
+ setIdCanvas(new IdCanvas(av));
linkImageURL = getClass().getResource("/images/link.gif").toString();
seqAnnotReport = new SequenceAnnotationReport(linkImageURL);
setLayout(new BorderLayout());
- add(idCanvas, BorderLayout.CENTER);
+ add(getIdCanvas(), BorderLayout.CENTER);
addMouseListener(this);
addMouseMotionListener(this);
addMouseWheelListener(this);
@Override
public void mouseMoved(MouseEvent e)
{
- SeqPanel sp = alignPanel.seqPanel;
+ SeqPanel sp = alignPanel.getSeqPanel();
int seq = Math.max(0, sp.findSeq(e));
if (seq > -1 && seq < av.getAlignment().getHeight())
{
{
mouseDragging = true;
- int seq = Math.max(0, alignPanel.seqPanel.findSeq(e));
+ int seq = Math.max(0, alignPanel.getSeqPanel().findSeq(e));
if (seq < lastid)
{
return;
}
- int seq = alignPanel.seqPanel.findSeq(e);
+ int seq = alignPanel.getSeqPanel().findSeq(e);
String url = null;
int i = 0;
String id = av.getAlignment().getSequenceAt(seq).getName();
return;
}
- int seq = alignPanel.seqPanel.findSeq(e);
+ int seq = alignPanel.getSeqPanel().findSeq(e);
if (SwingUtilities.isRightMouseButton(e))
{
*/
public void highlightSearchResults(List<SequenceI> list)
{
- idCanvas.setHighlighted(list);
+ getIdCanvas().setHighlighted(list);
if (list == null)
{
}
}
+ public IdCanvas getIdCanvas()
+ {
+ return idCanvas;
+ }
+
+ public void setIdCanvas(IdCanvas idCanvas)
+ {
+ this.idCanvas = idCanvas;
+ }
+
// this class allows scrolling off the bottom of the visible alignment
class ScrollThread extends Thread
{
{
active = true;
- Dimension d = ap.idPanel.idCanvas.getPreferredSize();
+ Dimension d = ap.getIdPanel().getIdCanvas().getPreferredSize();
int dif = evt.getX() - oldX;
if (((d.width + dif) > 20) || (dif > 0))
{
- ap.idPanel.idCanvas.setPreferredSize(new Dimension(d.width + dif,
+ ap.getIdPanel().getIdCanvas().setPreferredSize(new Dimension(d.width + dif,
d.height));
ap.paintAlignment(true);
}
for (String dssids : dsses.keySet())
{
AlignFrame _af = dsses.get(dssids);
- String jfileName = MessageManager.formatMessage("label.dataset_for", new String[]{fileName,_af.getTitle()});
+ String jfileName = fileName + " Dataset for " + _af.getTitle();
if (!jfileName.endsWith(".xml"))
{
jfileName = jfileName + ".xml";
view.setShowBoxes(av.getShowBoxes());
view.setShowColourText(av.getColourText());
view.setShowFullId(av.getShowJVSuffix());
- view.setRightAlignIds(av.rightAlignIds);
+ view.setRightAlignIds(av.isRightAlignIds());
view.setShowSequenceFeatures(av.isShowSequenceFeatures());
view.setShowText(av.getShowText());
view.setShowUnconserved(av.getShowUnconserved());
{
jalview.schemabinding.version2.FeatureSettings fs = new jalview.schemabinding.version2.FeatureSettings();
- String[] renderOrder = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ String[] renderOrder = ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getRenderOrder().toArray(new String[0]);
Vector settingsAdded = new Vector();
{
for (int ro = 0; ro < renderOrder.length; ro++)
{
- gstyle = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ gstyle = ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getFeatureStyle(renderOrder[ro]);
Setting setting = new Setting();
setting.setType(renderOrder[ro]);
}
else
{
- setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
+ setting.setColour(ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getColour(renderOrder[ro]).getRGB());
}
setting.setDisplay(av.getFeaturesDisplayed().isVisible(
renderOrder[ro]));
- float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ float rorder = ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getOrder(renderOrder[ro]);
if (rorder > -1)
{
}
// Make sure we save none displayed feature settings
- Iterator en = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ Iterator en = ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getFeatureColours().keySet().iterator();
while (en.hasNext())
{
Setting setting = new Setting();
setting.setType(key);
- setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
+ setting.setColour(ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getColour(key).getRGB());
setting.setDisplay(false);
- float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ float rorder = ap.getSeqPanel().seqCanvas.getFeatureRenderer()
.getOrder(key);
if (rorder > -1)
{
settingsAdded.addElement(key);
}
// is groups actually supposed to be a map here ?
- en = ap.seqPanel.seqCanvas.getFeatureRenderer().getFeatureGroups()
+ en = ap.getSeqPanel().seqCanvas.getFeatureRenderer().getFeatureGroups()
.iterator();
Vector groupsAdded = new Vector();
while (en.hasNext())
}
Group g = new Group();
g.setName(grp);
- g.setDisplay(((Boolean) ap.seqPanel.seqCanvas
+ g.setDisplay(((Boolean) ap.getSeqPanel().seqCanvas
.getFeatureRenderer().checkGroupVisibility(grp, false))
.booleanValue());
fs.addGroup(g);
}
ae.setPosition(a);
- if (aa[i].annotations[a].secondaryStructure != ' '
- && aa[i].annotations[a].secondaryStructure != '\0')
+ if (aa[i].annotations[a].secondaryStructure > ' ')
{
ae.setSecondaryStructure(aa[i].annotations[a].secondaryStructure
+ "");
}
else
{
- recoverDatasetFor(vamsasSet, al);
+ // recover dataset - passing on flag indicating if this a 'viewless'
+ // sequence set (a.k.a. a stored dataset for the project)
+ recoverDatasetFor(vamsasSet, al, object.getJalviewModelSequence()
+ .getViewportCount() == 0);
}
// ///////////////////////////////
af.viewport.setConservationSelected(view.getConservationSelected());
af.viewport.setShowJVSuffix(view.getShowFullId());
- af.viewport.rightAlignIds = view.getRightAlignIds();
+ af.viewport.setRightAlignIds(view.getRightAlignIds());
af.viewport.setFont(new java.awt.Font(view.getFontName(), view
.getFontStyle(), view.getFontSize()));
af.alignPanel.fontChanged();
// jms.getFeatureSettings().getTransparency() : 0.0, featureOrder);
FeatureRendererSettings frs = new FeatureRendererSettings(
renderOrder, fgtable, featureColours, 1.0f, featureOrder);
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer()
+ af.alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer()
.transferSettings(frs);
}
}
}
- private void recoverDatasetFor(SequenceSet vamsasSet, Alignment al)
+ private void recoverDatasetFor(SequenceSet vamsasSet, Alignment al,
+ boolean ignoreUnrefed)
{
jalview.datamodel.Alignment ds = getDatasetFor(vamsasSet.getDatasetId());
Vector dseqs = null;
for (int i = 0, iSize = vamsasSet.getSequenceCount(); i < iSize; i++)
{
Sequence vamsasSeq = vamsasSet.getSequence(i);
- ensureJalviewDatasetSequence(vamsasSeq, ds, dseqs);
+ ensureJalviewDatasetSequence(vamsasSeq, ds, dseqs, ignoreUnrefed);
}
// create a new dataset
if (ds == null)
addDatasetRef(vamsasSet.getDatasetId(), ds);
}
// set the dataset for the newly imported alignment.
- if (al.getDataset() == null)
+ if (al.getDataset() == null && !ignoreUnrefed)
{
al.setDataset(ds);
}
* vector to add new dataset sequence to
*/
private void ensureJalviewDatasetSequence(Sequence vamsasSeq,
- AlignmentI ds, Vector dseqs)
+ AlignmentI ds, Vector dseqs, boolean ignoreUnrefed)
{
// JBP TODO: Check this is called for AlCodonFrames to support recovery of
// xRef Codon Maps
{
dsq = sq.getDatasetSequence();
}
-
+ if (sq == null && ignoreUnrefed)
+ {
+ return;
+ }
String sqid = vamsasSeq.getDsseqid();
if (dsq == null)
{
}
}
FeatureRendererSettings frs = new FeatureRendererSettings(renderOrder, new Hashtable(), featureColours, 1.0f, null);
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().transferSettings(frs);
+ af.alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer().transferSettings(frs);
}
af.setMenusFromViewport(af.viewport);
// TODO Auto-generated method stub
}
-
- @Override
- public void showUrl(String url, String target)
- {
- // TODO Auto-generated method stub
-
- }
}
*/
public static String wrapTooltip(boolean enclose, String ttext)
{
-
if (ttext.length() < 60)
{
- return enclose ? "<html>"+ttext+"</html>" : ttext;
+ return enclose ? "<html>" + ttext + "</html>" : ttext;
}
else
{
- return (enclose ? "<html>" : "") + "<table width=350 border=0><tr><td>" + ttext
+ return (enclose ? "<html>" : "")
+ + "<table width=350 border=0><tr><td>" + ttext
+ "</td></tr></table>" + ((enclose ? "</html>" : ""));
}
}
if (av.isShowSequenceFeatures())
{
- fr.transferSettings(ap.seqPanel.seqCanvas.getFeatureRenderer());
+ fr.transferSettings(ap.getSeqPanel().seqCanvas.getFeatureRenderer());
}
int alwidth = av.getAlignment().getWidth();
*/
package jalview.gui;
-import java.util.*;
-import java.awt.event.*;
-
-import jalview.analysis.*;
-import jalview.datamodel.*;
-import jalview.jbgui.*;
+import jalview.analysis.AlignSeq;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+import jalview.jbgui.GPairwiseAlignPanel;
import jalview.util.MessageManager;
+import java.awt.event.ActionEvent;
+import java.util.Vector;
+
/**
* DOCUMENT ME!
*
totscore = totscore + scores[i][j];
textarea.append(as.getOutput());
- seq = new Sequence(as.getS1().getName(), as.getAStr1(), as.getS1()
- .getStart(), as.getS1().getEnd());
- sequences.add(seq);
-
- seq = new Sequence(as.getS2().getName(), as.getAStr2(), as.getS2()
- .getStart(), as.getS2().getEnd());
- sequences.add(seq);
+ sequences.add(as.getAlignedSeq1());
+ sequences.add(as.getAlignedSeq2());
}
}
import jalview.analysis.Conservation;
import jalview.commands.ChangeCaseCommand;
import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.PDBEntry;
{
AlignmentAnnotation[] aa = ap.av.getAlignment()
.getAlignmentAnnotation();
- for (int i = 0; i < aa.length; i++)
+ for (int i = 0; aa != null && i < aa.length; i++)
{
- if (aa[i].getRNAStruc() != null)
+ if (aa[i].isValidStruc() && aa[i].sequenceRef == null)
{
final String rnastruc = aa[i].getRNAStruc();
- final String structureLine = aa[i].label;
+ final String structureLine = aa[i].label + " (alignment)";
menuItem = new JMenuItem();
menuItem.setText(MessageManager.formatMessage(
"label.2d_rna_structure_line", new String[]
@Override
public void actionPerformed(ActionEvent e)
{
- // System.out.println("1:"+structureLine);
- System.out.println("1:sname" + seq.getName());
- System.out.println("2:seq" + seq);
-
- // System.out.println("3:"+seq.getSequenceAsString());
- System.out.println("3:strucseq" + rnastruc);
- // System.out.println("4:struc"+seq.getRNA());
- System.out.println("5:name" + seq.getName());
- System.out.println("6:ap" + ap);
+ // // System.out.println("1:"+structureLine);
+ // System.out.println("1:sname" + seq.getName());
+ // System.out.println("2:seq" + seq);
+ //
+ // // System.out.println("3:"+seq.getSequenceAsString());
+ // System.out.println("3:strucseq" + rnastruc);
+ // // System.out.println("4:struc"+seq.getRNA());
+ // System.out.println("5:name" + seq.getName());
+ // System.out.println("6:ap" + ap);
new AppVarna(structureLine, seq, seq.getSequenceAsString(),
rnastruc, seq.getName(), ap);
// new AppVarna(seq.getName(),seq,rnastruc,seq.getRNA(),
AlignmentAnnotation seqAnno[] = seq.getAnnotation();
for (int i = 0; i < seqAnno.length; i++)
{
- if (seqAnno[i].getRNAStruc() != null)
+ if (seqAnno[i].isValidStruc())
{
final String rnastruc = seqAnno[i].getRNAStruc();
/**
* Check for any annotations on the underlying dataset sequences (for the
- * current selection group) which are not on the alignment annotations for the
- * sequence. If any are found, enable the option to add them to the alignment.
- * The criteria for 'on the alignment' is finding an alignment annotation on
- * the sequence, that matches on calcId and label. A tooltip is also
- * constructed that displays the source (calcId) and type (label) of the
- * annotations that can be added.
+ * current selection group) which are not 'on the alignment'.If any are found,
+ * enable the option to add them to the alignment. The criteria for 'on the
+ * alignment' is finding an alignment annotation on the alignment, matched on
+ * calcId, label and sequenceRef.
+ *
+ * A tooltip is also constructed that displays the source (calcId) and type
+ * (label) of the annotations that can be added.
*
* @param menuItem
* @param forSequences
/*
* For each sequence selected in the alignment, make a list of any
* annotations on the underlying dataset sequence which are not already on
- * the sequence in the alignment.
+ * the alignment.
*
* Build a map of { alignmentSequence, <List of annotations to add> }
*/
+ AlignmentI al = this.ap.av.getAlignment();
final Map<SequenceI, List<AlignmentAnnotation>> candidates = new LinkedHashMap<SequenceI, List<AlignmentAnnotation>>();
for (SequenceI seq : forSequences)
{
for (AlignmentAnnotation dsann : datasetAnnotations)
{
/*
- * If the sequence has no annotation that matches this one, then add
- * this one to the results list.
+ * Find matching annotations on the alignment.
*/
- if (seq.getAlignmentAnnotations(dsann.getCalcId(), dsann.label)
- .isEmpty())
+ final Iterable<AlignmentAnnotation> matchedAlignmentAnnotations = al
+ .findAnnotations(seq, dsann.getCalcId(),
+ dsann.label);
+ if (!matchedAlignmentAnnotations.iterator().hasNext())
{
result.add(dsann);
tipEntries.put(dsann.getCalcId(), dsann.label);
}
copyAnn.restrict(startRes, endRes);
- // add to the sequence (sets copyAnn.datasetSequence)
- seq.addAlignmentAnnotation(copyAnn);
+ /*
+ * Add to the sequence (sets copyAnn.datasetSequence), unless the
+ * original annotation is already on the sequence.
+ */
+ if (!seq.hasAnnotation(ann))
+ {
+ seq.addAlignmentAnnotation(copyAnn);
+ }
// adjust for gaps
copyAnn.adjustForAlignment();
// add to the alignment and set visible
true,
true,
false,
- (ap.seqPanel.seqCanvas.fr != null) ? ap.seqPanel.seqCanvas.fr.getMinMax()
+ (ap.getSeqPanel().seqCanvas.fr != null) ? ap
+ .getSeqPanel().seqCanvas.fr
+ .getMinMax()
: null);
contents.append("</p>");
}
System.arraycopy(features, 0, tfeatures, 0, rsize);
features = tfeatures;
seqs = rseqs;
- if (ap.seqPanel.seqCanvas.getFeatureRenderer().amendFeatures(seqs,
+ if (ap.getSeqPanel().seqCanvas.getFeatureRenderer().amendFeatures(seqs,
features, true, ap))
{
ap.alignFrame.setShowSeqFeatures(true);
{
EditCommand editCommand = new EditCommand(
MessageManager.getString("label.edit_sequences"),
- EditCommand.REPLACE, dialog.getName().replace(' ',
+ Action.REPLACE, dialog.getName().replace(' ',
ap.av.getGapCharacter()),
sg.getSequencesAsArray(ap.av.getHiddenRepSequences()),
sg.getStartRes(), sg.getEndRes() + 1, ap.av.getAlignment());
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.bin.Cache;
+import jalview.gui.Help.HelpId;
import jalview.gui.StructureViewer.Viewer;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.Collection;
+import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;
+import javax.help.HelpSetException;
import javax.swing.JColorChooser;
import javax.swing.JFileChooser;
import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
+import ext.edu.ucsf.rbvi.strucviz2.StructureManager;
+
/**
* DOCUMENT ME!
*
@Override
public void actionPerformed(ActionEvent e)
{
- if (chimeraPath.getText().trim().length() > 0)
- {
- File f = new File(chimeraPath.getText());
- if (!f.canExecute())
- {
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- MessageManager.getString("label.invalid_path"),
- MessageManager.getString("label.invalid_name"),
- JOptionPane.ERROR_MESSAGE);
- }
- }
+ validateChimeraPath();
}
});
*/
public void ok_actionPerformed(ActionEvent e)
{
+ if (!validateSettings())
+ {
+ return;
+ }
+
/*
* Save Visual settings
*/
dasSource.saveProperties(Cache.applicationProperties);
wsPrefs.updateAndRefreshWsMenuConfig(false);
-
Cache.saveProperties();
-
+ Desktop.instance.doConfigureStructurePrefs();
try
{
frame.setClosed(true);
}
/**
+ * Do any necessary validation before saving settings. Return focus to the
+ * first tab which fails validation.
+ *
+ * @return
+ */
+ private boolean validateSettings()
+ {
+ if (!validateStructure())
+ {
+ structureTab.requestFocusInWindow();
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ protected boolean validateStructure()
+ {
+ return validateChimeraPath();
+
+ }
+ /**
* DOCUMENT ME!
*/
public void startupFileTextfield_mouseClicked()
userIdWidthlabel.setEnabled(!autoIdWidth.isSelected());
}
+ /**
+ * Returns true if chimera path is to a valid executable, else show an error
+ * dialog.
+ */
+ private boolean validateChimeraPath()
+ {
+ if (chimeraPath.getText().trim().length() > 0)
+ {
+ File f = new File(chimeraPath.getText());
+ if (!f.canExecute())
+ {
+ JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ MessageManager.getString("label.invalid_chimera_path"),
+ MessageManager.getString("label.invalid_name"),
+ JOptionPane.ERROR_MESSAGE);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * If Chimera is selected, check it can be found on default or user-specified
+ * path, if not show a warning/help dialog.
+ */
+ @Override
+ protected void structureViewer_actionPerformed(String selectedItem)
+ {
+ if (!selectedItem.equals(Viewer.CHIMERA.name()))
+ {
+ return;
+ }
+ boolean found = false;
+
+ /*
+ * Try user-specified and standard paths for Chimera executable.
+ */
+ List<String> paths = StructureManager.getChimeraPaths();
+ paths.add(0, chimeraPath.getText());
+ for (String path : paths)
+ {
+ if (new File(path.trim()).canExecute())
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ String[] options =
+ { "OK", "Help" };
+ int showHelp = JOptionPane.showInternalOptionDialog(
+ Desktop.desktop,
+ JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.chimera_missing")),
+ "", JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE, null, options, options[0]);
+ if (showHelp == JOptionPane.NO_OPTION)
+ {
+ try
+ {
+ Help.showHelpWindow(HelpId.StructureViewer);
+ } catch (HelpSetException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
}
*/
package jalview.gui;
-import java.util.*;
-
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
-
import jalview.analysis.AlignSeq;
-import jalview.commands.*;
-import jalview.datamodel.*;
-import jalview.jbgui.*;
+import jalview.commands.CommandI;
+import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.jbgui.GSliderPanel;
import jalview.util.MessageManager;
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Stack;
+import java.util.Vector;
+
+import javax.swing.JInternalFrame;
+import javax.swing.JProgressBar;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.InternalFrameAdapter;
+import javax.swing.event.InternalFrameEvent;
+
/**
* DOCUMENT ME!
*
AlignmentPanel ap;
- Stack historyList = new Stack(); // simpler than synching with alignFrame.
+ Stack<CommandI> historyList = new Stack<CommandI>();
+
+ // simpler than synching with alignFrame.
float[] redundancy;
{
public void internalFrameClosing(InternalFrameEvent evt)
{
- ap.idPanel.idCanvas.setHighlighted(null);
+ ap.getIdPanel().getIdCanvas().setHighlighted(null);
}
});
redundantSequences.add(originalSequences[i]);
}
}
- ap.idPanel.idCanvas.setHighlighted(redundantSequences);
+ ap.getIdPanel().getIdCanvas().setHighlighted(redundantSequences);
}
/**
}
EditCommand cut = new EditCommand(MessageManager.getString("action.remove_redundancy"),
- EditCommand.CUT, deleted, 0, width, ap.av.getAlignment());
+ Action.CUT, deleted, 0, width, ap.av.getAlignment());
for (int i = 0; i < del.size(); i++)
{
return;
}
- CommandI command = (CommandI) historyList.pop();
+ CommandI command = historyList.pop();
if (ap.av.historyList.contains(command))
{
command.undoCommand(af.getViewAlignments());
--- /dev/null
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+package jalview.gui;
+
+import jalview.util.MessageManager;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+public class SVGOptions extends JPanel
+{
+ JDialog dialog;
+
+ public boolean cancelled = false;
+
+ String value;
+
+ public SVGOptions()
+ {
+ try
+ {
+ jbInit();
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ ButtonGroup bg = new ButtonGroup();
+ bg.add(lineart);
+ bg.add(text);
+
+ JOptionPane pane = new JOptionPane(null, JOptionPane.DEFAULT_OPTION,
+ JOptionPane.DEFAULT_OPTION, null, new Object[]
+ { this });
+
+ dialog = pane.createDialog(Desktop.desktop, "SVG Rendering options");
+ dialog.setVisible(true);
+
+ }
+
+ private void jbInit() throws Exception
+ {
+ lineart.setFont(JvSwingUtils.getLabelFont());
+ lineart.setText(MessageManager.getString("label.lineart"));
+ text.setFont(JvSwingUtils.getLabelFont());
+ text.setText(MessageManager.getString("action.text"));
+ text.setSelected(true);
+ askAgain.setFont(JvSwingUtils.getLabelFont());
+ askAgain.setText(MessageManager.getString("label.dont_ask_me_again"));
+ ok.setText(MessageManager.getString("action.ok"));
+ ok.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ ok_actionPerformed(e);
+ }
+ });
+ cancel.setText(MessageManager.getString("action.cancel"));
+ cancel.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ cancel_actionPerformed(e);
+ }
+ });
+ jLabel1.setFont(JvSwingUtils.getLabelFont());
+ jLabel1.setText("Select SVG character rendering style");
+ this.setLayout(borderLayout1);
+ jPanel3.setBorder(BorderFactory.createEtchedBorder());
+ jPanel2.add(text);
+ jPanel2.add(lineart);
+ jPanel2.add(askAgain);
+ jPanel1.add(ok);
+ jPanel1.add(cancel);
+ jPanel3.add(jLabel1);
+ jPanel3.add(jPanel2);
+ this.add(jPanel3, java.awt.BorderLayout.CENTER);
+ this.add(jPanel1, java.awt.BorderLayout.SOUTH);
+ }
+
+ JRadioButton lineart = new JRadioButton();
+
+ JRadioButton text = new JRadioButton();
+
+ JCheckBox askAgain = new JCheckBox();
+
+ JButton ok = new JButton();
+
+ JButton cancel = new JButton();
+
+ JPanel jPanel1 = new JPanel();
+
+ JLabel jLabel1 = new JLabel();
+
+ JPanel jPanel2 = new JPanel();
+
+ JPanel jPanel3 = new JPanel();
+
+ BorderLayout borderLayout1 = new BorderLayout();
+
+ public void ok_actionPerformed(ActionEvent e)
+ {
+ if (lineart.isSelected())
+ {
+ value = "Lineart";
+ }
+ else
+ {
+ value = "Text";
+ }
+
+ if (!askAgain.isSelected())
+ {
+ jalview.bin.Cache.applicationProperties.remove("SVG_RENDERING");
+ }
+ else
+ {
+ jalview.bin.Cache.setProperty("SVG_RENDERING", value);
+ }
+
+ dialog.setVisible(false);
+ }
+
+ public void cancel_actionPerformed(ActionEvent e)
+ {
+ cancelled = true;
+ dialog.setVisible(false);
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+}
{
if (mouseDragging)
{
- ap.seqPanel.scrollCanvas(null);
+ ap.getSeqPanel().scrollCanvas(null);
}
}
{
if (mouseDragging)
{
- ap.seqPanel.scrollCanvas(evt);
+ ap.getSeqPanel().scrollCanvas(evt);
}
}
*/
package jalview.gui;
-import java.awt.*;
-import java.awt.image.*;
-import javax.swing.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+
+import java.awt.BasicStroke;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Shape;
+import java.awt.image.BufferedImage;
+
+import javax.swing.JComponent;
/**
* DOCUMENT ME!
*/
public void fastPaint(int horizontal, int vertical)
{
- if (fastpainting)
+ if (fastpainting || gg == null)
{
return;
}
fastpainting = true;
- if (gg == null)
- {
- return;
- }
-
fastPaint = true;
gg.copyArea(horizontal * av.charWidth, vertical * av.charHeight,
drawPanel(g, startRes, endx, 0, al.getHeight(), ypos);
- if (av.showAnnotation)
+ if (av.isShowAnnotation())
{
g.translate(0, cHeight + ypos + 3);
if (annotations == null)
annotations = new AnnotationPanel(av);
}
- annotations.renderer.drawComponent(annotations, av, (Graphics2D) g,
+ annotations.renderer.drawComponent(annotations, av, g,
-1, startRes, endx + 1);
g.translate(0, -cHeight - ypos - 3);
}
int getAnnotationHeight()
{
- if (!av.showAnnotation)
+ if (!av.isShowAnnotation())
{
return 0;
}
* @param offset
* DOCUMENT ME!
*/
- void drawPanel(Graphics g1, int startRes, int endRes, int startSeq,
+ public void drawPanel(Graphics g1, int startRes, int endRes,
+ int startSeq,
int endSeq, int offset)
{
if (!av.hasHiddenColumns())
if ((group == null) && (av.getAlignment().getGroups().size() > 0))
{
- group = (SequenceGroup) av.getAlignment().getGroups().get(0);
+ group = av.getAlignment().getGroups().get(0);
groupIndex = 0;
}
break;
}
- group = (SequenceGroup) av.getAlignment().getGroups()
+ group = av.getAlignment().getGroups()
.get(groupIndex);
} while (groupIndex < av.getAlignment().getGroups().size());
*/
package jalview.gui;
-import java.util.*;
-import java.util.List;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import javax.swing.*;
-
-import jalview.commands.*;
-import jalview.datamodel.*;
+import jalview.commands.EditCommand;
+import jalview.commands.EditCommand.Action;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
import jalview.io.SequenceAnnotationReport;
-import jalview.schemes.*;
-import jalview.structure.*;
+import jalview.schemes.ResidueProperties;
+import jalview.structure.SelectionListener;
+import jalview.structure.SelectionSource;
+import jalview.structure.SequenceListener;
+import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Point;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.ToolTipManager;
+
/**
* DOCUMENT ME!
*
private final SequenceAnnotationReport seqARep;
- StringBuffer tooltipText = new StringBuffer("<html>");
+ StringBuffer tooltipText = new StringBuffer();
String tmpString;
pos = setStatusMessage(sequence, res, seq);
if (ssm != null && pos > -1)
+ {
mouseOverSequence(sequence, res, pos);
+ }
tooltipText.setLength(6); // Cuts the buffer back to <html>
{
if (groups[g].getStartRes() <= res && groups[g].getEndRes() >= res)
{
- if (tooltipText.length() > 6)
- {
- tooltipText.append("<br>");
- }
-
if (!groups[g].getName().startsWith("JTreeGroup")
&& !groups[g].getName().startsWith("JGroup"))
{
sequence.getDatasetSequence(),
rpos = sequence.findPosition(res));
seqARep.appendFeatures(tooltipText, rpos, features,
- this.ap.seqPanel.seqCanvas.fr.getMinMax());
+ this.ap.getSeqPanel().seqCanvas.fr.getMinMax());
}
if (tooltipText.length() == 6) // <html></html>
{
}
else
{
- tooltipText.append("</html>");
if (lastTooltip == null
|| !lastTooltip.equals(tooltipText.toString()))
{
- setToolTipText(tooltipText.toString());
+ String formatedTooltipText = JvSwingUtils.wrapTooltip(true,
+ tooltipText.toString());
+ // String formatedTooltipText = tooltipText.toString();
+ setToolTipText(formatedTooltipText);
lastTooltip = tooltipText.toString();
}
}
else
{
- editCommand.appendEdit(EditCommand.INSERT_GAP, groupSeqs,
+ editCommand.appendEdit(Action.INSERT_GAP, groupSeqs,
startres, startres - lastres, av.getAlignment(), true);
}
}
}
else
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, groupSeqs,
+ editCommand.appendEdit(Action.DELETE_GAP, groupSeqs,
startres, lastres - startres, av.getAlignment(), true);
}
}
else
{
- editCommand.appendEdit(EditCommand.INSERT_GAP, new SequenceI[]
+ editCommand.appendEdit(Action.INSERT_GAP, new SequenceI[]
{ seq }, lastres, startres - lastres, av.getAlignment(), true);
}
}
if (max > 0)
{
- editCommand.appendEdit(EditCommand.DELETE_GAP,
+ editCommand.appendEdit(Action.DELETE_GAP,
new SequenceI[]
{ seq }, startres, max, av.getAlignment(), true);
}
}
else
{
- editCommand.appendEdit(EditCommand.INSERT_NUC, new SequenceI[]
+ editCommand.appendEdit(Action.INSERT_NUC, new SequenceI[]
{ seq }, lastres, startres - lastres, av.getAlignment(), true);
}
}
}
}
- editCommand.appendEdit(EditCommand.DELETE_GAP, seq, blankColumn, 1,
+ editCommand.appendEdit(Action.DELETE_GAP, seq, blankColumn, 1,
av.getAlignment(), true);
- editCommand.appendEdit(EditCommand.INSERT_GAP, seq, j, 1,
+ editCommand.appendEdit(Action.INSERT_GAP, seq, j, 1,
av.getAlignment(), true);
}
void deleteChar(int j, SequenceI[] seq, int fixedColumn)
{
- editCommand.appendEdit(EditCommand.DELETE_GAP, seq, j, 1,
+ editCommand.appendEdit(Action.DELETE_GAP, seq, j, 1,
av.getAlignment(), true);
- editCommand.appendEdit(EditCommand.INSERT_GAP, seq, fixedColumn, 1,
+ editCommand.appendEdit(Action.INSERT_GAP, seq, fixedColumn, 1,
av.getAlignment(), true);
}
}
}
- ap.seqPanel.seqCanvas.repaint();
+ ap.getSeqPanel().seqCanvas.repaint();
}
/**
*/
package jalview.gui;
-import java.util.*;
+import jalview.jbgui.GWebserviceInfo;
+import jalview.util.MessageManager;
+import jalview.ws.WSClientI;
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-import javax.swing.*;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GridLayout;
+import java.awt.Image;
+import java.awt.MediaTracker;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.image.BufferedImage;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JEditorPane;
+import javax.swing.JInternalFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JProgressBar;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
-import jalview.jbgui.*;
-import jalview.util.MessageManager;
-import jalview.ws.WSClientI;
-
/**
* Base class for web service client thread and gui TODO: create StAX parser to
* extract html body content reliably when preparing html formatted job statuses
JInternalFrame frame;
+ @Override
+ public void setVisible(boolean aFlag)
+ {
+ super.setVisible(aFlag);
+ frame.setVisible(aFlag);
+ };
+
JTabbedPane subjobs = null;
java.util.Vector jobPanes = null;
* short name and job type
* @param info
* reference or other human readable description
+ * @param makeVisible
+ * true to display the webservices window immediatly (otherwise need
+ * to call setVisible(true))
*/
- public WebserviceInfo(String title, String info)
+ public WebserviceInfo(String title, String info, boolean makeVisible)
{
- init(title, info, 520, 500);
+ init(title, info, 520, 500, makeVisible);
}
/**
* @param height
* DOCUMENT ME!
*/
- public WebserviceInfo(String title, String info, int width, int height)
+ public WebserviceInfo(String title, String info, int width, int height,
+ boolean makeVisible)
{
- init(title, info, width, height);
+ init(title, info, width, height, makeVisible);
}
/**
* @param height
* DOCUMENT ME!
*/
- void init(String title, String info, int width, int height)
+ void init(String title, String info, int width, int height,
+ boolean makeVisible)
{
frame = new JInternalFrame();
frame.setContentPane(this);
- Desktop.addInternalFrame(frame, title, width, height);
+ Desktop.addInternalFrame(frame, title, makeVisible, width, height);
frame.setClosable(false);
this.title = title;
frame = new JDialog(Desktop.instance, true);
- frame.setTitle(MessageManager.formatMessage("label.edit_params_for", new String[]{service.getActionText()}));
+ frame.setTitle(MessageManager.formatMessage("label.edit_params_for",
+ new String[]
+ { service.getActionText() }));
Rectangle deskr = Desktop.instance.getBounds();
Dimension pref = this.getPreferredSize();
frame.setBounds(new Rectangle(
setDescr.setToolTipText(MessageManager
.getString("label.edit_notes_parameter_set"));
JScrollPane setDescrView = new JScrollPane();
- // setDescrView.setPreferredSize(new Dimension(350, 200));
setDescrView.getViewport().setView(setDescr);
setName.setEditable(true);
setName.addItemListener(this);
JPanel dialogpanel = new JPanel();
dialogpanel.add(startjob);
dialogpanel.add(canceljob);
+ // JAL-1580: setMaximumSize() doesn't work, so just size for the worst case:
+ setPreferredSize(new Dimension(540, Desktop.instance.getHeight()));
add(dialogpanel, BorderLayout.SOUTH);
validate();
}
protected void revert_actionPerformed(ActionEvent e)
{
reInitDialog(lastParmSet);
-
+ updateWebServiceMenus();
}
protected void update_actionPerformed(ActionEvent e)
_deleteUserPreset(lastParmSet);
}
reInitDialog(null); // service default
+ updateWebServiceMenus();
}
protected void create_actionPerformed(ActionEvent e)
_storeCurrentPreset(curname);
lastParmSet = curname;
isUserPreset = true;
+ reInitDialog(curname);
initArgSetModified();
+ updateWebServiceMenus();
}
else
{
Hashtable exnames = new Hashtable();
for (int i = 0, iSize = setName.getItemCount(); i < iSize; i++)
{
- exnames.put((String) setName.getItemAt(i), setName.getItemAt(i));
+ exnames.put(setName.getItemAt(i), setName.getItemAt(i));
}
servicePresets = new Hashtable();
// Add the default entry - if not present already.
{
Vector<String> services = new Vector<String>();
services.addElement(args[p++]);
- Jws2Discoverer.setServiceUrls(services);
+ Jws2Discoverer.getDiscoverer().setServiceUrls(services);
}
try
{
}
WsJobParameters pgui = new WsJobParameters(lastserv,
new JabaPreset(lastserv, pr));
- JFrame jf = new JFrame(MessageManager.formatMessage("label.ws_parameters_for", new String[]{lastserv.getActionText()}));
+ JFrame jf = new JFrame(MessageManager.formatMessage(
+ "label.ws_parameters_for", new String[]
+ { lastserv.getActionText() }));
JPanel cont = new JPanel(new BorderLayout());
pgui.validate();
cont.setPreferredSize(pgui.getPreferredSize());
SetNamePanel.validate();
validate();
settingDialog = false;
+ }
+ /**
+ * Rebuild the AlignFrame web service menus (after add/delete of a preset
+ * option).
+ */
+ protected void updateWebServiceMenus()
+ {
+ for (AlignFrame alignFrame : Desktop.getAlignframes())
+ {
+ alignFrame.BuildWebServiceMenu();
+ }
}
String curSetName = null;
if (src.getParent() == setName)
{
// rename any existing records we know about for this set.
- String newname = (String) e.getActionCommand().trim();
+ String newname = e.getActionCommand().trim();
String msg = null;
if (isServicePreset(newname))
{
{
public void run()
{
- JOptionPane.showMessageDialog(ourframe,
- MessageManager.getString("label.invalid_name_preset_exists"),
- MessageManager.getString("label.invalid_name"), JOptionPane.WARNING_MESSAGE);
+ JOptionPane.showMessageDialog(ourframe, MessageManager
+ .getString("label.invalid_name_preset_exists"),
+ MessageManager.getString("label.invalid_name"),
+ JOptionPane.WARNING_MESSAGE);
}
});
*/
package jalview.gui;
+import jalview.bin.Cache;
+import jalview.io.JalviewFileChooser;
+import jalview.util.MessageManager;
+import jalview.ws.params.ParamDatastoreI;
+import jalview.ws.params.ParamManager;
+import jalview.ws.params.WsParamSetI;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.swing.JOptionPane;
-import jalview.bin.Cache;
-import jalview.io.JalviewFileChooser;
-import jalview.util.MessageManager;
-import jalview.ws.params.ParamDatastoreI;
-import jalview.ws.params.ParamManager;
-import jalview.ws.params.WsParamSetI;
-
/**
* store and retrieve web service parameter sets.
*
{
if (filename != null && !((outfile = new File(filename)).canWrite()))
{
- Cache.log.info("Can't write to " + filename
+ Cache.log.warn("Can't write to " + filename
+ " - Prompting for new file to write to.");
filename = null;
}
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
+import java.util.List;
import java.util.Vector;
import javax.swing.JLabel;
initFromPreferences();
}
- Vector<String> wsUrls, oldUrls, rsbsUrls, oldRsbsUrls;
+ List<String> wsUrls;
+
+ Vector<String> oldUrls, rsbsUrls, oldRsbsUrls;
private boolean needWsMenuUpdate;
private void initFromPreferences()
{
- wsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
- if (wsUrls != null)
+ wsUrls = Jws2Discoverer.getDiscoverer().getServiceUrls();
+ if (!wsUrls.isEmpty())
{
oldUrls = new Vector<String>(wsUrls);
}
private void updateServiceList()
{
- jalview.ws.jws2.Jws2Discoverer.setServiceUrls(wsUrls);
+ Jws2Discoverer.getDiscoverer().setServiceUrls(wsUrls);
}
private void updateRsbsServiceList()
int sel = wsList.getSelectedRow();
if (sel > -1)
{
- wsUrls.removeElementAt(sel);
+ wsUrls.remove(sel);
update++;
updateList();
}
int sel = wsList.getSelectedRow();
if (sel > -1)
{
- String url = editUrl(wsUrls.elementAt(sel), MessageManager.getString("label.edit_jabaws_url"));
+ String url = editUrl(wsUrls.get(sel),
+ MessageManager.getString("label.edit_jabaws_url"));
if (url != null)
{
int present = wsUrls.indexOf(url);
if (present == -1)
{
update++;
- wsUrls.setElementAt(url, sel);
+ wsUrls.set(sel, url);
updateList();
}
else
{
if (present != sel)
{
- wsUrls.removeElementAt(sel);
+ wsUrls.remove(sel);
updateList();
}
}
if (p > -1 && p < wsUrls.size() - 1)
{
String t = wsUrls.get(p + 1);
- wsUrls.setElementAt(wsUrls.elementAt(p), p + 1);
- wsUrls.setElementAt(t, p);
+ wsUrls.set(p + 1, wsUrls.get(p));
+ wsUrls.set(p, t);
updateList();
wsList.getSelectionModel().setSelectionInterval(p + 1, p + 1);
update++;
if (p > 0)
{
String t = wsUrls.get(p - 1);
- wsUrls.setElementAt(wsUrls.elementAt(p), p - 1);
- wsUrls.setElementAt(t, p);
+ wsUrls.set(p - 1, wsUrls.get(p));
+ wsUrls.set(p, t);
updateList();
wsList.getSelectionModel().setSelectionInterval(p - 1, p - 1);
update++;
Desktop.desktop,
MessageManager.getString("info.validate_jabaws_server"),
MessageManager.getString("label.test_server"), JOptionPane.YES_NO_OPTION);
+
if (validate == JOptionPane.OK_OPTION)
{
- if (jalview.ws.jws2.Jws2Discoverer.testServiceUrl(foo))
+ if (Jws2Discoverer.testServiceUrl(foo))
{
return foo.toString();
}
else
{
- JOptionPane
- .showInternalMessageDialog(
+ int opt = JOptionPane
+ .showInternalOptionDialog(
Desktop.desktop,
- MessageManager.getString("warn.server_didnt_pass_validation"));
+ "The Server '"
+ + foo.toString()
+ + "' failed validation,\ndo you want to add it anyway? ",
+ "Server Validation Failed",
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.INFORMATION_MESSAGE, null, null, null);
+ if (opt == JOptionPane.YES_OPTION)
+ {
+ return foo.toString();
+ }
+ else
+ {
+ JOptionPane
+ .showInternalMessageDialog(
+ Desktop.desktop,
+ MessageManager
+ .getString("warn.server_didnt_pass_validation"));
+ }
+
+
}
}
else
int selind = wsList.getSelectedRow();
if (selind > -1)
{
- wsUrls.insertElementAt(url, selind);
+ wsUrls.add(selind, url);
}
else
{
- wsUrls.addElement(url);
+ wsUrls.add(url);
}
update++;
updateList();
@Override
protected void resetWs_actionPerformed(ActionEvent e)
{
- jalview.ws.jws2.Jws2Discoverer.setServiceUrls(null);
- Vector nwsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
+ Jws2Discoverer.getDiscoverer().setServiceUrls(null);
+ List<String> nwsUrls = Jws2Discoverer.getDiscoverer().getServiceUrls();
if (!wsUrls.equals(nwsUrls))
{
update++;
public static String CLASSLOADER = "ClassLoader";
+ /**
+ * add jalview-derived non-secondary structure annotation from PDB structure
+ */
+ boolean annotFromStructure = false;
+
+ /**
+ * add secondary structure from PDB data with built-in algorithms
+ */
+ boolean localSecondaryStruct = false;
+
+ /**
+ * process PDB data with web services
+ */
+ boolean serviceSecondaryStruct = false;
+
AlignFile afile = null;
String inFile;
}
else if (format.equals("PDB"))
{
- afile = new MCview.PDBfile(true,true,inFile, type);
+ afile = new MCview.PDBfile(annotFromStructure,
+ localSecondaryStruct, serviceSecondaryStruct, inFile, type);
// Uncomment to test Jmol data based PDB processing: JAL-1213
// afile = new jalview.ext.jmol.PDBFileWithJmol(inFile, type);
}
}
else if (format.equals("PDB"))
{
- afile = new MCview.PDBfile(true,true,source);
+ afile = new MCview.PDBfile(annotFromStructure,
+ localSecondaryStruct, serviceSecondaryStruct, source);
}
else if (format.equals("STH"))
{
package jalview.io;
+import jalview.api.FeaturesDisplayedI;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.exceptions.NoFileSelectedException;
import jalview.gui.AlignViewport;
import jalview.gui.AlignmentPanel;
import jalview.gui.FeatureRenderer;
-import jalview.gui.SequenceRenderer;
import jalview.json.binding.v1.BioJsAlignmentPojo;
import jalview.json.binding.v1.BioJsFeaturePojo;
import jalview.json.binding.v1.BioJsSeqPojo;
import jalview.schemes.ColourSchemeProperty;
import jalview.util.MessageManager;
+import java.awt.Color;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
{
private AlignViewport av;
- private FeatureRenderer fr;
+ private jalview.api.FeatureRenderer fr;
- public BioJsHTMLOutput(AlignmentPanel ap, SequenceRenderer sr,
+ private String globalColorScheme;
+
+ private FeaturesDisplayedI displayedFeatures;
+
+ private String jalviewVersion;
+
+ private String webStartLaunchServletUrl = "http://www.jalview.org/services/launchApp";
+
+ public BioJsHTMLOutput(AlignmentPanel ap,
FeatureRenderer fr1)
{
- this.av = ap.av;
- this.fr = new FeatureRenderer(ap);
- fr.transferSettings(fr1);
- exportAsBioJsHtml();
+ jalviewVersion = jalview.bin.Cache.getProperty("VERSION");
+ webStartLaunchServletUrl = jalview.bin.Cache.getDefault(
+ "www.jalview.org", "http://www.jalview.org")
+ + "/services/launchApp";
+ if (ap != null)
+ {
+ this.av = ap.av;
+ this.globalColorScheme = ColourSchemeProperty.getColourName(av
+ .getGlobalColourScheme());
+ this.fr = ap.cloneFeatureRenderer();
+ displayedFeatures = av.getFeaturesDisplayed();
+
+ exportJalviewAlignmentAsBioJsHtmlFile();
+ }
}
- private void exportAsBioJsHtml()
+ private void exportJalviewAlignmentAsBioJsHtmlFile()
{
try
{
- JalviewFileChooser jvFileChooser = getJalviewFileChooserOption();
- int fileChooserOpt = jvFileChooser.showSaveDialog(null);
- if (fileChooserOpt == JalviewFileChooser.APPROVE_OPTION)
- {
- jalview.bin.Cache.setProperty("LAST_DIRECTORY", jvFileChooser
- .getSelectedFile().getParent());
- String selectedFile = jvFileChooser.getSelectedFile().getPath();
- String generartedBioJs = generateBioJsAlignmentData(av
- .getAlignment());
- PrintWriter out = new java.io.PrintWriter(new java.io.FileWriter(
- selectedFile));
- out.print(generartedBioJs);
- out.close();
- jalview.util.BrowserLauncher.openURL("file:///" + selectedFile);
- }
- } catch (Exception ex)
+ String outputFile = getOutputFile();
+ String jalviewAlignmentJson = getJalviewAlignmentAsJsonString(av
+ .getAlignment());
+ String bioJSTemplateString = getBioJsTemplateAsString(this);
+ String generatedBioJsWithJalviewAlignmentAsJson = bioJSTemplateString
+ .replaceAll(
+"#sequenceData#", jalviewAlignmentJson)
+ .toString();
+
+ PrintWriter out = new java.io.PrintWriter(new java.io.FileWriter(
+ outputFile));
+ out.print(generatedBioJsWithJalviewAlignmentAsJson);
+ out.flush();
+ out.close();
+ jalview.util.BrowserLauncher.openURL("file:///" + outputFile);
+ } catch (NoFileSelectedException ex)
+ {
+ // do noting if no file was selected
+ } catch (Exception e)
{
- ex.printStackTrace();
+ e.printStackTrace();
}
}
- private JalviewFileChooser getJalviewFileChooserOption()
+ public String getOutputFile() throws NoFileSelectedException
{
- JalviewFileChooser chooser = new JalviewFileChooser(
+ String selectedFile = null;
+ JalviewFileChooser jvFileChooser = new JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
{ "html" }, new String[]
{ "HTML files" }, "HTML files");
- chooser.setFileView(new JalviewFileView());
+ jvFileChooser.setFileView(new JalviewFileView());
// TODO uncomment when supported by MassageManager
- chooser.setDialogTitle(MessageManager
+ jvFileChooser.setDialogTitle(MessageManager
.getString("label.save_as_biojs_html"));
- chooser.setDialogTitle("save as BioJs HTML");
- chooser.setToolTipText(MessageManager.getString("action.save"));
+ jvFileChooser.setDialogTitle("save as BioJs HTML");
+ jvFileChooser.setToolTipText(MessageManager.getString("action.save"));
+
+ int fileChooserOpt = jvFileChooser.showSaveDialog(null);
+ if (fileChooserOpt == JalviewFileChooser.APPROVE_OPTION)
+ {
+ jalview.bin.Cache.setProperty("LAST_DIRECTORY", jvFileChooser
+ .getSelectedFile().getParent());
+ selectedFile = jvFileChooser.getSelectedFile().getPath();
+ }
+ else
+ {
+ throw new NoFileSelectedException("No file was selected.");
+ }
- return chooser;
+ return selectedFile;
}
- private String generateBioJsAlignmentData(AlignmentI alignment)
+ public String getJalviewAlignmentAsJsonString(AlignmentI alignment)
throws IOException, JSONException
{
BioJsAlignmentPojo bjsAlignment = new BioJsAlignmentPojo();
- bjsAlignment.setGlobalColorScheme(ColourSchemeProperty.getColourName(av
- .getGlobalColourScheme()));
- // av.setGlobalColourScheme(cs);
+ bjsAlignment.setGlobalColorScheme(getGlobalColorScheme());
+ bjsAlignment.setJalviewVersion(jalviewVersion);
+ bjsAlignment.setWebStartUrl(webStartLaunchServletUrl);
+
int count = 0;
for (SequenceI seq : alignment.getSequences())
{
StringBuilder name = new StringBuilder();
name.append(seq.getName()).append("/").append(seq.getStart())
.append("-").append(seq.getEnd());
- // BioJsSeqPojo seqPojo = new BioJsSeqPojo(seq.getStart(), seq.getEnd(),
- // String.valueOf(++count),
- // name.toString(), seq.getSequenceAsString());
- //
+
BioJsSeqPojo seqPojo = new BioJsSeqPojo();
seqPojo.setId(String.valueOf(++count));
seqPojo.setEnd(seq.getEnd());
.getSequenceFeatures();
if (seqFeatures != null)
{
-
ArrayList<BioJsFeaturePojo> bjsSeqFeatures = new ArrayList<BioJsFeaturePojo>();
for (SequenceFeature sf : seqFeatures)
{
-
- String featureColour = jalview.util.Format.getHexString(fr
- .getColour(sf));
- BioJsFeaturePojo bjsFeature = new BioJsFeaturePojo();
- bjsFeature.setFillColor(featureColour);
- bjsFeature.setXstart(sf.getBegin());
- bjsFeature.setXend(sf.getEnd());
- bjsFeature.setText(sf.getType());
-
- bjsSeqFeatures.add(bjsFeature);
-
+ if (displayedFeatures != null
+ && displayedFeatures.isVisible(sf.getType()))
+ {
+
+ // TODO: translate graduated/complex colourschemes to biojs model
+ String featureColour = jalview.util.Format.getHexString(fr
+ .findFeatureColour(Color.white, seq,
+ seq.findIndex(sf.getBegin())));
+ BioJsFeaturePojo bjsFeature = new BioJsFeaturePojo();
+ bjsFeature.setFillColor(featureColour);
+ bjsFeature.setXstart(seq.findIndex(sf.getBegin()) - 1);
+ bjsFeature.setXend(seq.findIndex(sf.getEnd()));
+ bjsFeature.setText(sf.getType());
+ bjsSeqFeatures.add(bjsFeature);
+ }
}
-
seqPojo.setFeatures(bjsSeqFeatures);
}
bjsAlignment.getSeqs().add(seqPojo);
}
- String jalviewData = new com.json.JSONObject(bjsAlignment).toString()
+ return new com.json.JSONObject(bjsAlignment).toString()
.replaceAll("xstart", "xStart").replaceAll("xend", "xEnd");
- // String bioJSTemplate = new String(
- // java.nio.file.Files.readAllBytes(java.nio.file.Paths
- // .get("resources/templates/BioJSTemplate.txt")));
- String bioJSTemplate = getBioJsTemplateAsString(this);
-
- return bioJSTemplate.replaceAll("#sequenceData#", jalviewData)
- .replaceAll(
- "#jalview_logo#",
- alignment.getClass()
- .getResource("/images/Jalview_Logo.png")
- .toString());
}
public static String getBioJsTemplateAsString(Object currentObj)
}
}
}
-
return sb.toString();
}
+ public String getGlobalColorScheme()
+ {
+ return globalColorScheme;
+ }
+
+ public void setGlobalColorScheme(String globalColorScheme)
+ {
+ this.globalColorScheme = globalColorScheme;
+ }
+
}
public class FormatAdapter extends AppletFormatAdapter
{
+ public FormatAdapter()
+ {
+ super();
+ if (jalview.bin.Cache.getDefault("STRUCT_FROM_PDB", true))
+ {
+ annotFromStructure = jalview.bin.Cache.getDefault("ADD_TEMPFACT_ANN",
+ true);
+ localSecondaryStruct = jalview.bin.Cache.getDefault("ADD_SS_ANN",
+ true);
+ serviceSecondaryStruct = jalview.bin.Cache.getDefault("USE_RNAVIEW",
+ true);
+ }
+ else
+ {
+ // disable all PDB annotation options
+ annotFromStructure = false;
+ localSecondaryStruct = false;
+ serviceSecondaryStruct = false;
+ }
+ }
public String formatSequences(String format, SequenceI[] seqs,
String[] omitHiddenColumns)
{
JSONObject sequence = sequenceIter.next();
String sequcenceString = sequence.get("seq").toString();
Sequence seq = new Sequence(sequence.get("name").toString(),
- sequcenceString, 0, sequcenceString.length());
+ sequcenceString, Integer.valueOf(sequence.get("start")
+ .toString()), Integer.valueOf(sequence.get("end")
+ .toString()));
JSONArray jsonSeqArray = (JSONArray) sequence.get("features");
- SequenceFeature[] retrievedSeqFeatures = getJalviewSequenceFeatures(jsonSeqArray);
+ SequenceFeature[] retrievedSeqFeatures = getJalviewSequenceFeatures(
+ jsonSeqArray, seq);
if (retrievedSeqFeatures != null)
{
seq.setSequenceFeatures(retrievedSeqFeatures);
}
public SequenceFeature[] getJalviewSequenceFeatures(
- JSONArray jsonSeqFeatures)
+ JSONArray jsonSeqFeatures, Sequence seq)
{
SequenceFeature[] seqFeatures = null;
int count = 0;
if (jsonSeqFeatures != null)
{
seqFeatures = new SequenceFeature[jsonSeqFeatures.size()];
- for (Iterator<JSONObject> seqFeatureItr = jsonSeqFeatures.iterator(); seqFeatureItr
+ for (@SuppressWarnings("unchecked")
+ Iterator<JSONObject> seqFeatureItr = jsonSeqFeatures.iterator(); seqFeatureItr
.hasNext();)
{
Long begin = (Long) jsonFeature.get("xStart");
Long end = (Long) jsonFeature.get("xEnd");
String type = (String) jsonFeature.get("text");
+ // String color = (String) jsonFeature.get("fillColor");
- String color = (String) jsonFeature.get("fillColor");
-
- sequenceFeature.setBegin(begin.intValue());
- sequenceFeature.setEnd(end.intValue());
+ sequenceFeature.setBegin(seq.findPosition(begin.intValue()));
+ sequenceFeature.setEnd(seq.findPosition(end.intValue()) - 1);
sequenceFeature.setType(type);
seqFeatures[count++] = sequenceFeature;
}
--- /dev/null
+package jalview.io;
+
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignViewport;
+import jalview.gui.AlignmentPanel;
+import jalview.gui.AnnotationPanel;
+import jalview.gui.FeatureRenderer;
+import jalview.gui.HTMLOptions;
+import jalview.math.AlignmentDimension;
+import jalview.util.MessageManager;
+
+import java.awt.Color;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import org.jfree.graphics2d.svg.SVGGraphics2D;
+import org.jfree.graphics2d.svg.SVGHints;
+
+public class HtmlSvgOutput
+{
+ AlignViewport av;
+
+ FeatureRenderer fr;
+ AlignmentPanel ap;
+
+ AnnotationPanel annotationPanel;
+
+ public HtmlSvgOutput(File file, AlignmentPanel ap)
+ {
+
+ this.av = ap.av;
+ this.ap = ap;
+ this.annotationPanel = ap.getAnnotationPanel();
+ generateHtmlSvgOutput(file);
+ }
+
+ public void generateHtmlSvgOutput(File file)
+ {
+ try
+ {
+ if (file == null /*
+ * && !(System.getProperty("java.awt.headless") != null
+ * && System
+ * .getProperty("java.awt.headless").equals("true"))
+ */)
+ {
+
+ JalviewFileChooser chooser = getHTMLChooser();
+ chooser.setFileView(new jalview.io.JalviewFileView());
+ chooser.setDialogTitle(ap.alignFrame.getTitle());
+ chooser.setToolTipText(MessageManager.getString("action.save"));
+ int value = chooser.showSaveDialog(ap.alignFrame);
+
+ if (value == jalview.io.JalviewFileChooser.APPROVE_OPTION)
+ {
+ jalview.bin.Cache.setProperty("LAST_DIRECTORY", chooser
+ .getSelectedFile().getParent());
+ file = chooser.getSelectedFile();
+ }
+ }
+
+ AlignmentDimension aDimension = ap.getAlignmentDimension();
+ SVGGraphics2D g1 = new SVGGraphics2D(aDimension.getWidth(),
+ aDimension.getHeight());
+ SVGGraphics2D g2 = new SVGGraphics2D(aDimension.getWidth(),
+ aDimension.getHeight());
+
+ String renderStyle = jalview.bin.Cache.getDefault("HTML_RENDERING",
+ "Prompt each time");
+
+ // If we need to prompt, and if the GUI is visible then
+ // Prompt for rendering style
+ if (renderStyle.equalsIgnoreCase("Prompt each time")
+ && !(System.getProperty("java.awt.headless") != null && System
+ .getProperty("java.awt.headless").equals("true")))
+ {
+ HTMLOptions svgOption = new HTMLOptions();
+ renderStyle = svgOption.getValue();
+
+ if (renderStyle == null || svgOption.cancelled)
+ {
+ return;
+ }
+ }
+
+ if (renderStyle.equalsIgnoreCase("lineart"))
+ {
+ g1.setRenderingHint(SVGHints.KEY_DRAW_STRING_TYPE,
+ SVGHints.VALUE_DRAW_STRING_TYPE_VECTOR);
+ g2.setRenderingHint(SVGHints.KEY_DRAW_STRING_TYPE,
+ SVGHints.VALUE_DRAW_STRING_TYPE_VECTOR);
+ }
+ printUnwrapped(aDimension.getWidth(), aDimension.getHeight(), 0, g1,
+ g2);
+ FileOutputStream out = new FileOutputStream(file);
+
+ String titleSvgData = g1.getSVGDocument();
+ String alignSvgData = g2.getSVGDocument();
+ String htmlData = getHtml(titleSvgData, alignSvgData);
+
+ out.write(htmlData.getBytes());
+ out.flush();
+ out.close();
+ if (!(System.getProperty("java.awt.headless") != null && System
+ .getProperty("java.awt.headless").equals("true")))
+ {
+ jalview.util.BrowserLauncher.openURL("file:///" + file);
+ }
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ static JalviewFileChooser getHTMLChooser()
+ {
+ return new jalview.io.JalviewFileChooser(
+ jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[]
+ { "html" }, new String[]
+ { "Hypertext Markup Language" }, "Hypertext Markup Language");
+ }
+
+ public int printUnwrapped(int pwidth, int pheight, int pi, Graphics... pg)
+ throws PrinterException
+ {
+ int idWidth = ap.getVisibleIdWidth(false);
+ FontMetrics fm = ap.getFontMetrics(av.getFont());
+ int scaleHeight = av.getCharHeight() + fm.getDescent();
+
+ pg[0].setColor(Color.white);
+ pg[0].fillRect(0, 0, pwidth, pheight);
+ pg[0].setFont(av.getFont());
+
+ // //////////////////////////////////
+ // / How many sequences and residues can we fit on a printable page?
+ int totalRes = (pwidth - idWidth) / av.getCharWidth();
+ int totalSeq = (pheight - scaleHeight) / av.getCharHeight() - 1;
+ int pagesWide = (av.getAlignment().getWidth() / totalRes) + 1;
+
+ // ///////////////////////////
+ // / Only print these sequences and residues on this page
+ int startRes;
+
+ // ///////////////////////////
+ // / Only print these sequences and residues on this page
+ int endRes;
+
+ // ///////////////////////////
+ // / Only print these sequences and residues on this page
+ int startSeq;
+
+ // ///////////////////////////
+ // / Only print these sequences and residues on this page
+ int endSeq;
+ startRes = (pi % pagesWide) * totalRes;
+ endRes = (startRes + totalRes) - 1;
+
+ if (endRes > (av.getAlignment().getWidth() - 1))
+ {
+ endRes = av.getAlignment().getWidth() - 1;
+ }
+ startSeq = (pi / pagesWide) * totalSeq;
+ endSeq = startSeq + totalSeq;
+ if (endSeq > av.getAlignment().getHeight())
+ {
+ endSeq = av.getAlignment().getHeight();
+ }
+ int pagesHigh = ((av.getAlignment().getHeight() / totalSeq) + 1)
+ * pheight;
+ if (av.isShowAnnotation())
+ {
+ pagesHigh += ap.getAnnotationPanel().adjustPanelHeight() + 3;
+ }
+ pagesHigh /= pheight;
+ if (pi >= (pagesWide * pagesHigh))
+ {
+ return Printable.NO_SUCH_PAGE;
+ }
+
+ // draw Scale
+ pg[1].translate(0, 0);
+ ap.getScalePanel().drawScale(pg[1], startRes, endRes, pwidth - idWidth,
+ scaleHeight);
+ pg[1].translate(-idWidth, scaleHeight);
+
+ // //////////////
+ // Draw the ids
+ Color currentColor = null;
+ Color currentTextColor = null;
+ pg[0].translate(0, scaleHeight);
+ pg[0].setFont(ap.getIdPanel().getIdCanvas().getIdfont());
+ SequenceI seq;
+ for (int i = startSeq; i < endSeq; i++)
+ {
+ seq = av.getAlignment().getSequenceAt(i);
+ if ((av.getSelectionGroup() != null)
+ && av.getSelectionGroup().getSequences(null).contains(seq))
+ {
+ currentColor = Color.gray;
+ currentTextColor = Color.black;
+ }
+ else
+ {
+ currentColor = av.getSequenceColour(seq);
+ currentTextColor = Color.black;
+ }
+ pg[0].setColor(currentColor);
+ pg[0].fillRect(0, (i - startSeq) * av.getCharHeight(), idWidth,
+ av.getCharHeight());
+ pg[0].setColor(currentTextColor);
+ int xPos = 0;
+ if (av.isRightAlignIds())
+ {
+ fm = pg[0].getFontMetrics();
+ xPos = idWidth
+ - fm.stringWidth(seq.getDisplayId(av.getShowJVSuffix()))
+ - 4;
+ }
+ pg[0].drawString(
+ seq.getDisplayId(av.getShowJVSuffix()),
+ xPos,
+ (((i - startSeq) * av.getCharHeight()) + av.getCharHeight())
+ - (av.getCharHeight() / 5));
+ }
+ pg[0].setFont(av.getFont());
+ pg[0].translate(idWidth, 0);
+
+ // draw main sequence panel
+ pg[1].translate(idWidth, 0);
+ ap.getSeqPanel().seqCanvas.drawPanel(pg[1], startRes, endRes, startSeq,
+ endSeq, 0);
+ if (av.isShowAnnotation() && (endSeq == av.getAlignment().getHeight()))
+ {
+ // draw annotation label - need to offset for current scroll position
+ int offset = -ap.getAlabels().getScrollOffset();
+ pg[0].translate(0, offset);
+ pg[0].translate(-idWidth - 3,
+ (endSeq - startSeq) * av.getCharHeight() + 3);
+ ap.getAlabels().drawComponent(pg[0], idWidth);
+ pg[0].translate(idWidth + 3, 0);
+ pg[0].translate(0, -offset);
+
+ // draw annotation - need to offset for current scroll position
+ pg[1].translate(0, offset);
+ pg[1].translate(-idWidth - 3,
+ (endSeq - startSeq) * av.getCharHeight() + 3);
+ pg[1].translate(idWidth + 3, 0);
+ ap.getAnnotationPanel().renderer.drawComponent(
+ ap.getAnnotationPanel(), av, pg[1], -1, startRes, endRes + 1);
+ pg[1].translate(0, -offset);
+ }
+
+ return Printable.PAGE_EXISTS;
+ }
+
+ private String getHtml(String titleSvg, String alignmentSvg)
+ {
+ StringBuilder htmlSvg = new StringBuilder();
+ htmlSvg.append("<html><style type=\"text/css\"> div.title {"
+ + "height: 100%; width:11%; float: left; }"
+ + "div.align { height: 100%; width:89%;"
+ + "overflow: scroll; float: right; } </style>"
+ + "<div style=\"width:100%; height:100%; overflow: hidden\">"
+ + "<div class=\"title\">");
+ htmlSvg.append(titleSvg);
+ htmlSvg.append("</div><div class=\"align\">").append(alignmentSvg);
+ htmlSvg.append("</div>");
+ return htmlSvg.toString();
+ }
+}
break;
}
- if (data.matches("<(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
+ // if (data.matches("<(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
+ if (data.matches("<(?i)html(\"[^\"]*\"|'[^']*'|[^'\">])*>"))
{
reply = "HTML";
break;
}
- if ((data.indexOf("<") > -1))
+ if (data.matches("<(?i)rnaml (\"[^\"]*\"|'[^']*'|[^'\">])*>"))
{
reply = "RNAML";
*/
package jalview.io;
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-
import jalview.analysis.SecStrConsensus.SimpleBP;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceI;
import jalview.util.MessageManager;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import com.stevesoft.pat.Regex;
+
import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied;
int end = seq.length();
id = current.getName();
+ if (id == null || id.trim().length() == 0)
+ {
+ id = safeName(getDataName());
+ if (result.size() > 1)
+ {
+ id += "." + i;
+ }
+ }
seqs[i] = new Sequence(id, seq, begin, end);
seqs[i].setEnd(seqs[i].findPosition(seqs[i].getLength()));
annot[k]).charAt(0), 0f);
}
- AlignmentAnnotation align = new AlignmentAnnotation("Sec. str.",
- current.getID(), ann);
+ AlignmentAnnotation align = new AlignmentAnnotation(
+ "Secondary Structure",
+ current.getID().trim().length() > 0 ? "Secondary Structure for "
+ + current.getID()
+ : "", ann);
seqs[i].addAlignmentAnnotation(align);
seqs[i].setRNA(result.get(i));
private String safeName(String dataName)
{
int b = 0;
- while ((b = dataName.indexOf("/")) > -1 && b < dataName.length())
+ if ((b = dataName.lastIndexOf(".")) > 0)
{
- dataName = dataName.substring(b + 1).trim();
-
+ dataName = dataName.substring(0, b - 1);
+ }
+ b = 0;
+ Regex m = new Regex("[\\/]?([-A-Za-z0-9]+)\\.?");
+ String mm = dataName;
+ while (m.searchFrom(dataName, b))
+ {
+ mm = m.stringMatched();
+ b = m.matchedTo();
}
- int e = (dataName.length() - dataName.indexOf(".")) + 1;
- dataName = dataName.substring(1, e).trim();
- return dataName;
+ return mm;
}
}
*/
package jalview.io;
-import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
import java.util.StringTokenizer;
import java.util.Vector;
String version;
// String id;
Hashtable seqAnn = new Hashtable(); // Sequence related annotations
- Hashtable seqs = new Hashtable();
+ LinkedHashMap<String, String> seqs = new LinkedHashMap<String, String>();
Regex p, r, rend, s, x;
// Temporary line for processing RNA annotation
// String RNAannot = "";
r = new Regex("# STOCKHOLM ([\\d\\.]+)");
if (!r.search(nextLine()))
{
- throw new IOException(MessageManager.getString("exception.stockholm_invalid_format"));
+ throw new IOException(
+ MessageManager
+ .getString("exception.stockholm_invalid_format"));
}
else
{
}
}
// logger.debug("Number of sequences: " + this.noSeqs);
- Enumeration accs = seqs.keys();
- while (accs.hasMoreElements())
+ for (Map.Entry<String, String> skey : seqs.entrySet())
{
- String acc = (String) accs.nextElement();
// logger.debug("Processing sequence " + acc);
- String seq = (String) seqs.remove(acc);
+ String acc = skey.getKey();
+ String seq = skey.getValue();
if (maxLength < seq.length())
{
maxLength = seq.length();
AlignmentAnnotation an = (AlignmentAnnotation) vv
.elementAt(ii);
seqO.addAlignmentAnnotation(an);
+ annotations.add(an);
}
}
}
if (!x.search(line))
{
// logger.error("Could not parse sequence line: " + line);
- throw new IOException(MessageManager.formatMessage("exception.couldnt_parse_sequence_line", new String[]{line}));
+ throw new IOException(MessageManager.formatMessage(
+ "exception.couldnt_parse_sequence_line", new String[]
+ { line }));
}
- String ns = (String) seqs.get(x.stringMatched(1));
+ String ns = seqs.get(x.stringMatched(1));
if (ns == null)
{
ns = "";
}
else
{
- throw new IOException(MessageManager.formatMessage("exception.error_parsing_line", new String[]{line}));
+ throw new IOException(MessageManager.formatMessage(
+ "exception.error_parsing_line", new String[]
+ { line }));
}
}
else if (annType.equals("GC"))
strucAnn = new Hashtable();
}
- Vector newStruc = new Vector();
+ Vector<AlignmentAnnotation> newStruc = new Vector<AlignmentAnnotation>();
parseAnnotationRow(newStruc, type, ns);
-
+ for (AlignmentAnnotation alan : newStruc)
+ {
+ alan.visible = false;
+ }
+ // annotations.addAll(newStruc);
strucAnn.put(type, newStruc);
seqAnn.put(acc, strucAnn);
}
}
else
{
- throw new IOException(MessageManager.formatMessage("exception.unknown_annotation_detected", new String[]{annType,annContent}));
+ throw new IOException(MessageManager.formatMessage(
+ "exception.unknown_annotation_detected", new String[]
+ { annType, annContent }));
}
}
}
// be written out
if (ss)
{
- if (detectbrackets.search(pos))
- {
- ann.secondaryStructure = jalview.schemes.ResidueProperties
- .getRNASecStrucState(pos).charAt(0);
- }
- else
+ //if (" .-_".indexOf(pos) == -1)
{
- ann.secondaryStructure = jalview.schemes.ResidueProperties
- .getDssp3state(pos).charAt(0);
- }
+ if (detectbrackets.search(pos))
+ {
+ ann.secondaryStructure = jalview.schemes.ResidueProperties
+ .getRNASecStrucState(pos).charAt(0);
+ }
+ else
+ {
+ ann.secondaryStructure = jalview.schemes.ResidueProperties
+ .getDssp3state(pos).charAt(0);
+ }
- if (ann.secondaryStructure == pos.charAt(0) || pos.charAt(0) == 'C')
- {
- ann.displayCharacter = ""; // null; // " ";
- }
- else
- {
- ann.displayCharacter = " " + ann.displayCharacter;
+ if (ann.secondaryStructure == pos.charAt(0))
+ {
+ ann.displayCharacter = ""; // null; // " ";
+ }
+ else
+ {
+ ann.displayCharacter = " " + ann.displayCharacter;
+ }
}
+
}
els[i] = ann;
{
annot = (AlignmentAnnotation) e.nextElement();
if (annot.label.equals(type))
+ {
break;
+ }
annot = null;
}
if (annot == null)
for (int idb = 0; idb < s[in].getDBRef().length; idb++)
{
if (dataRef == null)
+ {
dataRef = new Hashtable();
+ }
String datAs1 = s[in].getDBRef()[idb].getSource().toString()
+ " ; "
String key = type2id(feature);
if (key == null)
+ {
continue;
+ }
// out.append("#=GR ");
out.append(new Format("%-" + maxid + "s").form("#=GR "
+ printId(s[i]) + " " + key + " "));
ann = alAnot[j].annotations;
+ boolean isrna = alAnot[j].isValidStruc();
String seq = "";
for (int k = 0; k < ann.length; k++)
{
- annot = ann[k];
- String ch = (annot == null) ? Character.toString(s[i]
- .getCharAt(k)) : annot.displayCharacter;
- if (ch.length() == 0)
- {
- if (key.equals("SS"))
- {
- char ll = annot.secondaryStructure;
- seq = (Character.toString(ll).equals(" ")) ? seq + "C"
- : seq + ll;
- }
- else
- {
- seq += ".";
- }
- }
- else if (ch.length() == 1)
- {
- seq += ch;
- }
- else if (ch.length() > 1)
- {
- seq += ch.charAt(1);
- }
+ seq += outputCharacter(key, k, isrna, ann, s[i]);
}
out.append(seq);
out.append(newline);
for (int ia = 0; ia < al.getAlignmentAnnotation().length; ia++)
{
aa = al.getAlignmentAnnotation()[ia];
- if (aa.autoCalculated || !aa.visible)
+ if (aa.autoCalculated || !aa.visible || aa.sequenceRef != null)
{
continue;
}
String seq = "";
String label;
-
+ String key = "";
if (aa.label.equals("seq"))
+ {
label = "seq_cons";
+ }
else
- label = type2id(aa.label.toLowerCase()) + "_cons";
-
+ {
+ key = type2id(aa.label.toLowerCase());
+ if (key == null)
+ {
+ label = aa.label;
+ }
+ else
+ {
+ label = key + "_cons";
+ }
+ }
if (label == null)
+ {
label = aa.label;
+ }
+ label = label.replace(" ", "_");
out.append(new Format("%-" + maxid + "s").form("#=GC " + label
+ " "));
+ boolean isrna = aa.isValidStruc();
for (int j = 0; j < aa.annotations.length; j++)
{
- String ch = (aa.annotations[j] == null) ? "-"
- : aa.annotations[j].displayCharacter;
- if (ch.length() == 0)
- {
- char ll = aa.annotations[j].secondaryStructure;
- if (Character.toString(ll).equals(" "))
- seq += "C";
- else
- seq += ll;
- }
- else if (ch.length() == 1)
- {
- seq += ch;
- }
- else if (ch.length() > 1)
- {
- seq += ch.charAt(1);
- }
+ seq += outputCharacter(key, j, isrna, aa.annotations, null);
}
out.append(seq);
out.append(newline);
return out.toString();
}
+ /**
+ * add an annotation character to the output row
+ *
+ * @param seq
+ * @param key
+ * @param k
+ * @param isrna
+ * @param ann
+ * @param sequenceI
+ */
+ private char outputCharacter(String key, int k,
+ boolean isrna, Annotation[] ann, SequenceI sequenceI)
+ {
+ char seq = ' ';
+ Annotation annot = ann[k];
+ String ch = (annot == null) ? ((sequenceI == null) ? "-" : Character
+ .toString(sequenceI.getCharAt(k)))
+ : annot.displayCharacter;
+ if (key != null && key.equals("SS"))
+ {
+ if (annot == null)
+ {
+ // sensible gap character if one is available or make one up
+ return sequenceI == null ? '-' : sequenceI
+ .getCharAt(k);
+ }
+ else
+ {
+ // valid secondary structure AND no alternative label (e.g. ' B')
+ if (annot.secondaryStructure > ' ' && ch.length() < 2)
+ {
+ return annot.secondaryStructure;
+ }
+ }
+ }
+
+ if (ch.length() == 0)
+ {
+ seq = '.';
+ }
+ else if (ch.length() == 1)
+ {
+ seq = ch.charAt(0);
+ }
+ else if (ch.length() > 1)
+ {
+ seq = ch.charAt(1);
+ }
+ return seq;
+ }
+
public String print()
{
out = new StringBuffer();
}
if (key != null)
{
- return (String) key;
+ return key;
}
System.err.println("Warning : Unknown Stockholm annotation type: "
+ type);
sortByAnnotScore.setText(MessageManager
.getString("label.sort_by_score"));
sort.add(sortByAnnotScore);
- sortByAnnotScore.addMenuListener(new javax.swing.event.MenuListener()
+ sort.addMenuListener(new javax.swing.event.MenuListener()
{
@Override
import jalview.util.MessageManager;
-import java.awt.*;
-import java.awt.event.*;
+import java.awt.FlowLayout;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
-import javax.swing.*;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
/**
* DOCUMENT ME!
toolsMenu.add(showConsole);
toolsMenu.add(showNews);
toolsMenu.add(garbageCollect);
- toolsMenu.add(snapShotWindow);
+ // toolsMenu.add(snapShotWindow);
inputMenu.add(inputLocalFileMenuItem);
inputMenu.add(inputURLMenuItem);
inputMenu.add(inputTextboxMenuItem);
import java.awt.BorderLayout;
import java.awt.Color;
+import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
protected JCheckBox showNpTooltip = new JCheckBox();
/*
- * Annotations tab components
+ * Structure tab and components
*/
+ protected JPanel structureTab;
+
protected JCheckBox structFromPdb = new JCheckBox();
protected JCheckBox useRnaView = new JCheckBox();
*/
private void jbInit() throws Exception
{
- JTabbedPane tabbedPane = new JTabbedPane();
+ final JTabbedPane tabbedPane = new JTabbedPane();
this.setLayout(new BorderLayout());
JPanel okCancelPanel = initOkCancelPanel();
this.add(tabbedPane, BorderLayout.CENTER);
*/
wsTab.setLayout(new BorderLayout());
tabbedPane.add(wsTab, MessageManager.getString("label.web_services"));
+
+ /*
+ * Handler to validate a tab before leaving it - currently only for
+ * Structure.
+ */
+ tabbedPane.addChangeListener(new ChangeListener()
+ {
+ private Component lastTab;
+
+ @Override
+ public void stateChanged(ChangeEvent e)
+ {
+ if (lastTab == structureTab
+ && tabbedPane.getSelectedComponent() != structureTab)
+ {
+ if (!validateStructure())
+ {
+ tabbedPane.setSelectedComponent(structureTab);
+ return;
+ }
+ }
+ lastTab = tabbedPane.getSelectedComponent();
+ }
+
+ });
}
/**
*/
private JPanel initStructureTab()
{
- JPanel structureTab = new JPanel();
+ structureTab = new JPanel();
+
structureTab.setBorder(new TitledBorder(MessageManager
.getString("label.structure_options")));
structureTab.setLayout(null);
structViewer.setBounds(new Rectangle(160, ypos, 120, height));
structViewer.addItem(Viewer.JMOL.name());
structViewer.addItem(Viewer.CHIMERA.name());
+ structViewer.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ structureViewer_actionPerformed((String) structViewer
+ .getSelectedItem());
+ }
+ });
structureTab.add(structViewer);
ypos += lineSpacing;
pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
pathLabel.setHorizontalAlignment(SwingConstants.LEFT);
pathLabel.setText(MessageManager.getString("label.chimera_path"));
- pathLabel.setToolTipText(MessageManager
- .getString("label.chimera_path_tip"));
+ final String tooltip = JvSwingUtils.wrapTooltip(true,
+ MessageManager.getString("label.chimera_path_tip"));
+ pathLabel.setToolTipText(tooltip);
pathLabel.setBounds(new Rectangle(10, ypos, 140, height));
structureTab.add(pathLabel);
chimeraPath.setFont(verdana11);
chimeraPath.setText("");
chimeraPath.setBounds(new Rectangle(160, ypos, 300, height));
+ chimeraPath.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ if (e.getClickCount() == 2)
+ {
+ String chosen = openFileChooser();
+ if (chosen != null)
+ {
+ chimeraPath.setText(chosen);
+ }
+ }
+ }
+ });
structureTab.add(chimeraPath);
return structureTab;
}
/**
+ * Action on choosing a structure viewer from combobox options.
+ *
+ * @param selectedItem
+ */
+ protected void structureViewer_actionPerformed(String selectedItem)
+ {
+ }
+
+ /**
+ * Show a dialog for the user to choose a file. Returns the chosen path, or
+ * null on Cancel.
+ *
+ * @return
+ */
+ protected String openFileChooser()
+ {
+ String choice = null;
+ JFileChooser chooser = new JFileChooser();
+
+ // chooser.setFileView(new JalviewFileView());
+ chooser.setDialogTitle(MessageManager
+ .getString("label.open_local_file"));
+ chooser.setToolTipText(MessageManager.getString("action.open"));
+
+ int value = chooser.showOpenDialog(this);
+
+ if (value == JFileChooser.APPROVE_OPTION)
+ {
+ choice = chooser.getSelectedFile().getPath();
+ }
+ return choice;
+ }
+
+ /**
+ * Validate the structure tab preferences; if invalid, set focus on this tab.
+ *
+ * @param e
+ */
+ protected boolean validateStructure(FocusEvent e)
+ {
+ if (!validateStructure())
+ {
+ e.getComponent().requestFocusInWindow();
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean validateStructure()
+ {
+ return false;
+ }
+
+ /**
* Initialises the Visual tabbed panel.
*
* @return
JMenu fileMenu = new JMenu();
- JMenu savemenu = new JMenu();
+ protected JMenu savemenu = new JMenu();
JMenuItem pdbFile = new JMenuItem();
public class BioJsAlignmentPojo
{
private String globalColorScheme = "none";
+
+ private String jalviewVersion;
+
+ private String webStartUrl;
private ArrayList<BioJsSeqPojo> seqs = new ArrayList<BioJsSeqPojo>();
public BioJsAlignmentPojo()
}
+ public String getJalviewVersion()
+ {
+ return jalviewVersion;
+ }
+
+ public void setJalviewVersion(String jalviewVersion)
+ {
+ this.jalviewVersion = jalviewVersion;
+ }
+
+ public String getWebStartUrl()
+ {
+ return webStartUrl;
+ }
+
+ public void setWebStartUrl(String webStartUrl)
+ {
+ this.webStartUrl = webStartUrl;
+ }
+
public enum JalviewBioJsColorSchemeMapper
{
USER_DEFINED("User Defined", "user defined", null), NONE("None", "foo",
--- /dev/null
+package jalview.math;
+
+public class AlignmentDimension
+{
+ private int width;
+
+ private int height;
+
+ public AlignmentDimension(int width, int height)
+ {
+ this.width = width;
+ this.height = height;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ public void setWidth(int width)
+ {
+ this.width = width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
+
+ public void setHeight(int height)
+ {
+ this.height = height;
+ }
+
+}
import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.schemes.ColourSchemeI;
+import jalview.schemes.ResidueProperties;
import java.awt.BasicStroke;
import java.awt.Color;
int x2 = (x * charWidth);
Regex closeparen = new Regex("(\\))");
- String dc = (column == 0 || row_annotations[column - 1] == null) ? ""
- : row_annotations[column - 1].displayCharacter;
+ char dc = (column == 0 || row_annotations[column - 1] == null) ? ' '
+ : row_annotations[column - 1].secondaryStructure;
boolean diffupstream = sCol == 0 || row_annotations[sCol - 1] == null
- || !dc.equals(row_annotations[sCol - 1].displayCharacter);
+ || dc != row_annotations[sCol - 1].secondaryStructure;
boolean diffdownstream = !validRes || !validEnd
|| row_annotations[column] == null
- || !dc.equals(row_annotations[column].displayCharacter);
+ || dc != row_annotations[column].secondaryStructure;
// System.out.println("Column "+column+" diff up: "+diffupstream+" down:"+diffdownstream);
// If a closing base pair half of the stem, display a backward arrow
- if (column > 0 && closeparen.search(dc))
+ if (column > 0 && ResidueProperties.isCloseParenRNA(dc))
{
if (diffupstream)
}
}
}
- if (!row.isValidStruc())
+ if (row.getInvalidStrucPos() > x)
{
g.setColor(Color.orange);
- g.fillRect((int) row.getInvalidStrucPos() * charWidth, y,
- charWidth, charHeight);
+ g.fillRect(x * charWidth, y, charWidth, charHeight);
+ }
+ else if (row.getInvalidStrucPos() == x)
+ {
+ g.setColor(Color.orange.darker());
+ g.fillRect(x * charWidth, y, charWidth, charHeight);
}
if (validCharWidth
&& validRes
charOffset = (int) ((charWidth - fmWidth) / 2f);
if (row_annotations[column].colour == null)
+ {
g.setColor(Color.black);
+ }
else
+ {
g.setColor(row_annotations[column].colour);
+ }
if (column == 0 || row.graph > 0)
{
}
if (aa_annotations[column].colour == null)
+ {
g.setColor(Color.black);
+ }
else
+ {
g.setColor(aa_annotations[column].colour);
+ }
y1 = y
- (int) (((aa_annotations[column - 1].value - min) / range) * graphHeight);
continue;
}
if (aa_annotations[column].colour == null)
+ {
g.setColor(Color.black);
+ }
else
+ {
g.setColor(aa_annotations[column].colour);
+ }
y1 = y
- (int) (((aa_annotations[column].value - min) / (range)) * _aa.graphHeight);
if (aa_annotations[j] != null)
{
if (aa_annotations[j].colour == null)
+ {
g.setColor(Color.black);
+ }
else
+ {
g.setColor(aa_annotations[j].colour);
+ }
height = (int) ((aa_annotations[j].value / _aa.graphMax) * y);
if (height > y)
private boolean predefinedColours = false;
private boolean seqAssociated = false;
-
/**
* false if the scheme was constructed without a minColour and maxColour used
* to decide if existing colours should be taken from annotation elements when
bb = maxColour.getBlue() - b1;
noGradient = false;
+ aamax = annotation.graphMax;
+ aamin = annotation.graphMin;
+ if (annotation.isRNA())
+ {
+ ColourSchemeProperty.initRnaHelicesShading(1 + (int) aamax);
+ }
}
@Override
// resolve the context containing all the annotation for the sequence
AnnotatedCollectionI alcontext = alignment instanceof AlignmentI ? alignment
: alignment.getContext();
+ boolean f = true,rna=false;
for (AlignmentAnnotation alan : alcontext.findAnnotation(annotation
.getCalcId()))
{
&& (alan.label != null && annotation != null && alan.label
.equals(annotation.label)))
{
+ if (!rna && alan.isRNA())
+ {
+ rna = true;
+ }
seqannot.put(alan.sequenceRef, alan);
+ if (f || alan.graphMax > aamax)
+ {
+ aamax = alan.graphMax;
+ }
+ if (f || alan.graphMin < aamin)
+ {
+ aamin = alan.graphMin;
+ }
+ f = false;
}
}
+ if (rna)
+ {
+ ColourSchemeProperty.initRnaHelicesShading(1 + (int) aamax);
+ }
}
}
+ float aamin = 0f, aamax = 0f;
public String getAnnotation()
{
return annotation.label;
|| (annotationThreshold != null && (aboveAnnotationThreshold == ABOVE_THRESHOLD ? aj.value >= annotationThreshold.value
: aj.value <= annotationThreshold.value)))
{
- if (predefinedColours && aj.colour != null)
+ if (predefinedColours && aj.colour != null
+ && !aj.colour.equals(Color.black))
{
currentColour = aj.colour;
}
}
else
{
- currentColour = annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR
- : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR
- : jalview.renderer.AnnotationRenderer.STEM_COLOUR;
+ if (annotation.isRNA())
+ {
+ currentColour = ColourSchemeProperty.rnaHelices[(int) aj.value];
+ }
+ else
+ {
+ currentColour = annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR
+ : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR
+ : jalview.renderer.AnnotationRenderer.STEM_COLOUR;
+ }
}
}
else
}
else
{
- // calculate a shade
- float range = 1f;
- if (thresholdIsMinMax
- && annotation.threshold != null
- && aboveAnnotationThreshold == ABOVE_THRESHOLD
- && annotation.annotations[j].value >= annotation.threshold.value)
- {
- range = (annotation.annotations[j].value - annotation.threshold.value)
- / (annotation.graphMax - annotation.threshold.value);
- }
- else if (thresholdIsMinMax
- && annotation.threshold != null
- && aboveAnnotationThreshold == BELOW_THRESHOLD
- && annotation.annotations[j].value >= annotation.graphMin)
- {
- range = (annotation.annotations[j].value - annotation.graphMin)
- / (annotation.threshold.value - annotation.graphMin);
- }
- else
- {
- range = (annotation.annotations[j].value - annotation.graphMin)
- / (annotation.graphMax - annotation.graphMin);
- }
-
- int dr = (int) (rr * range + r1), dg = (int) (gg * range + g1), db = (int) (bb
- * range + b1);
-
- currentColour = new Color(dr, dg, db);
-
+ currentColour = shadeCalculation(annotation, j);
}
}
if (conservationColouring)
return currentColour;
}
+ private Color shadeCalculation(AlignmentAnnotation annotation, int j)
+ {
+
+ // calculate a shade
+ float range = 1f;
+ if (thresholdIsMinMax
+ && annotation.threshold != null
+ && aboveAnnotationThreshold == ABOVE_THRESHOLD
+ && annotation.annotations[j].value >= annotation.threshold.value)
+ {
+ range = (annotation.annotations[j].value - annotation.threshold.value)
+ / (annotation.graphMax - annotation.threshold.value);
+ }
+ else if (thresholdIsMinMax && annotation.threshold != null
+ && aboveAnnotationThreshold == BELOW_THRESHOLD
+ && annotation.annotations[j].value >= annotation.graphMin)
+ {
+ range = (annotation.annotations[j].value - annotation.graphMin)
+ / (annotation.threshold.value - annotation.graphMin);
+ }
+ else
+ {
+ if (annotation.graphMax != annotation.graphMin)
+ {
+ range = (annotation.annotations[j].value - annotation.graphMin)
+ / (annotation.graphMax - annotation.graphMin);
+ }
+ else
+ {
+ range = 0f;
+ }
+ }
+
+ int dr = (int) (rr * range + r1), dg = (int) (gg * range + g1), db = (int) (bb
+ * range + b1);
+
+ return new Color(dr, dg, db);
+
+ }
public boolean isPredefinedColours()
{
return predefinedColours;
return col;
}
+
+ public static Color rnaHelices[] = null;
+
+ public static void initRnaHelicesShading(int n)
+ {
+ int j = 0;
+ if (rnaHelices == null)
+ {
+ rnaHelices = new Color[n + 1];
+ }
+ else if (rnaHelices != null && rnaHelices.length <= n)
+ {
+ Color[] t = new Color[n + 1];
+ System.arraycopy(rnaHelices, 0, t, 0, rnaHelices.length);
+ j = rnaHelices.length;
+ rnaHelices = t;
+ }
+ else
+ {
+ return;
+ }
+ // Generate random colors and store
+ for (; j <= n; j++)
+ {
+ rnaHelices[j] = jalview.util.ColorUtils
+ .generateRandomColor(Color.white);
+ }
+ }
+
}
import jalview.analysis.scoremodels.PIDScoreModel;
import jalview.api.analysis.ScoreModelI;
-import java.util.*;
+import java.awt.Color;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Hashtable;
import java.util.List;
-import java.awt.*;
+import java.util.Map;
+import java.util.Vector;
public class ResidueProperties
{
propMatrixF[i][j] = 0;
propMatrixPos[i][j] = 0;
propMatrixEpos[i][j] = 0;
- for (Enumeration<String> en = (Enumeration<String>) propHash.keys(); en
+ for (Enumeration<String> en = propHash.keys(); en
.hasMoreElements();)
{
String ph = en.nextElement();
* Used by getRNASecStrucState
*
*/
- public static Hashtable toRNAssState;
+ public static Hashtable<String, String> toRNAssState;
+
+ public static boolean RNAcloseParen[] = new boolean[255];
static
{
toRNAssState = new Hashtable<String, String>();
toRNAssState.put("y", "Y");
toRNAssState.put("Z", "Z");
toRNAssState.put("z", "Z");
-
+ for (int p = 0; p < RNAcloseParen.length; p++)
+ {
+ RNAcloseParen[p] = false;
+ }
+ for (String k : toRNAssState.keySet())
+ {
+ RNAcloseParen[k.charAt(0)] = k.charAt(0) != toRNAssState.get(k)
+ .charAt(0);
+ }
}
/**
String ssc = ssstring.substring(i, i + 1);
if (toRNAssState.containsKey(ssc))
{
- ss.append((String) toRNAssState.get(ssc));
+ // valid ss character - so return it
+ ss.append(ssc); // (String) toRNAssState.get(ssc));
}
else
{
return ss.toString();
}
+ public static boolean isCloseParenRNA(char dc)
+ {
+ return RNAcloseParen[dc];
+ }
+
// main method generates perl representation of residue property hash
// / cut here
public static void main(String[] args)
System.out.println("};");
}
// to here
+
}
StructureMapping[] mappings;
+ private boolean processSecondaryStructure = false,
+ secStructServices = false, addTempFacAnnot = false;
+
+ /**
+ * @return true if will try to use external services for processing secondary
+ * structure
+ */
+ public boolean isSecStructServices()
+ {
+ return secStructServices;
+ }
+
+ /**
+ * control use of external services for processing secondary structure
+ *
+ * @param secStructServices
+ */
+ public void setSecStructServices(boolean secStructServices)
+ {
+ this.secStructServices = secStructServices;
+ }
+
+ /**
+ * flag controlling addition of any kind of structural annotation
+ *
+ * @return true if temperature factor annotation will be added
+ */
+ public boolean isAddTempFacAnnot()
+ {
+ return addTempFacAnnot;
+ }
+
+ /**
+ * set flag controlling addition of structural annotation
+ *
+ * @param addTempFacAnnot
+ */
+ public void setAddTempFacAnnot(boolean addTempFacAnnot)
+ {
+ this.addTempFacAnnot = addTempFacAnnot;
+ }
+
+ /**
+ *
+ * @return if true, the structure manager will attempt to add secondary
+ * structure lines for unannotated sequences
+ */
+
+ public boolean isProcessSecondaryStructure()
+ {
+ return processSecondaryStructure;
+ }
+
+ /**
+ * Control whether structure manager will try to annotate mapped sequences
+ * with secondary structure from PDB data.
+ *
+ * @param enable
+ */
+ public void setProcessSecondaryStructure(boolean enable)
+ {
+ processSecondaryStructure = enable;
+ }
+
/**
* debug function - write all mappings to stdout
*/
* the tried and tested MCview pdb mapping
*/
MCview.PDBfile pdb = null;
- boolean parseSecStr=true;
+ boolean parseSecStr = processSecondaryStructure;
if (isPDBFileRegistered(pdbFile))
{
for (SequenceI sq : sequence)
}
try
{
- pdb = new MCview.PDBfile(true, parseSecStr, pdbFile, protocol);
+ pdb = new MCview.PDBfile(addTempFacAnnot, parseSecStr,
+ secStructServices, pdbFile, protocol);
if (pdb.id != null && pdb.id.trim().length() > 0
&& AppletFormatAdapter.FILE.equals(protocol))
{
+ maxChain.residues.size() + "\n\n");
PrintStream ps = new PrintStream(System.out)
{
+ @Override
public void print(String x)
{
mappingDetails.append(x);
}
+ @Override
public void println()
{
mappingDetails.append("\n");
{
return;
}
- boolean removeMapping = true;
String[] handlepdbs;
Vector pdbs = new Vector();
for (int i = 0; i < pdbfiles.length; pdbs.addElement(pdbfiles[i++]))
package jalview.util;
import jalview.gui.EPSOptions;
+import jalview.gui.SVGOptions;
import jalview.io.JalviewFileChooser;
import java.awt.Component;
import javax.imageio.ImageIO;
import org.jfree.graphics2d.svg.SVGGraphics2D;
+import org.jfree.graphics2d.svg.SVGHints;
import org.jibble.epsgraphics.EpsGraphics2D;
public class ImageMaker
Graphics2D ig2 = (Graphics2D) graphics;
ig2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
+
}
void setupSVG(int width, int height, String title)
{
+
g2 = new SVGGraphics2D(width, height);
+ Graphics2D ig2 = g2;
+
+ String renderStyle = jalview.bin.Cache.getDefault("SVG_RENDERING",
+ "Prompt each time");
+
+ // If we need to prompt, and if the GUI is visible then
+ // Prompt for EPS rendering style
+ if (renderStyle.equalsIgnoreCase("Prompt each time")
+ && !(System.getProperty("java.awt.headless") != null && System
+ .getProperty("java.awt.headless").equals("true")))
+ {
+ SVGOptions svgOption = new SVGOptions();
+ renderStyle = svgOption.getValue();
+
+ if (renderStyle == null || svgOption.cancelled)
+ {
+ return;
+ }
+ }
+
+ if (renderStyle.equalsIgnoreCase("lineart"))
+ {
+ ig2.setRenderingHint(SVGHints.KEY_DRAW_STRING_TYPE,
+ SVGHints.VALUE_DRAW_STRING_TYPE_VECTOR);
+ }
+
graphics = g2;
}
import jalview.schemes.ColourSchemeI;
import jalview.schemes.PIDColourScheme;
import jalview.schemes.ResidueProperties;
-import jalview.viewmodel.seqfeatures.FeaturesDisplayed;
import jalview.workers.AlignCalcManager;
import jalview.workers.ConsensusThread;
import jalview.workers.StrucConsensusThread;
AlignmentAnnotation alignmentAnnotation)
{
if (!alignmentAnnotation.autoCalculated)
+ {
return false;
+ }
if (calculator.workingInvolvedWith(alignmentAnnotation))
{
// System.err.println("grey out ("+alignmentAnnotation.label+")");
selectionGroup = new SequenceGroup();
selectionGroup.setEndRes(alignment.getWidth() - 1);
}
- Vector tmp = alignment.getHiddenSequences().showAll(
+ List<SequenceI> tmp = alignment.getHiddenSequences().showAll(
hiddenRepSequences);
- for (int t = 0; t < tmp.size(); t++)
+ for (SequenceI seq : tmp)
{
- selectionGroup.addSequence((SequenceI) tmp.elementAt(t), false);
+ selectionGroup.addSequence(seq, false);
+ setSequenceAnnotationsVisible(seq, true);
}
hasHiddenRows = false;
public void showSequence(int index)
{
- Vector tmp = alignment.getHiddenSequences().showSequence(index,
+ List<SequenceI> tmp = alignment.getHiddenSequences().showSequence(
+ index,
hiddenRepSequences);
if (tmp.size() > 0)
{
selectionGroup.setEndRes(alignment.getWidth() - 1);
}
- for (int t = 0; t < tmp.size(); t++)
+ for (SequenceI seq : tmp)
{
- selectionGroup.addSequence((SequenceI) tmp.elementAt(t), false);
+ selectionGroup.addSequence(seq, false);
+ setSequenceAnnotationsVisible(seq, true);
}
// JBPNote: refactor: only update flag if we modified visiblity (used to
// do this regardless)
for (int i = 0; i < seq.length; i++)
{
alignment.getHiddenSequences().hideSequence(seq[i]);
+ setSequenceAnnotationsVisible(seq[i], false);
}
hasHiddenRows = true;
firePropertyChange("alignment", null, alignment.getSequences());
}
}
+ /**
+ * Set visibility for any annotations for the given sequence.
+ *
+ * @param sequenceI
+ */
+ protected void setSequenceAnnotationsVisible(SequenceI sequenceI,
+ boolean visible)
+ {
+ for (AlignmentAnnotation ann : alignment.getAlignmentAnnotation())
+ {
+ if (ann.sequenceRef == sequenceI)
+ {
+ ann.visible = visible;
+ }
+ }
+ }
+
public void hideRepSequences(SequenceI repSequence, SequenceGroup sg)
{
int sSize = sg.getSize();
return showSeqFeaturesHeight;
}
+ private boolean showAnnotation = true;
+
+ private boolean rightAlignIds = false;
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public boolean getShowAnnotation()
+ {
+ return isShowAnnotation();
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param b
+ * DOCUMENT ME!
+ */
+ public void setShowAnnotation(boolean b)
+ {
+ showAnnotation = b;
+ }
+
+ public boolean isShowAnnotation()
+ {
+ return showAnnotation;
+ }
+
+ public boolean isRightAlignIds()
+ {
+ return rightAlignIds;
+ }
+
+ public void setRightAlignIds(boolean rightAlignIds)
+ {
+ this.rightAlignIds = rightAlignIds;
+ }
}
} catch (Exception ex)
{
Cache.log
- .info("Error in 'experimental' mapping of features. Please try to reproduce and then report info to jalview-discuss@jalview.org.");
- Cache.log.info("Mapping feature from " + f.getBegin()
+ .warn("Error in 'experimental' mapping of features. Please try to reproduce and then report info to jalview-discuss@jalview.org.");
+ Cache.log.warn("Mapping feature from " + f.getBegin()
+ " to " + f.getEnd() + " in dbref "
+ dbref.getAccessionId() + " in "
+ dbref.getSource());
- Cache.log.info("using das Source " + source);
- Cache.log.info("Exception", ex);
+ Cache.log.warn("using das Source " + source);
+ Cache.log.warn("Exception", ex);
}
if (vf != null)
Object[] nextSequence(jalviewSourceI dasSource, SequenceI seq)
{
if (cancelled)
+ {
return null;
+ }
DBRefEntry[] uprefs = jalview.util.DBRefUtils.selectRefs(
seq.getDBRef(), new String[]
{
qstring.add(uprefs[j].getAccessionId());
}
else
+ {
System.out.println("IGNORE " + csys.getAuthority());
+ }
}
}
}
{
for (String note : feat.getNOTE())
{
- desc += (String) note;
+ desc += note;
}
}
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
+import org.apache.http.HttpVersion;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.entity.mime.content.InputStreamBody;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.CoreProtocolPNames;
+import org.apache.http.params.HttpParams;
/**
* Helpful procedures for working with services via HTTPClient
List<NameValuePair> vals) throws ClientProtocolException,
IOException
{
- HttpClient httpclient = new DefaultHttpClient();
+ HttpParams params = new BasicHttpParams();
+ params.setParameter(CoreProtocolPNames.PROTOCOL_VERSION,
+ HttpVersion.HTTP_1_1);
+ HttpClient httpclient = new DefaultHttpClient(params);
HttpPost httppost = new HttpPost(postUrl);
UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8");
httppost.setEntity(ue);
*/
package jalview.ws.jws1;
+import jalview.analysis.AlignSeq;
+import jalview.bin.Cache;
+import jalview.datamodel.AlignmentView;
+import jalview.datamodel.SeqCigar;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.WebserviceInfo;
+import jalview.util.MessageManager;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.util.*;
+import java.util.Hashtable;
-import javax.swing.*;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
-import ext.vamsas.*;
-import jalview.analysis.*;
-import jalview.bin.*;
-import jalview.datamodel.*;
-import jalview.gui.*;
-import jalview.util.MessageManager;
+import ext.vamsas.Jpred;
+import ext.vamsas.JpredServiceLocator;
+import ext.vamsas.JpredSoapBindingStub;
+import ext.vamsas.ServiceHandle;
public class JPredClient extends WS1Client
{
WsURL = "http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred";
WebserviceInfo wsInfo = new WebserviceInfo(WebServiceJobTitle,
- WebServiceReference);
+ WebServiceReference, true);
return wsInfo;
}
*/
package jalview.ws.jws1;
-import java.util.*;
-
-import jalview.analysis.*;
-import jalview.bin.*;
-import jalview.datamodel.*;
-import jalview.gui.*;
-import jalview.io.*;
-import jalview.util.*;
+import jalview.analysis.AlignSeq;
+import jalview.bin.Cache;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentView;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.WebserviceInfo;
+import jalview.io.FormatAdapter;
+import jalview.util.Comparison;
+import jalview.util.MessageManager;
import jalview.ws.AWsJob;
import jalview.ws.JobStateSummary;
import jalview.ws.WSClientI;
+
+import java.util.Hashtable;
+import java.util.List;
+
import vamsas.objects.simple.JpredResult;
class JPredThread extends JWS1Thread implements WSClientI
sqs[i] = al.getSequenceAt(i);
}
if (!jalview.analysis.SeqsetUtils.deuniquify(
- (Hashtable) SequenceInfo, sqs))
+ SequenceInfo, sqs))
{
throw (new Exception(MessageManager.getString("exception.couldnt_recover_sequence_properties_for_alignment")));
}
}
FirstSeq = 0;
- al.setDataset(null);
+ if (currentView.getDataset() != null)
+ {
+ al.setDataset(currentView.getDataset());
+ }
+ else
+ {
+ al.setDataset(null);
+ }
jalview.io.JnetAnnotationMaker.add_annotation(prediction, al,
FirstSeq, false, predMap);
if (predMap != null)
{
char gc = getGapChar();
- SequenceI[] sqs = (SequenceI[]) ((java.lang.Object[]) input
- .getAlignmentAndColumnSelection(gc))[0];
+ SequenceI[] sqs = (SequenceI[]) input
+ .getAlignmentAndColumnSelection(gc)[0];
if (this.msaIndex >= sqs.length)
{
throw new Error(MessageManager.getString("error.implementation_error_invalid_msa_index_for_job"));
}
else
{
- al.setDataset(null);
+ if (currentView.getDataset() != null)
+ {
+ al.setDataset(currentView.getDataset());
+
+ }
+ else
+ {
+ al.setDataset(null);
+ }
jalview.io.JnetAnnotationMaker.add_annotation(prediction, al,
FirstSeq, true, predMap);
SequenceI profileseq = al.getSequenceAt(0); // this includes any gaps.
}
}
}
+ // transfer to dataset
+ for (AlignmentAnnotation alant : al.getAlignmentAnnotation())
+ {
+ if (alant.sequenceRef != null)
+ {
+ replaceAnnotationOnAlignmentWith(alant, alant.label,
+ "jalview.jws1.Jpred" + (this.msa == null ? "" : "MSA"),
+ alant.sequenceRef);
+ }
+ }
return new Object[]
{ al, alcsel }; // , FirstSeq, noMsa};
}
/**
+ * copied from JabawsCalcWorker
+ *
+ * @param newAnnot
+ * @param typeName
+ * @param calcId
+ * @param aSeq
+ */
+ protected void replaceAnnotationOnAlignmentWith(
+ AlignmentAnnotation newAnnot, String typeName, String calcId,
+ SequenceI aSeq)
+ {
+ SequenceI dsseq = aSeq.getDatasetSequence();
+ while (dsseq.getDatasetSequence() != null)
+ {
+ dsseq = dsseq.getDatasetSequence();
+ }
+ // look for same annotation on dataset and lift this one over
+ List<AlignmentAnnotation> dsan = dsseq.getAlignmentAnnotations(
+ calcId, typeName);
+ if (dsan != null && dsan.size() > 0)
+ {
+ for (AlignmentAnnotation dssan : dsan)
+ {
+ dsseq.removeAlignmentAnnotation(dssan);
+ }
+ }
+ AlignmentAnnotation dssan = new AlignmentAnnotation(newAnnot);
+ dsseq.addAlignmentAnnotation(dssan);
+ dssan.adjustForAlignment();
+ }
+
+ /**
* Given an alignment where all other sequences except profileseq are
* aligned to the ungapped profileseq, insert gaps in the other sequences to
* realign them with the residues in profileseq
{
if (job.getJobId().startsWith("Broken"))
{
- job.result = (vamsas.objects.simple.Result) new JpredResult();
+ job.result = new JpredResult();
job.result.setInvalid(true);
job.result.setStatus(MessageManager.formatMessage("label.submission_params", new String[]{job.getJobId().toString()}));
throw new Exception(job.getJobId());
WebserviceInfo wsInfo = null;
if (!headless)
{
- wsInfo = new WebserviceInfo(WebServiceJobTitle, WebServiceReference);
+ wsInfo = new WebserviceInfo(WebServiceJobTitle, WebServiceReference,
+ true);
}
return wsInfo;
}
{
continue;
}
+ String typename, calcName;
AlignmentAnnotation annot = createAnnotationRowsForScores(
ourAnnot,
- service.serviceType + " (" + scr.getMethod() + ")",
- service.getServiceTypeURI() + "/" + scr.getMethod(),
+ typename = service.serviceType + " ("
+ + scr.getMethod() + ")",
+ calcName = service.getServiceTypeURI() + "/"
+ + scr.getMethod(),
aseq, base + 1, scr);
annot.graph = AlignmentAnnotation.LINE_GRAPH;
}
}
annot._linecolour = col;
+ // finally, update any dataset annotation
+ replaceAnnotationOnAlignmentWith(annot, typename, calcName,
+ aseq);
}
}
}
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.jws2.jabaws2.Jws2InstanceFactory;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.HashSet;
import java.util.Set;
Jws2Discoverer jws2Discoverer = null;
- String jwsservers = null;
+ String jwsserver = null;
boolean quit = false, running = false;
this.quit = quit;
}
- public JabaWsServerQuery(Jws2Discoverer jws2Discoverer, String jwsservers)
+ public JabaWsServerQuery(Jws2Discoverer jws2Discoverer, String server)
{
this.jws2Discoverer = jws2Discoverer;
- this.jwsservers = jwsservers;
+ this.jwsserver = server;
}
Services[] JABAWS1SERVERS = new Services[]
running = true;
try
{
- if (Jws2Client.validURL(jwsservers))
+ // TODO this test doesn't seem to attempt a connection - should it?
+ // would save a lot of failed tries with UnknownHostException
+ if (isValidUrl(jwsserver))
{
compbio.data.msa.RegistryWS registry = null;
Set svccategories = null;
try
{
// JBPNote: why is RegistryWS in compbio.data.msa ?
- registry = Jws2Client.connectToRegistry(jwsservers);
+ registry = Jws2Client.connectToRegistry(jwsserver);
if (registry != null)
{
// System.err.println("Test Services Output\n"
ex.printStackTrace();
// if that failed, then we are probably working with a JABAWS1 server.
// in that case, look for each service endpoint
- System.err.println("JWS2 Discoverer: " + jwsservers
+ System.err.println("JWS2 Discoverer: " + jwsserver
+ " is a JABAWS1 server. Using hardwired list.");
for (Services srv : JABAWS1SERVERS)
{
srv_set.add(srv);
}
}
+
for (Category cat : categories)
{
for (Services srv : cat.getServices())
JABAService service = null;
try
{
- service = Jws2Client.connect(jwsservers, srv);
+ service = Jws2Client.connect(jwsserver, srv);
} catch (Exception e)
{
System.err.println("Jws2 Discoverer: Problem on "
- + jwsservers + " with service " + srv + ":\n"
+ + jwsserver + " with service " + srv + ":\n"
+ e.getMessage());
if (!(e instanceof javax.xml.ws.WebServiceException))
{
e.printStackTrace();
}
// For moment, report service as a problem.
- jws2Discoverer.addInvalidServiceUrl(jwsservers);
+ jws2Discoverer.addInvalidServiceUrl(jwsserver);
}
;
- if (service != null)
+ if (service != null
+ && !Jws2InstanceFactory.ignoreService(srv.toString()))
{
noservices = false;
Jws2Instance svc = null;
String description = registry.getServiceDescription(srv);
- svc = Jws2InstanceFactory.newJws2Instance(jwsservers,
+ svc = Jws2InstanceFactory.newJws2Instance(jwsserver,
srv.toString(), cat.name, description, service);
}
if (svc == null)
{
- svc = Jws2InstanceFactory.newJws2Instance(jwsservers,
+ svc = Jws2InstanceFactory.newJws2Instance(jwsserver,
srv.toString(), cat.name,
"JABAWS 1 Alignment Service", service);
}
- jws2Discoverer.addService(jwsservers, svc);
+ jws2Discoverer.addService(jwsserver, svc);
}
}
if (noservices)
{
- jws2Discoverer.addUrlwithnoservices(jwsservers);
+ jws2Discoverer.addUrlwithnoservices(jwsserver);
}
}
else
{
- jws2Discoverer.addInvalidServiceUrl(jwsservers);
- Cache.log.info("Ignoring invalid Jws2 service url " + jwsservers);
+ jws2Discoverer.addInvalidServiceUrl(jwsserver);
+ Cache.log.warn("Ignoring invalid Jws2 service url " + jwsserver);
}
} catch (Exception e)
{
e.printStackTrace();
Cache.log.warn("Exception when discovering Jws2 services.", e);
- jws2Discoverer.addInvalidServiceUrl(jwsservers);
+ jws2Discoverer.addInvalidServiceUrl(jwsserver);
} catch (Error e)
{
Cache.log.error("Exception when discovering Jws2 services.", e);
- jws2Discoverer.addInvalidServiceUrl(jwsservers);
+ jws2Discoverer.addInvalidServiceUrl(jwsserver);
}
running = false;
}
+ /**
+ * Check if the URL is valid and responding.
+ *
+ * @return
+ */
+ private boolean isValidUrl(String server)
+ {
+ // return Jws2Client.validURL(jwsserver); // checks syntax only
+ boolean result = false;
+ if (server != null) {
+ try {
+ URL url = new URL(server);
+ url.openStream().close();
+ result = true;
+ } catch (MalformedURLException e)
+ {
+ System.err.println("Invalid server URL: " + server);
+ result = false;
+ } catch (IOException e)
+ {
+ System.err.println("Error connecting to server: " + server + ": "
+ + e.toString());
+ result = false;
+ }
+ }
+ return result;
+ }
+
}
return annotation;
}
+ protected void replaceAnnotationOnAlignmentWith(
+ AlignmentAnnotation newAnnot, String typeName, String calcId,
+ SequenceI aSeq)
+ {
+ SequenceI dsseq = aSeq.getDatasetSequence();
+ while (dsseq.getDatasetSequence() != null)
+ {
+ dsseq = dsseq.getDatasetSequence();
+ }
+ // look for same annotation on dataset and lift this one over
+ List<AlignmentAnnotation> dsan = dsseq.getAlignmentAnnotations(calcId,
+ typeName);
+ if (dsan != null && dsan.size() > 0)
+ {
+ for (AlignmentAnnotation dssan : dsan)
+ {
+ dsseq.removeAlignmentAnnotation(dssan);
+ }
+ }
+ AlignmentAnnotation dssan = new AlignmentAnnotation(newAnnot);
+ dsseq.addAlignmentAnnotation(dssan);
+ dssan.adjustForAlignment();
+ }
+
private void constructAnnotationFromScore(AlignmentAnnotation annotation,
int base, int alWidth, Score scr)
{
*/
package jalview.ws.jws2;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.List;
-
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.event.MenuEvent;
-import javax.swing.event.MenuListener;
-
-import compbio.metadata.Argument;
import jalview.api.AlignCalcWorkerI;
import jalview.bin.Cache;
import jalview.gui.AlignFrame;
import jalview.ws.params.WsParamSetI;
import jalview.ws.uimodel.AlignAnalysisUIText;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.List;
+
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
+
+import compbio.metadata.Argument;
+
/**
* provides metadata for a jabaws2 service instance - resolves names, etc.
*
{
return new WebserviceInfo(WebServiceJobTitle, WebServiceJobTitle
+ " using service hosted at " + serv.hosturl + "\n"
- + (serv.description != null ? serv.description : ""));
+ + (serv.description != null ? serv.description : ""), false);
}
return null;
}
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
*/
public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
{
- private java.beans.PropertyChangeSupport changeSupport = new java.beans.PropertyChangeSupport(
+ public static final String COMPBIO_JABAWS = "http://www.compbio.dundee.ac.uk/jabaws";
+
+ /*
+ * the .jalview_properties entry for JWS2 URLS
+ */
+ final static String JWS2HOSTURLS = "JWS2HOSTURLS";
+
+ /*
+ * Singleton instance
+ */
+ private static Jws2Discoverer discoverer;
+
+ /*
+ * Override for testing only
+ */
+ private static List<String> testUrls = null;
+
+ // preferred url has precedence over others
+ private String preferredUrl;
+
+ private PropertyChangeSupport changeSupport = new PropertyChangeSupport(
this);
+ Vector<String> invalidServiceUrls = null, urlsWithoutServices = null,
+ validServiceUrls = null;
+
+ boolean running = false, aborted = false;
+
+ Thread oldthread = null;
+
+ /**
+ * holds list of services.
+ */
+ protected Vector<Jws2Instance> services;
+
+ /**
+ * Private constructor enforces use of singleton via getDiscoverer()
+ */
+ private Jws2Discoverer()
+ {
+ }
+
/**
* change listeners are notified of "services" property changes
*
changeSupport.removePropertyChangeListener(listener);
}
- boolean running = false, aborted = false;
-
/**
* @return the aborted
*/
public void setAborted(boolean aborted)
{
this.aborted = aborted;
- }
-
- Thread oldthread = null;
+ }
public void run()
{
// first set up exclusion list if needed
final Set<String> ignoredServices = new HashSet<String>();
- for (String ignored : jalview.bin.Cache.getDefault(
+ for (String ignored : Cache.getDefault(
"IGNORED_JABAWS_SERVICETYPES", "")
.split("\\|"))
{
ArrayList<String> svctypes = new ArrayList<String>();
List<JabaWsServerQuery> qrys = new ArrayList<JabaWsServerQuery>();
- for (final String jwsservers : getServiceUrls())
+ for (final String jwsserver : getServiceUrls())
{
- JabaWsServerQuery squery = new JabaWsServerQuery(this, jwsservers);
+ JabaWsServerQuery squery = new JabaWsServerQuery(this, jwsserver);
if (svctypes.size() == 0)
{
// TODO: remove this ugly hack to get Canonical JABA service ordering
Jws2Instance[] svcs = new Jws2Instance[services.size()];
int[] spos = new int[services.size()];
int ipos = 0;
- Vector svcUrls = getServiceUrls();
+ List<String> svcUrls = getServiceUrls();
for (Jws2Instance svc : services)
{
svcs[ipos] = svc;
}
/**
- * holds list of services.
- */
- protected Vector<Jws2Instance> services;
-
- /**
* attach all available web services to the appropriate submenu in the given
* JMenu
*/
{
if (args.length > 0)
{
- testUrls = new Vector<String>();
+ testUrls = new ArrayList<String>();
for (String url : args)
{
testUrls.add(url);
}
}
- private static Jws2Discoverer discoverer;
-
+ /**
+ * Returns the singleton instance of this class.
+ *
+ * @return
+ */
public static Jws2Discoverer getDiscoverer()
{
if (discoverer == null)
public boolean hasServices()
{
- // TODO Auto-generated method stub
return !running && services != null && services.size() > 0;
}
return running;
}
- /**
- * the jalview .properties entry for JWS2 URLS
- */
- final static String JWS2HOSTURLS = "JWS2HOSTURLS";
-
- public static void setServiceUrls(Vector<String> urls)
+ public void setServiceUrls(List<String> wsUrls)
{
- if (urls != null)
+ if (wsUrls != null && !wsUrls.isEmpty())
{
- StringBuffer urlbuffer = new StringBuffer();
+ StringBuilder urls = new StringBuilder(128);
String sep = "";
- for (String url : urls)
+ for (String url : wsUrls)
{
- urlbuffer.append(sep);
- urlbuffer.append(url);
+ urls.append(sep);
+ urls.append(url);
sep = ",";
}
- Cache.setProperty(JWS2HOSTURLS, urlbuffer.toString());
+ Cache.setProperty(JWS2HOSTURLS, urls.toString());
}
else
{
}
}
- private static Vector<String> testUrls = null;
-
- public static Vector<String> getServiceUrls()
+ /**
+ * Returns web service URLs, in the order in which they should be tried (or an
+ * empty list).
+ *
+ * @return
+ */
+ public List<String> getServiceUrls()
{
if (testUrls != null)
{
// return test urls, if there are any, instead of touching cache
return testUrls;
}
- String surls = Cache.getDefault(JWS2HOSTURLS,
- "http://www.compbio.dundee.ac.uk/jabaws");
- Vector<String> urls = new Vector<String>();
+ List<String> urls = new ArrayList<String>();
+
+ if (this.preferredUrl != null)
+ {
+ urls.add(preferredUrl);
+ }
+
+ String surls = Cache.getDefault(JWS2HOSTURLS, COMPBIO_JABAWS);
try
{
StringTokenizer st = new StringTokenizer(surls, ",");
String url = null;
try
{
- java.net.URL u = new java.net.URL(url = st.nextToken());
+ url = st.nextToken();
+ new URL(url);
if (!urls.contains(url))
{
urls.add(url);
}
else
{
- jalview.bin.Cache.log.info("Ignoring duplicate url in "
+ Cache.log.warn("Ignoring duplicate url " + url + " in "
+ JWS2HOSTURLS + " list");
}
- } catch (Exception ex)
+ } catch (MalformedURLException ex)
{
- jalview.bin.Cache.log
+ Cache.log
.warn("Problem whilst trying to make a URL from '"
+ ((url != null) ? url : "<null>") + "'");
- jalview.bin.Cache.log
+ Cache.log
.warn("This was probably due to a malformed comma separated list"
+ " in the "
+ JWS2HOSTURLS
+ " entry of $(HOME)/.jalview_properties)");
- jalview.bin.Cache.log.debug("Exception was ", ex);
+ Cache.log.debug("Exception was ", ex);
}
}
} catch (Exception ex)
{
- jalview.bin.Cache.log.warn(
+ Cache.log.warn(
"Error parsing comma separated list of urls in "
+ JWS2HOSTURLS + " preference.", ex);
}
- if (urls.size() >= 0)
- {
- return urls;
- }
- return null;
+ return urls;
}
public Vector<Jws2Instance> getServices()
return thr;
}
- Vector<String> invalidServiceUrls = null, urlsWithoutServices = null,
- validServiceUrls = null;
-
/**
* @return the invalidServiceUrls
*/
return 1;
}
if (urlsWithoutServices != null && urlsWithoutServices.contains(url))
+ {
return 0;
+ }
if (invalidServiceUrls != null && invalidServiceUrls.contains(url))
{
return -1;
{
setPreferredServiceFor(null, serviceType, serviceAction, selectedServer);
}
+
+ /**
+ * Set a URL to try before any others. For use with command-line parameter to
+ * configure a local Jabaws installation without the need to add to property
+ * files.
+ *
+ * @param value
+ * @throws MalformedURLException
+ */
+ public void setPreferredUrl(String value) throws MalformedURLException
+ {
+ if (value != null && value.trim().length() > 0)
+ {
+ new URL(value);
+ preferredUrl = value;
+ }
+ }
}
*/
package jalview.ws.jws2;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentView;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.JvSwingUtils;
+import jalview.util.MessageManager;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
+import jalview.ws.params.WsParamSetI;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
import java.util.List;
-import javax.swing.*;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.ToolTipManager;
-import jalview.datamodel.*;
-import jalview.gui.*;
import compbio.data.msa.MsaWS;
import compbio.metadata.Argument;
-import jalview.util.MessageManager;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
-import jalview.ws.params.WsParamSetI;
/**
* DOCUMENT ME!
if (!(sh.service instanceof MsaWS))
{
// redundant at mo - but may change
- JOptionPane
- .showMessageDialog(
- Desktop.desktop,
- MessageManager.formatMessage("label.service_called_is_not_msa_service", new String[]{sh.serviceType}),
- MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
+ JOptionPane.showMessageDialog(Desktop.desktop, MessageManager
+ .formatMessage("label.service_called_is_not_msa_service",
+ new String[]
+ { sh.serviceType }), MessageManager
+ .getString("label.internal_jalview_error"),
+ JOptionPane.WARNING_MESSAGE);
return;
}
server = (MsaWS) sh.service;
if ((wsInfo = setWebService(sh, false)) == null)
{
- JOptionPane.showMessageDialog(Desktop.desktop,
- MessageManager.formatMessage("label.msa_service_is_unknown", new String[]{sh.serviceType}),
- MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE);
+ JOptionPane.showMessageDialog(Desktop.desktop, MessageManager
+ .formatMessage("label.msa_service_is_unknown", new String[]
+ { sh.serviceType }), MessageManager
+ .getString("label.internal_jalview_error"),
+ JOptionPane.WARNING_MESSAGE);
return;
}
+
startMsaWSClient(altitle, msa, submitGaps, preserveOrder, seqdataset);
+
}
public MsaWSClient()
MsaWSThread msathread = new MsaWSThread(server, preset, paramset,
WsURL, wsInfo, alignFrame, WebServiceName, jobtitle, msa,
submitGaps, preserveOrder, seqdataset);
- wsInfo.setthisService(msathread);
- msathread.start();
+ if (msathread.hasValidInput())
+ {
+ wsInfo.setthisService(msathread);
+ wsInfo.setVisible(true);
+ msathread.start();
+ }
+ else
+ {
+ JOptionPane.showMessageDialog(alignFrame,
+ MessageManager.getString("info.invalid_msa_input_mininfo"),
+ MessageManager.getString("info.invalid_msa_notenough"),
+ JOptionPane.INFORMATION_MESSAGE);
+ wsInfo.setVisible(false);
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ System.out.println("A".matches("(-*[a-zA-Z]-*){1}[a-zA-Z-]*"));
}
+
+
protected String getServiceActionKey()
{
return "MsaWS";
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame.gatherSequencesForAlignment();
+
+ if (msa != null)
+ {
new MsaWSClient(service, alignFrame.getTitle(), msa, withGaps,
true, alignFrame.getViewport().getAlignment()
.getDataset(), alignFrame);
+ }
}
});
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame.gatherSequencesForAlignment();
- new MsaWSClient(service, null, null, true, alignFrame
+ if (msa != null)
+ {
+ new MsaWSClient(service, null, null, true, alignFrame
.getTitle(), msa, withGaps, true, alignFrame
.getViewport().getAlignment().getDataset(), alignFrame);
+ }
}
});
"label.run_with_preset_params", new String[]
{ calcName }));
+ final int showToolTipFor = ToolTipManager.sharedInstance()
+ .getDismissDelay();
for (final WsParamSetI preset : presets)
{
final JMenuItem methodR = new JMenuItem(preset.getName());
- methodR.setToolTipText(JvSwingUtils.wrapTooltip(true, "<p><strong>"
- + (preset.isModifiable() ? MessageManager.getString("label.user_preset")
- : MessageManager.getString("label.service_preset")) + "</strong><br/>"
- + preset.getDescription() + "</p>"));
+ final int QUICK_TOOLTIP = 1500;
+ // JAL-1582 shorten tooltip display time in these menu items as
+ // they can obscure other options
+ methodR.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseEntered(MouseEvent e)
+ {
+ ToolTipManager.sharedInstance().setDismissDelay(
+ QUICK_TOOLTIP);
+ }
+
+ @Override
+ public void mouseExited(MouseEvent e)
+ {
+ ToolTipManager.sharedInstance().setDismissDelay(showToolTipFor);
+ }
+
+ });
+ methodR.setToolTipText(JvSwingUtils.wrapTooltip(
+ true,
+ "<p><strong>"
+ + (preset.isModifiable() ? MessageManager
+ .getString("label.user_preset")
+ : MessageManager
+ .getString("label.service_preset"))
+ + "</strong><br/>" + preset.getDescription()
+ + "</p>"));
methodR.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame
.gatherSequencesForAlignment();
- new MsaWSClient(service, preset, alignFrame.getTitle(),
+
+ if (msa != null)
+ {
+ MsaWSClient msac = new MsaWSClient(service, preset,
+ alignFrame.getTitle(),
msa, false, true, alignFrame.getViewport()
.getAlignment().getDataset(), alignFrame);
+ }
}
*/
package jalview.ws.jws2;
-import java.util.*;
+import jalview.analysis.AlignSeq;
+import jalview.bin.Cache;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentOrder;
+import jalview.datamodel.AlignmentView;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.WebserviceInfo;
+import jalview.util.MessageManager;
+import jalview.ws.AWsJob;
+import jalview.ws.JobStateSummary;
+import jalview.ws.WSClientI;
+import jalview.ws.jws2.dm.JabaWsParamSet;
+import jalview.ws.params.WsParamSetI;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
import compbio.data.msa.MsaWS;
import compbio.metadata.Argument;
import compbio.metadata.JobStatus;
import compbio.metadata.Preset;
-import jalview.analysis.*;
-import jalview.bin.*;
-import jalview.datamodel.*;
-import jalview.gui.*;
-import jalview.util.MessageManager;
-import jalview.ws.AWsJob;
-import jalview.ws.WSClientI;
-import jalview.ws.JobStateSummary;
-import jalview.ws.jws2.dm.JabaWsParamSet;
-import jalview.ws.params.WsParamSetI;
-
class MsaWSThread extends AWS2Thread implements WSClientI
{
boolean submitGaps = false; // pass sequences including gaps to alignment
int ow = w, nw = w;
for (i = 0, w = emptySeqs.size(); i < w; i++)
{
- String[] es = (String[]) emptySeqs.get(i);
+ String[] es = emptySeqs.get(i);
if (es != null && es[1] != null)
{
int sw = es[1].length();
}
for (i = 0, w = emptySeqs.size(); i < w; i++)
{
- String[] es = (String[]) emptySeqs.get(i);
+ String[] es = emptySeqs.get(i);
if (es[1] == null)
{
t_alseqs[i + alseq_l] = new jalview.datamodel.Sequence(es[0],
SequenceI[][] conmsa = _msa.getVisibleContigs('-');
if (conmsa != null)
{
- int njobs = conmsa.length;
+ int nvalid = 0, njobs = conmsa.length;
jobs = new MsaWSJob[njobs];
for (int j = 0; j < njobs; j++)
{
{
jobs[j] = new MsaWSJob(0, conmsa[j]);
}
+ if (((MsaWSJob) jobs[j]).hasValidInput())
+ {
+ nvalid++;
+ }
((MsaWSJob) jobs[j]).preset = preset;
((MsaWSJob) jobs[j]).arguments = paramset;
((MsaWSJob) jobs[j]).alignmentProgram = wsname;
}
wsinfo.setProgressText(jobs[j].getJobnum(), OutputHeader);
}
+ validInput = nvalid > 0;
}
}
+ boolean validInput = false;
+
+ /**
+ *
+ * @return true if the thread will perform a calculation
+ */
+ public boolean hasValidInput()
+ {
+ return validInput;
+ }
public boolean isCancellable()
{
return true;
*/
package jalview.ws.jws2.jabaws2;
-import java.util.HashMap;
-
-import compbio.data.msa.JABAService;
import jalview.ws.jws2.AAConClient;
import jalview.ws.jws2.JPred301Client;
import jalview.ws.jws2.RNAalifoldClient;
import jalview.ws.uimodel.AlignAnalysisUIText;
+import java.util.HashMap;
+import java.util.HashSet;
+
+import compbio.data.msa.JABAService;
+
public class Jws2InstanceFactory
{
private static HashMap<String, AlignAnalysisUIText> aaConGUI;
+ private static HashSet<String> ignoreGUI;
private static String category_rewrite(String cat_name)
{
return (cat_name != null && cat_name.equals("Prediction")) ? "Secondary Structure Prediction"
AAConClient.getAlignAnalysisUITest());
aaConGUI.put(compbio.ws.client.Services.RNAalifoldWS.toString(),
RNAalifoldClient.getAlignAnalysisUITest());
+ // disable the JPred301 client in jalview ...
+ ignoreGUI = new HashSet<String>();
+ ignoreGUI.add(compbio.ws.client.Services.JpredWS.toString());
aaConGUI.put(compbio.ws.client.Services.JpredWS.toString(),
JPred301Client.getAlignAnalysisUITest());
}
}
/**
+ * exclusion list to avoid creating GUI elements for services we don't fully
+ * support
+ *
+ * @param serviceType
+ * @return
+ */
+ public static boolean ignoreService(String serviceType)
+ {
+ init();
+ return (ignoreGUI.contains(serviceType.toString()));
+ }
+ /**
* construct a service instance and configure it with any additional
* properties needed so Jalview can access it correctly
*
init();
Jws2Instance svc = new Jws2Instance(jwsservers, serviceType,
category_rewrite(name), description, service);
-
svc.aaui = aaConGUI.get(serviceType.toString());
return svc;
}
*/
package jalview.ws.rest;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.event.MenuEvent;
-import javax.swing.event.MenuListener;
-
import jalview.bin.Cache;
import jalview.datamodel.AlignmentView;
import jalview.gui.AlignFrame;
import jalview.ws.WSClientI;
import jalview.ws.WSMenuEntryProviderI;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
+
/**
* @author JimP
*
if (!headless)
{
wsInfo = new WebserviceInfo(WebServiceJobTitle, WebServiceName + "\n"
- + WebServiceReference);
+ + WebServiceReference, true);
wsInfo.setRenderAsHtml(true);
}
--- /dev/null
+package jalview.commands;
+
+import static org.junit.Assert.assertEquals;
+import jalview.commands.EditCommand.Action;
+import jalview.commands.EditCommand.Edit;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Unit tests for EditCommand
+ *
+ * @author gmcarstairs
+ *
+ */
+public class EditCommandTest
+{
+
+ private EditCommand testee;
+
+ private SequenceI[] seqs;
+
+ private Alignment al;
+
+ @Before
+ public void setUp()
+ {
+ testee = new EditCommand();
+ seqs = new SequenceI[4];
+ seqs[0] = new Sequence("seq0", "abcdefghjk");
+ seqs[1] = new Sequence("seq1", "fghjklmnopq");
+ seqs[2] = new Sequence("seq2", "qrstuvwxyz");
+ seqs[3] = new Sequence("seq3", "1234567890");
+ al = new Alignment(seqs);
+ al.setGapCharacter('?');
+ }
+
+ /**
+ * Test inserting gap characters
+ */
+ @Test
+ public void testAppendEdit_insertGap()
+ {
+ // set a non-standard gap character to prove it is actually used
+ testee.appendEdit(Action.INSERT_GAP, seqs, 4, 3, al, true);
+ assertEquals("abcd???efghjk", seqs[0].getSequenceAsString());
+ assertEquals("fghj???klmnopq", seqs[1].getSequenceAsString());
+ assertEquals("qrst???uvwxyz", seqs[2].getSequenceAsString());
+ assertEquals("1234???567890", seqs[3].getSequenceAsString());
+
+ // todo: test for handling out of range positions?
+ }
+
+ /**
+ * Test deleting characters from sequences. Note the deleteGap() action does
+ * not check that only gap characters are being removed.
+ */
+ @Test
+ public void testAppendEdit_deleteGap()
+ {
+ testee.appendEdit(Action.DELETE_GAP, seqs, 4, 3, al, true);
+ assertEquals("abcdhjk", seqs[0].getSequenceAsString());
+ assertEquals("fghjnopq", seqs[1].getSequenceAsString());
+ assertEquals("qrstxyz", seqs[2].getSequenceAsString());
+ assertEquals("1234890", seqs[3].getSequenceAsString());
+ }
+
+ /**
+ * Test a cut action. The command should store the cut characters to support
+ * undo.
+ */
+ @Test
+ public void testCut()
+ {
+ Edit ec = testee.new Edit(Action.CUT, seqs, 4, 3, al);
+ testee.cut(ec, new AlignmentI[]
+ { al });
+ assertEquals("abcdhjk", seqs[0].getSequenceAsString());
+ assertEquals("fghjnopq", seqs[1].getSequenceAsString());
+ assertEquals("qrstxyz", seqs[2].getSequenceAsString());
+ assertEquals("1234890", seqs[3].getSequenceAsString());
+
+ assertEquals("efg", new String(ec.string[0]));
+ assertEquals("klm", new String(ec.string[1]));
+ assertEquals("uvw", new String(ec.string[2]));
+ assertEquals("567", new String(ec.string[3]));
+ // TODO: case where whole sequence is deleted as nothing left; etc
+ }
+
+ /**
+ * Test a Paste action, where this adds sequences to an alignment.
+ */
+ @Test
+ @Ignore
+ // TODO fix so it works
+ public void testPaste_addToAlignment()
+ {
+ SequenceI[] newSeqs = new SequenceI[2];
+ newSeqs[0] = new Sequence("newseq0", "ACEFKL");
+ newSeqs[1] = new Sequence("newseq1", "JWMPDH");
+
+ Edit ec = testee.new Edit(Action.PASTE, newSeqs, 0, al.getWidth(), al);
+ testee.paste(ec, new AlignmentI[]
+ { al });
+ assertEquals(6, al.getSequences().size());
+ assertEquals("1234567890", seqs[3].getSequenceAsString());
+ assertEquals("ACEFKL", seqs[4].getSequenceAsString());
+ assertEquals("JWMPDH", seqs[5].getSequenceAsString());
+ }
+
+ /**
+ * Test insertGap followed by undo command
+ */
+ @Test
+ public void testUndo_insertGap()
+ {
+ // Edit ec = testee.new Edit(Action.INSERT_GAP, seqs, 4, 3, '?');
+ testee.appendEdit(Action.INSERT_GAP, seqs, 4, 3, al, true);
+ // check something changed
+ assertEquals("abcd???efghjk", seqs[0].getSequenceAsString());
+ testee.undoCommand(new AlignmentI[]
+ { al });
+ assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
+ assertEquals("fghjklmnopq", seqs[1].getSequenceAsString());
+ assertEquals("qrstuvwxyz", seqs[2].getSequenceAsString());
+ assertEquals("1234567890", seqs[3].getSequenceAsString());
+ }
+
+ /**
+ * Test deleteGap followed by undo command
+ */
+ @Test
+ public void testUndo_deleteGap()
+ {
+ testee.appendEdit(Action.DELETE_GAP, seqs, 4, 3, al, true);
+ // check something changed
+ assertEquals("abcdhjk", seqs[0].getSequenceAsString());
+ testee.undoCommand(new AlignmentI[]
+ { al });
+ // deleteGap doesn't 'remember' deleted characters, only gaps get put back
+ assertEquals("abcd???hjk", seqs[0].getSequenceAsString());
+ assertEquals("fghj???nopq", seqs[1].getSequenceAsString());
+ assertEquals("qrst???xyz", seqs[2].getSequenceAsString());
+ assertEquals("1234???890", seqs[3].getSequenceAsString());
+ }
+
+ /**
+ * Test several commands followed by an undo command
+ */
+ @Test
+ public void testUndo_multipleCommands()
+ {
+ // delete positions 3/4/5 (counting from 1)
+ testee.appendEdit(Action.DELETE_GAP, seqs, 2, 3, al, true);
+ assertEquals("abfghjk", seqs[0].getSequenceAsString());
+ assertEquals("1267890", seqs[3].getSequenceAsString());
+
+ // insert 2 gaps after the second residue
+ testee.appendEdit(Action.INSERT_GAP, seqs, 2, 2, al, true);
+ assertEquals("ab??fghjk", seqs[0].getSequenceAsString());
+ assertEquals("12??67890", seqs[3].getSequenceAsString());
+
+ // delete positions 4/5/6
+ testee.appendEdit(Action.DELETE_GAP, seqs, 3, 3, al, true);
+ assertEquals("ab?hjk", seqs[0].getSequenceAsString());
+ assertEquals("12?890", seqs[3].getSequenceAsString());
+
+ // undo edit commands
+ testee.undoCommand(new AlignmentI[]
+ { al });
+ assertEquals("ab?????hjk", seqs[0].getSequenceAsString());
+ assertEquals("12?????890", seqs[3].getSequenceAsString());
+ }
+
+ /**
+ * Unit test for JAL-1594 bug: click and drag sequence right to insert gaps -
+ * undo did not remove them all.
+ */
+ @Test
+ public void testUndo_multipleInsertGaps()
+ {
+ testee.appendEdit(Action.INSERT_GAP, seqs, 4, 1, al, true);
+ testee.appendEdit(Action.INSERT_GAP, seqs, 5, 1, al, true);
+ testee.appendEdit(Action.INSERT_GAP, seqs, 6, 1, al, true);
+
+ // undo edit commands
+ testee.undoCommand(new AlignmentI[]
+ { al });
+ assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
+ assertEquals("1234567890", seqs[3].getSequenceAsString());
+
+ }
+
+ /**
+ * Test cut followed by undo command
+ */
+ @Test
+ public void testUndo_cut()
+ {
+ testee.appendEdit(Action.CUT, seqs, 4, 3, al, true);
+ // check something changed
+ assertEquals("abcdhjk", seqs[0].getSequenceAsString());
+ testee.undoCommand(new AlignmentI[]
+ { al });
+ assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
+ assertEquals("fghjklmnopq", seqs[1].getSequenceAsString());
+ assertEquals("qrstuvwxyz", seqs[2].getSequenceAsString());
+ assertEquals("1234567890", seqs[3].getSequenceAsString());
+ }
+
+ /**
+ * Test the replace command (used to manually edit a sequence)
+ */
+ @Test
+ public void testReplace()
+ {
+ // seem to need a dataset sequence on the edited sequence here
+ seqs[1].setDatasetSequence(seqs[1]);
+ new EditCommand("", Action.REPLACE, "ZXY", new SequenceI[]
+ { seqs[1] }, 4, 8, al);
+ assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
+ assertEquals("qrstuvwxyz", seqs[2].getSequenceAsString());
+ assertEquals("1234567890", seqs[3].getSequenceAsString());
+ seqs[1] = new Sequence("seq1", "fghjZXYnopq");
+
+ }
+}
/**
* Tests for addAlignmentAnnotation. Note this method has the side-effect of
- * setting the sequenceRef on the annotation.
+ * setting the sequenceRef on the annotation. Adding the same annotation twice
+ * should be ignored.
*/
@Test
public void testAddAlignmentAnnotation()
AlignmentAnnotation[] anns = seq.getAnnotation();
assertEquals(1, anns.length);
assertSame(annotation, anns[0]);
+
+ // re-adding does nothing
+ seq.addAlignmentAnnotation(annotation);
+ anns = seq.getAnnotation();
+ assertEquals(1, anns.length);
+ assertSame(annotation, anns[0]);
+
+ // an identical but different annotation can be added
+ final AlignmentAnnotation annotation2 = new AlignmentAnnotation("a",
+ "b", 2d);
+ seq.addAlignmentAnnotation(annotation2);
+ anns = seq.getAnnotation();
+ assertEquals(2, anns.length);
+ assertSame(annotation, anns[0]);
+ assertSame(annotation2, anns[1]);
+
}
}
{
for (String pdbStr : testFile)
{
- PDBfile mctest = new PDBfile(false, false, pdbStr,
+ PDBfile mctest = new PDBfile(false, false, false, pdbStr,
AppletFormatAdapter.FILE);
PDBFileWithJmol jtest = new PDBFileWithJmol(pdbStr,
jalview.io.AppletFormatAdapter.FILE);
package jalview.ext.paradise;
import static org.junit.Assert.assertTrue;
-
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
-import jalview.ext.paradise.Annotate3D;
import jalview.io.FastaFile;
import jalview.io.FormatAdapter;
iline = id.readLine();
fline = file.readLine();
if (iline != null)
+ {
System.out.println(iline);
+ }
if (fline != null)
+ {
System.out.println(fline);
+ }
// next assert fails for latest RNAview - because the XMLID entries
// change between file and ID based RNAML generation.
assertTrue(
@Test
public void testPDBfileVsRNAML() throws Exception
{
- PDBfile pdbf = new PDBfile(true,true,"examples/2GIS.pdb", FormatAdapter.FILE);
+ PDBfile pdbf = new PDBfile(true, false, true, "examples/2GIS.pdb",
+ FormatAdapter.FILE);
Assert.assertTrue(pdbf.isValid());
// Comment - should add new FileParse constructor like new FileParse(Reader
// ..). for direct reading
--- /dev/null
+package jalview.gui;
+
+import static org.junit.Assert.assertTrue;
+import jalview.gui.Help.HelpId;
+
+import java.net.URL;
+
+import javax.help.HelpSet;
+import javax.help.HelpSetException;
+import javax.help.Map;
+
+import org.junit.Test;
+
+public class HelpTest
+{
+ @Test
+ public void checkHelpTargets() throws HelpSetException
+ {
+ ClassLoader cl = Desktop.class.getClassLoader();
+ URL url = HelpSet.findHelpSet(cl, "help/help"); // $NON-NLS-$
+ HelpSet hs = new HelpSet(cl, url);
+ Map targets = hs.getLocalMap();
+
+ for (HelpId id : HelpId.values())
+ {
+ String target = id.toString();
+ assertTrue("Unmatched target enum: " + target,
+ targets.isValidID(target, hs));
+ }
+
+ }
+}
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import jalview.io.AppletFormatAdapter;
+import jalview.io.FormatAdapter;
import jalview.util.MessageManager;
import java.awt.Component;
@Before
public void setUp() throws IOException
{
- alignment = new jalview.io.FormatAdapter().readFile(TEST_DATA,
+ alignment = new FormatAdapter().readFile(TEST_DATA,
AppletFormatAdapter.PASTE, "FASTA");
AlignFrame af = new AlignFrame(alignment, 700, 500);
parentPanel = new AlignmentPanel(af, af.getViewport());
public void testConfigureReferenceAnnotationsMenu_noReferenceAnnotations()
{
JMenuItem menu = new JMenuItem();
- List<SequenceI> seqs = new ArrayList<SequenceI>();
/*
* Initial state is that sequences have annotations, and have dataset
* sequences, but the dataset sequences have no annotations. Hence nothing
* to add.
*/
- seqs = parentPanel.getAlignment().getSequences();
+ List<SequenceI> seqs = parentPanel.getAlignment().getSequences();
testee.configureReferenceAnnotationsMenu(menu, seqs);
assertFalse(menu.isEnabled());
public void testConfigureReferenceAnnotationsMenu_alreadyAdded()
{
JMenuItem menu = new JMenuItem();
- List<SequenceI> seqs = new ArrayList<SequenceI>();
+ List<SequenceI> seqs = parentPanel.getAlignment().getSequences();
+
+ // make up new annotations and add to dataset sequences, sequences and
+ // alignment
+ attachReferenceAnnotations(seqs, true, true);
- seqs = parentPanel.getAlignment().getSequences();
- // copy annotation from sequence to dataset
- seqs.get(1).getDatasetSequence()
- .addAlignmentAnnotation(seqs.get(1).getAnnotation()[0]);
testee.configureReferenceAnnotationsMenu(menu, seqs);
assertFalse(menu.isEnabled());
}
{
JMenuItem menu = new JMenuItem();
List<SequenceI> seqs = parentPanel.getAlignment().getSequences();
+
// make up new annotations and add to dataset sequences
+ attachReferenceAnnotations(seqs, false, false);
+
+ testee.configureReferenceAnnotationsMenu(menu, seqs);
+ assertTrue(menu.isEnabled());
+ String expected = "<html><table width=350 border=0><tr><td>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
+ assertEquals(expected, menu.getToolTipText());
+ }
+
+ /**
+ * Test building the 'add reference annotations' menu for the case where
+ * several reference annotations are on the dataset and the sequences but not
+ * on the alignment. The menu item should be enabled, and acquire a tooltip
+ * which lists the annotation sources (calcIds) and type (labels).
+ */
+ @Test
+ public void testConfigureReferenceAnnotationsMenu_notOnAlignment()
+ {
+ JMenuItem menu = new JMenuItem();
+ List<SequenceI> seqs = parentPanel.getAlignment().getSequences();
+
+ // make up new annotations and add to dataset sequences and sequences
+ attachReferenceAnnotations(seqs, true, false);
+
+ testee.configureReferenceAnnotationsMenu(menu, seqs);
+ assertTrue(menu.isEnabled());
+ String expected = "<html><table width=350 border=0><tr><td>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
+ assertEquals(expected, menu.getToolTipText());
+ }
+ /**
+ * Generate annotations and add to dataset sequences and (optionally)
+ * sequences and/or alignment
+ *
+ * @param seqs
+ * @param addToSequence
+ * @param addToAlignment
+ */
+ private void attachReferenceAnnotations(List<SequenceI> seqs,
+ boolean addToSequence, boolean addToAlignment)
+ {
// PDB.secondary structure on Sequence0
AlignmentAnnotation annotation = new AlignmentAnnotation(
"secondary structure", "", 0);
annotation.setCalcId("PBD");
seqs.get(0).getDatasetSequence().addAlignmentAnnotation(annotation);
+ if (addToSequence)
+ {
+ seqs.get(0).addAlignmentAnnotation(annotation);
+ }
+ if (addToAlignment)
+ {
+ this.alignment.addAnnotation(annotation);
+ }
// PDB.Temp on Sequence1
annotation = new AlignmentAnnotation("Temp", "", 0);
annotation.setCalcId("PBD");
seqs.get(1).getDatasetSequence().addAlignmentAnnotation(annotation);
+ if (addToSequence)
+ {
+ seqs.get(1).addAlignmentAnnotation(annotation);
+ }
+ if (addToAlignment)
+ {
+ this.alignment.addAnnotation(annotation);
+ }
// JMOL.secondary structure on Sequence0
annotation = new AlignmentAnnotation("secondary structure", "", 0);
annotation.setCalcId("JMOL");
seqs.get(0).getDatasetSequence().addAlignmentAnnotation(annotation);
+ if (addToSequence)
+ {
+ seqs.get(0).addAlignmentAnnotation(annotation);
+ }
+ if (addToAlignment)
+ {
+ this.alignment.addAnnotation(annotation);
+ }
+ }
- testee.configureReferenceAnnotationsMenu(menu, seqs);
- assertTrue(menu.isEnabled());
- String expected = "<html><table width=350 border=0><tr><td>Add annotations for<br/>JMOL/secondary structure<br/>PBD/Temp</td></tr></table></html>";
- assertEquals(expected, menu.getToolTipText());
+ /**
+ * Test building the 'add reference annotations' menu for the case where there
+ * are two alignment views:
+ * <ul>
+ * <li>in one view, reference annotations have been added (are on the
+ * datasets, sequences and alignment)</li>
+ * <li>in the current view, reference annotations are on the dataset and
+ * sequence, but not the alignment</li>
+ * </ul>
+ * The menu item should be enabled, and acquire a tooltip which lists the
+ * annotation sources (calcIds) and type (labels).
+ */
+ @Test
+ public void testConfigureReferenceAnnotationsMenu_twoViews()
+ {
}
/**
--- /dev/null
+package jalview.io;
+
+import jalview.datamodel.Alignment;
+import jalview.datamodel.Sequence;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.json.JSONException;
+
+public class BioJsHTMLOutputTest
+{
+
+
+ @Test
+ public void getJalviewAlignmentAsJsonString()
+ {
+ BioJsHTMLOutput bioJsHtmlOuput = new BioJsHTMLOutput(null, null);
+ bioJsHtmlOuput.setGlobalColorScheme("Zappo");
+
+ Sequence[] seqs = new Sequence[1];
+ Sequence seq = new Sequence("name", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1, 26);
+ // SequenceFeature seqFeature = new SequenceFeature("type", "desc",
+ // "status", 1, 5, "jalview");
+ // seq.addSequenceFeature(seqFeature);
+ seq.setDatasetSequence(seq);
+ seqs[0] = seq;
+
+ Alignment al = new Alignment(seqs);
+ try
+ {
+ String generatedJson = bioJsHtmlOuput
+ .getJalviewAlignmentAsJsonString(al);
+ assert (generatedJson
+ .equalsIgnoreCase("{\"globalColorScheme\":\"zappo\",\"seqs\":[{\"id\":\"1\",\"start\":1,\"name\":\"name/1-26\",\"features\":[],\"seq\":\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"end\":26}]}"));
+ System.out.println("Output : " + generatedJson);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ } catch (JSONException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
--- /dev/null
+package jalview.io;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class HtmlFileTest
+{
+
+ @Test
+ public void test()
+ {
+ fail("Not yet implemented");
+ }
+
+}
*/
package jalview.io;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import jalview.api.AlignmentViewPanel;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
public static void setUpBeforeClass() throws Exception
{
jalview.bin.Jalview.main(new String[]
- { "-props", "test/src/jalview/io/testProps.jvprops" });
+ { "-props", "test/jalview/io/testProps.jvprops" });
}
/**
@Test
public void gatherViewsHere() throws Exception
{
- int origCount = Desktop.getAlignframes().length;
+ int origCount = Desktop.getAlignframes() == null ? 0 : Desktop
+ .getAlignframes().length;
AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", FormatAdapter.FILE);
assertTrue("Didn't read in the example file correctly.", af != null);
Desktop.getAlignframes().length == 1 + origCount);
}
+
+ @Test
+ public void viewRefPdbAnnotation() throws Exception
+ {
+ AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
+ "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
+ assertTrue("Didn't read in the example file correctly.", af != null);
+ AlignmentViewPanel sps = null;
+ for (AlignmentViewPanel ap : af.alignPanel.alignFrame.getAlignPanels())
+ {
+ if ("Spinach Feredoxin Structure".equals(ap.getViewName()))
+ {
+ sps = ap;
+ break;
+ }
+ }
+ assertTrue("Couldn't find the structure view", sps != null);
+ SequenceI sq = sps.getAlignment().findName("1A70|");
+ AlignmentAnnotation refan = null;
+ for (AlignmentAnnotation ra:sps.getAlignment().getAlignmentAnnotation())
+ {
+ if (ra.graph != 0)
+ {
+ refan = ra;
+ break;
+ }
+ }
+ assertTrue("Annotation secondary structure not found.",refan!=null);
+ assertTrue("Couldn't find 1a70 null chain", sq != null);
+ // compare the manually added temperature factor annotation
+ // to the track automatically transferred from the pdb structure on load
+ for (AlignmentAnnotation ala : sq.getDatasetSequence().getAnnotation())
+ {
+ AlignmentAnnotation alaa;
+ sq.addAlignmentAnnotation(alaa = new AlignmentAnnotation(ala));
+ alaa.adjustForAlignment();
+ if (ala.graph == refan.graph)
+ {
+ for (int p = 0; p < ala.annotations.length; p++)
+ {
+ sq.findPosition(p);
+ try {
+ assertTrue(
+ "Mismatch at alignment position " + p,
+ (alaa.annotations[p] == null && refan.annotations[p] == null)
+ || alaa.annotations[p].value == refan.annotations[p].value);
+ }
+ catch (NullPointerException q)
+ {
+ fail("Mismatch of alignment annotations at position " + p
+ + " Ref seq ann: " + refan.annotations[p]
+ + " alignment " + alaa.annotations[p]);
+ }
+ }
+ }
+ }
+
+ }
}
*/
package jalview.io;
-import static org.junit.Assert.*;
-
import java.io.File;
import org.junit.AfterClass;
public void testRnamlToStockholmIO()
{
StockholmFileTest.testFileIOwithFormat(new File(
- "examples/rna-alignment.xml"), "STH");
+ "examples/rna-alignment.xml"), "STH", -1, -1);
}
*/
package jalview.io;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import jalview.datamodel.Alignment;
@Test
public void pfamFileIO() throws Exception
{
- testFileIOwithFormat(new File(PfamFile), "STH");
+ testFileIOwithFormat(new File(PfamFile), "STH", -1, 0);
}
@Test
@Test
public void rfamFileIO() throws Exception
{
- testFileIOwithFormat(new File(RfamFile), "STH");
+ testFileIOwithFormat(new File(RfamFile), "STH", 2, 1);
}
/**
* - label for IO class used to write and read back in the data from
* f
*/
- public static void testFileIOwithFormat(File f, String ioformat)
+ public static void testFileIOwithFormat(File f, String ioformat,
+ int naliannot, int nminseqann)
{
System.out.println("Reading file: " + f);
String ff = f.getPath();
+ ioformat + "' writer",
ioformat.equals(identifyoutput));
testAlignmentEquivalence(al, al_input);
+ int numaliannot = 0, numsqswithali = 0;
+ for (AlignmentAnnotation ala : al_input.getAlignmentAnnotation())
+ {
+ if (ala.sequenceRef == null)
+ {
+ numaliannot++;
+ }
+ else
+ {
+ numsqswithali++;
+ }
+ }
+ if (naliannot > -1)
+ {
+ assertEquals("Number of alignment annotations", naliannot,
+ numaliannot);
+ }
+
+ assertTrue(
+ "Number of sequence associated annotations wasn't at least "
+ + nminseqann, numsqswithali >= nminseqann);
+
} catch (Exception e)
{
e.printStackTrace();
--- /dev/null
+#---JalviewX Properties File---
+#Fri Apr 25 09:54:25 BST 2014
+SCREEN_Y=768
+SCREEN_X=936
+SHOW_WSDISCOVERY_ERRORS=true
+LATEST_VERSION=2.8.0b1
+SHOW_CONSERVATION=true
+JALVIEW_RSS_WINDOW_SCREEN_WIDTH=550
+JAVA_CONSOLE_SCREEN_WIDTH=450
+LAST_DIRECTORY=/Volumes/Data/Users/jimp/Documents/testing/Jalview/examples
+ID_ITALICS=true
+SORT_ALIGNMENT=No sort
+SHOW_IDENTITY=true
+WSMENU_BYHOST=false
+SEQUENCE_LINKS=EMBL-EBI Search|http\://www.ebi.ac.uk/ebisearch/search.ebi?db\=allebi&query\=$SEQUENCE_ID$
+SHOW_FULLSCREEN=false
+RECENT_URL=http\://www.jalview.org/examples/exampleFile_2_7.jar
+FONT_NAME=SansSerif
+BLC_JVSUFFIX=true
+VERSION_CHECK=false
+YEAR=2011
+SHOW_DBREFS_TOOLTIP=true
+MSF_JVSUFFIX=true
+SCREENGEOMETRY_HEIGHT=1600
+JAVA_CONSOLE_SCREEN_Y=475
+JAVA_CONSOLE_SCREEN_X=830
+PFAM_JVSUFFIX=true
+PIR_JVSUFFIX=true
+STARTUP_FILE=http\://www.jalview.org/examples/exampleFile_2_3.jar
+JAVA_CONSOLE_SCREEN_HEIGHT=162
+PIR_MODELLER=false
+GAP_SYMBOL=-
+SHOW_QUALITY=true
+SHOW_GROUP_CONSERVATION=false
+SHOW_JWS2_SERVICES=true
+SHOW_NPFEATS_TOOLTIP=true
+FONT_STYLE=plain
+ANTI_ALIAS=false
+SORT_BY_TREE=false
+RSBS_SERVICES=|Multi-Harmony|Analysis|Sequence Harmony and Multi-Relief (Brandt et al. 2010)|hseparable,gapCharacter\='-',returns\='ANNOTATION'|?tool\=jalview|http\://zeus.few.vu.nl/programs/shmrwww/index.php?tool\=jalview&groups\=$PARTITION\:min\='2',minsize\='2',sep\=' '$&ali_file\=$ALIGNMENT\:format\='FASTA',writeasfile$
+AUTHORFNAMES=Jim Procter, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton
+JALVIEW_RSS_WINDOW_SCREEN_HEIGHT=328
+SHOW_GROUP_CONSENSUS=false
+SHOW_CONSENSUS_HISTOGRAM=true
+SHOW_OVERVIEW=false
+AUTHORS=J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+FIGURE_AUTOIDWIDTH=false
+SCREEN_WIDTH=900
+ANNOTATIONCOLOUR_MIN=ffc800
+SHOW_STARTUP_FILE=false
+RECENT_FILE=examples/uniref50.fa\t/Volumes/Data/Users/jimp/Documents/testing/Jalview/examples/RF00031_folded.stk\t/Volumes/Data/Users/jimp/bs_ig_mult.out
+DEFAULT_FILE_FORMAT=FASTA
+SHOW_JAVA_CONSOLE=false
+VERSION=2.8b1
+FIGURE_USERIDWIDTH=
+WSMENU_BYTYPE=false
+DEFAULT_COLOUR=None
+NOQUESTIONNAIRES=true
+JALVIEW_NEWS_RSS_LASTMODIFIED=Apr 23, 2014 2\:53\:26 PM
+BUILD_DATE=01 November 2013
+PILEUP_JVSUFFIX=true
+SHOW_CONSENSUS_LOGO=false
+SCREENGEOMETRY_WIDTH=2560
+SHOW_ANNOTATIONS=true
+JALVIEW_RSS_WINDOW_SCREEN_Y=0
+USAGESTATS=false
+JALVIEW_RSS_WINDOW_SCREEN_X=0
+SHOW_UNCONSERVED=false
+SHOW_JVSUFFIX=true
+DAS_LOCAL_SOURCE=
+SCREEN_HEIGHT=650
+ANNOTATIONCOLOUR_MAX=ff0000
+AUTO_CALC_CONSENSUS=true
+FASTA_JVSUFFIX=true
+DAS_ACTIVE_SOURCE=uniprot\t
+JWS2HOSTURLS=http\://www.compbio.dundee.ac.uk/jabaws
+PAD_GAPS=false
+CLUSTAL_JVSUFFIX=true
+SHOW_ENFIN_SERVICES=true
+FONT_SIZE=10
+RIGHT_ALIGN_IDS=false
+USE_PROXY=false
+WRAP_ALIGNMENT=false
+DAS_REGISTRY_URL=http\://www.dasregistry.org/das/
*/
package jalview.ws.jabaws;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import jalview.ws.jws2.Jws2Discoverer;
import java.util.Vector;
services.add(url);
}
;
- Jws2Discoverer.setServiceUrls(services);
+ Jws2Discoverer.getDiscoverer().setServiceUrls(services);
}
try
{
<?xml version="1.0" encoding="UTF-8"?>
-<!-- This script was automatically generated using InstallAnywhere 2013 Professional, Build 4538
+<!-- This script was automatically generated using InstallAnywhere 2014 Professional, Build 4783
STATUS: Fully Functional LICENSED Edition
- DATE: Fri Nov 01 13:57:32 GMT 2013 -->
-<InstallAnywhere_Deployment_Project increments="5103">
+ DATE: Tue Dec 02 16:16:02 GMT 2014 -->
+<InstallAnywhere_Deployment_Project increments="5299">
<!-- ** DO NOT EDIT ** Essential authorization and configuration data ** DO NOT EDIT ** -->
<essentialScriptInfo>
- <versionID major="15" minor="0" revision="0"/>
- <editionID>49,53,46,48,32,80,114,111,102,101,115,115,105,111,110,97,108,32,66,117,105,108,100,32,52,53,51,56</editionID>
+ <versionID major="16" minor="0" revision="0"/>
+ <editionID>49,54,46,48,32,80,114,111,102,101,115,115,105,111,110,97,108,32,66,117,105,108,100,32,52,55,56,51</editionID>
<scriptID>12,42,11,85,78,76,73,67,69,78,83,69,68</scriptID>
- <buildID>3,13,71,76,105,110,117,120,44,32,50,46,54,46,51,50,45,50,55,57,46,50,50,46,49,46,101,108,54,46,120,56,54,95,54,52,44,32,97,109,100,54,52,59,32,74,97,118,97,32,49,46,55,46,48,95,50,53,44,32,79,114,97,99,108,101,32,67,111,114,112,111,114,97,116,105,111,110,44,32,104,116,116,112,58,47,47,106,97,118,97,46,111,114,97,99,108,101,46,99,111,109,47,59,32,101,110,44,32,85,110,107,110,111,119,110,59,32,73,83,79,45,56,56,53,57,45,49</buildID>
+ <buildID>3,13,71,76,105,110,117,120,44,32,50,46,54,46,51,50,45,51,53,56,46,54,46,50,46,101,108,54,46,120,56,54,95,54,52,44,32,97,109,100,54,52,59,32,74,97,118,97,32,49,46,55,46,48,95,54,48,44,32,79,114,97,99,108,101,32,67,111,114,112,111,114,97,116,105,111,110,44,32,104,116,116,112,58,47,47,106,97,118,97,46,111,114,97,99,108,101,46,99,111,109,47,59,32,101,110,44,32,85,110,107,110,111,119,110,59,32,73,83,79,45,56,56,53,57,45,49</buildID>
<!-- The authorizationID may change between project saves and builds. This does not effect the integrity of the project, nor do changes in this value represent changes in the actual InstallAnywhere project. -->
- <authorizationID>1,0,0,64,29,-4,96,96,80,127,118,101,93,105,116,96,121,48,48,49,56,52,67,98,113,112,112,37,82,101,96,63,55,-11,2,0,1,84,19,2,1,0,0</authorizationID>
+ <authorizationID>1,0,0,64,13,-64,-128,0,80,127,118,101,93,105,116,96,121,48,48,49,56,52,67,98,113,112,112,37,82,101,96,63,55,-11,2,9,1,105,27,10,1,0,0</authorizationID>
</essentialScriptInfo>
- <installationObjects uniqueObjects="217">
+ <installationObjects uniqueObjects="225">
<object class="com.zerog.ia.installer.Installer" objectID="fe7d63eda660">
<property name="belongsToUninstallPhase">
<boolean>false</boolean>
</property>
</object>
</method>
- <method name="addElement">
- <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="244ffffaa672">
- <property name="belongsToUninstallPhase">
- <boolean>false</boolean>
- </property>
- <property name="rollbackEnabledCancel">
- <boolean>true</boolean>
- </property>
- <property name="rollbackEnabledError">
- <boolean>true</boolean>
- </property>
- <property name="ruleExpression">
- <string><![CDATA[]]></string>
- </property>
- <property name="unixPermissions">
- <string><![CDATA[664]]></string>
- </property>
- <property name="sourceName">
- <string><![CDATA[log4j-to-slf4j-2.0-rc2.jar]]></string>
- </property>
- <property name="overrideUnixPermissions">
- <boolean>false</boolean>
- </property>
- <property name="sourcePath">
- <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
- </property>
- <property name="shouldUninstall">
- <boolean>true</boolean>
- </property>
- <property name="rollbackEnabledCancel">
- <boolean>true</boolean>
- </property>
- <property name="rollbackEnabledError">
- <boolean>true</boolean>
- </property>
- <property name="destinationName">
- <string><![CDATA[log4j-to-slf4j-2.0-rc2.jar]]></string>
- </property>
- <property name="fileSize">
- <long>348699</long>
- </property>
- <property name="macBinary">
- <boolean>false</boolean>
- </property>
- <property name="targetCheckKind">
- <int>0</int>
- </property>
- <property name="ruleExpression">
- <string><![CDATA[]]></string>
- </property>
- </object>
- </method>
- <method name="addElement">
- <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="244f00faa672">
- <property name="belongsToUninstallPhase">
- <boolean>false</boolean>
- </property>
- <property name="rollbackEnabledCancel">
- <boolean>true</boolean>
- </property>
- <property name="rollbackEnabledError">
- <boolean>true</boolean>
- </property>
- <property name="ruleExpression">
- <string><![CDATA[]]></string>
- </property>
- <property name="unixPermissions">
- <string><![CDATA[664]]></string>
- </property>
- <property name="sourceName">
- <string><![CDATA[slf4j-log4j12-1.7.7.jar]]></string>
- </property>
- <property name="overrideUnixPermissions">
- <boolean>false</boolean>
- </property>
- <property name="sourcePath">
- <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
- </property>
- <property name="shouldUninstall">
- <boolean>true</boolean>
- </property>
- <property name="rollbackEnabledCancel">
- <boolean>true</boolean>
- </property>
- <property name="rollbackEnabledError">
- <boolean>true</boolean>
- </property>
- <property name="destinationName">
- <string><![CDATA[slf4j-log4j12-1.7.7.jar]]></string>
- </property>
- <property name="fileSize">
- <long>348699</long>
- </property>
- <property name="macBinary">
- <boolean>false</boolean>
- </property>
- <property name="targetCheckKind">
- <int>0</int>
- </property>
- <property name="ruleExpression">
- <string><![CDATA[]]></string>
- </property>
- </object>
- </method>
+ <method name="addElement">
+ <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="244ffffaa672">
+ <property name="belongsToUninstallPhase">
+ <boolean>false</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="ruleExpression">
+ <string><![CDATA[]]></string>
+ </property>
+ <property name="unixPermissions">
+ <string><![CDATA[664]]></string>
+ </property>
+ <property name="sourceName">
+ <string><![CDATA[log4j-to-slf4j-2.0-rc2.jar]]></string>
+ </property>
+ <property name="overrideUnixPermissions">
+ <boolean>false</boolean>
+ </property>
+ <property name="sourcePath">
+ <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+ </property>
+ <property name="shouldUninstall">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="destinationName">
+ <string><![CDATA[log4j-to-slf4j-2.0-rc2.jar]]></string>
+ </property>
+ <property name="fileSize">
+ <long>348699</long>
+ </property>
+ <property name="macBinary">
+ <boolean>false</boolean>
+ </property>
+ <property name="targetCheckKind">
+ <int>0</int>
+ </property>
+ <property name="ruleExpression">
+ <string><![CDATA[]]></string>
+ </property>
+ </object>
+ </method>
+ <method name="addElement">
+ <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="244f00faa672">
+ <property name="belongsToUninstallPhase">
+ <boolean>false</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="ruleExpression">
+ <string><![CDATA[]]></string>
+ </property>
+ <property name="unixPermissions">
+ <string><![CDATA[664]]></string>
+ </property>
+ <property name="sourceName">
+ <string><![CDATA[slf4j-log4j12-1.7.7.jar]]></string>
+ </property>
+ <property name="overrideUnixPermissions">
+ <boolean>false</boolean>
+ </property>
+ <property name="sourcePath">
+ <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+ </property>
+ <property name="shouldUninstall">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="destinationName">
+ <string><![CDATA[slf4j-log4j12-1.7.7.jar]]></string>
+ </property>
+ <property name="fileSize">
+ <long>348699</long>
+ </property>
+ <property name="macBinary">
+ <boolean>false</boolean>
+ </property>
+ <property name="targetCheckKind">
+ <int>0</int>
+ </property>
+ <property name="ruleExpression">
+ <string><![CDATA[]]></string>
+ </property>
+ </object>
+ </method>
<method name="addElement">
<object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="88d4aff3b0c6">
<property name="belongsToUninstallPhase">
<string><![CDATA[jfreesvg-2.1.jar]]></string>
</property>
<property name="fileSize">
- <long>382442</long>
+ <long>49768</long>
+ </property>
+ <property name="macBinary">
+ <boolean>false</boolean>
+ </property>
+ <property name="targetCheckKind">
+ <int>0</int>
+ </property>
+ <property name="ruleExpression">
+ <string><![CDATA[]]></string>
+ </property>
+ </object>
+ </method>
+ <method name="addElement">
+ <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="1f46efeefab93">
+ <property name="belongsToUninstallPhase">
+ <boolean>false</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="ruleExpression">
+ <string><![CDATA[]]></string>
+ </property>
+ <property name="unixPermissions">
+ <string><![CDATA[664]]></string>
+ </property>
+ <property name="sourceName">
+ <string><![CDATA[json_simple-1.1.jar]]></string>
+ </property>
+ <property name="overrideUnixPermissions">
+ <boolean>false</boolean>
+ </property>
+ <property name="sourcePath">
+ <string><![CDATA[/home/cruisecontrol/jalview/lib/]]></string>
+ </property>
+ <property name="shouldUninstall">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="destinationName">
+ <string><![CDATA[json_simple-1.1.jar]]></string>
+ </property>
+ <property name="fileSize">
+ <long>16046</long>
</property>
<property name="macBinary">
<boolean>false</boolean>
<boolean>true</boolean>
</property>
<property name="buildWithVM">
- <boolean>false</boolean>
+ <boolean>true</boolean>
+ </property>
+ <property name="bundledVM">
+ <string><![CDATA[OracleJRE8u5_Macosx.vm]]></string>
</property>
<property name="withoutVmSearchOption">
- <short>13</short>
+ <short>10</short>
</property>
<property name="withVMSearchOption">
<short>21</short>
<boolean>true</boolean>
</property>
<property name="bundledVM">
- <string><![CDATA[SunJRE160_01iWin32.vm]]></string>
+ <string><![CDATA[SunJRE170_03Win32.vm]]></string>
</property>
<property name="withoutVmSearchOption">
<short>10</short>
<boolean>true</boolean>
</property>
<property name="buildWithVM">
- <boolean>true</boolean>
+ <boolean>false</boolean>
</property>
<property name="bundledVM">
<string><![CDATA[IBMJRE142AIX_ca1420-20040626.vm]]></string>
<boolean>true</boolean>
</property>
<property name="bundledVM">
- <string><![CDATA[SunJRE160_26LinuxINTEL.vm]]></string>
+ <string><![CDATA[ORACLEJRE7u60_linux32.vm]]></string>
</property>
<property name="withoutVmSearchOption">
<short>10</short>
</property>
<property name="withVMSearchOption">
- <short>21</short>
+ <short>20</short>
</property>
<property name="win32InstallerLauncherType">
<short>90</short>
<boolean>true</boolean>
</property>
<property name="bundledVM">
- <string><![CDATA[SunJRE160_26SolarisSPARC.vm]]></string>
+ <string><![CDATA[OracleJRE8u5_SolarisSparc.vm]]></string>
</property>
<property name="withoutVmSearchOption">
<short>10</short>
<string><![CDATA[UNIX_with_VM]]></string>
</property>
<property name="buildNoVM">
- <boolean>false</boolean>
+ <boolean>true</boolean>
</property>
<property name="buildWithVM">
<boolean>true</boolean>
</property>
<property name="bundledVM">
- <string><![CDATA[SunJRE160_02LinuxINTEL.vm]]></string>
+ <string><![CDATA[ORACLEJRE7u60_linux32.vm]]></string>
</property>
<property name="withoutVmSearchOption">
<short>10</short>
<string><![CDATA[Windows_Pure_64_Bit]]></string>
</property>
<property name="buildNoVM">
- <boolean>false</boolean>
+ <boolean>true</boolean>
</property>
<property name="buildWithVM">
- <boolean>false</boolean>
+ <boolean>true</boolean>
+ </property>
+ <property name="bundledVM">
+ <string><![CDATA[OracleJRE8u5_windows(x64).vm]]></string>
</property>
<property name="withoutVmSearchOption">
<short>10</short>
</property>
<property name="withVMSearchOption">
- <short>21</short>
+ <short>20</short>
</property>
<property name="win32InstallerLauncherType">
<short>90</short>
<boolean>true</boolean>
</property>
<property name="credentialInformation">
- <object class="com.flexera.ia.vapp.datastructures.VMWareCredentialInformationImpl" objectID="27759feba050">
+ <object class="com.flexera.ia.vapp.datastructures.VMWareCredentialInformationImpl" objectID="1f4abcab8706">
<property name="hostName">
<string><![CDATA[]]></string>
</property>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.installer.options.valid.vm.list]]></string>
- <string><![CDATA[1.6,1.7,1.8+]]></string>
+ <string><![CDATA[1.7+]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.project.build.last.date]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.project.save.last.date]]></string>
- <string><![CDATA[01 November 2013 13:57:31 o'clock GMT]]></string>
+ <string><![CDATA[02 December 2014 16:16:01 o'clock GMT]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.build.options.optimization.platform.cdrom]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.installer.options.platform.macosx.vm.version]]></string>
- <string><![CDATA[1.6+]]></string>
+ <string><![CDATA[1.7+]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.build.platform.java.novm]]></string>
<int>8</int>
</property>
<property name="revision">
- <int>0</int>
+ <int>2</int>
</property>
<property name="subRevision">
<int>0</int>
</property>
</object>
</property>
+ <property name="upgradeCode">
+ <object class="com.zerog.registry.UUID">
+ <method name="update">
+ <string><![CDATA[fe7d6410-1ed5-11b2-a662-f4777f28dbfc]]></string>
+ </method>
+ </object>
+ </property>
<property name="supportURL">
<string><![CDATA[http://www.jalview.org/faq]]></string>
</property>
<string><![CDATA[jalview-discuss@jalview.org]]></string>
</property>
<property name="copyright">
- <string><![CDATA[2013]]></string>
+ <string><![CDATA[2014]]></string>
</property>
<property name="license">
<string><![CDATA[Commercial]]></string>
<property name="oldStyleInstallersEnabled">
<boolean>false</boolean>
</property>
+ <property name="upgradeSettings">
+ <object class="com.zerog.ia.installer.UpgradeSettings" objectID="1b941ce786e7">
+ <property name="enableUpgrade">
+ <boolean>false</boolean>
+ </property>
+ <property name="upgradeConfigurationsList">
+ <object class="java.util.ArrayList" list="true">
+ <method name="add">
+ <object class="com.zerog.ia.installer.UpgradeConfiguration" objectID="1b941ce886e7">
+ <property name="detectionBasedOn">
+ <string><![CDATA[PRODUCT_CODE]]></string>
+ </property>
+ <property name="requireValidationForPreviousProductCode">
+ <boolean>false</boolean>
+ </property>
+ <property name="maxVersion">
+ <object class="com.zerog.ia.installer.util.Version" objectID="1b941cea86e7">
+ <property name="major">
+ <int>1</int>
+ </property>
+ <property name="minor">
+ <int>0</int>
+ </property>
+ <property name="revision">
+ <int>0</int>
+ </property>
+ <property name="subRevision">
+ <int>0</int>
+ </property>
+ </object>
+ </property>
+ <property name="minVersion">
+ <object class="com.zerog.ia.installer.util.Version" objectID="1b941ce886e8">
+ <property name="major">
+ <int>1</int>
+ </property>
+ <property name="minor">
+ <int>0</int>
+ </property>
+ <property name="revision">
+ <int>0</int>
+ </property>
+ <property name="subRevision">
+ <int>0</int>
+ </property>
+ </object>
+ </property>
+ <property name="configurationName">
+ <string><![CDATA[Default Upgrade Configuration]]></string>
+ </property>
+ </object>
+ </method>
+ </object>
+ </property>
+ <property name="abortInstallationIfUninstallFails">
+ <boolean>true</boolean>
+ </property>
+ <property name="automaticallyRemoveAllExistingInstallations">
+ <boolean>true</boolean>
+ </property>
+ <property name="promptUserOnExistanceOfMultiplePreviousInstallations">
+ <boolean>false</boolean>
+ </property>
+ <property name="allowCustomizationOfUserInstallDirectory">
+ <boolean>false</boolean>
+ </property>
+ <property name="retainFeaturePreferences">
+ <boolean>false</boolean>
+ </property>
+ </object>
+ </property>
+ <property name="tomcatServerNamesList">
+ <object class="java.util.ArrayList" list="true"/>
+ </property>
<visualChildren>
<object class="com.zerog.ia.installer.InstallSet" objectID="fe7d6493a66a">
<property name="belongsToUninstallPhase">
<object refID="24485f8aa671"/>
<object refID="24485f89a672"/>
<object refID="24485f8aa672"/>
+
<object refID="244fff00ffff"/>
- <object refID="244ffffaa672"/>
- <object refID="244f00faa672"/>
+ <object refID="244ffffaa672"/>
+ <object refID="244f00faa672"/>
+
<object refID="24485f8ba672"/>
<object refID="24485f8aa673"/>
<object refID="24485f8ba673"/>
<object refID="f44ca391ab9f"/>
<object refID="f44ca392ab9f"/>
<object refID="f44ca393ab9f"/>
- <object refID=""1f46cffffab93"/>
+ <object refID="f46c2f42ab93"/>
+ <object refID="1f46cffffab93"/>
+ <object refID="1f46efeefab93"/>
<object class="com.zerog.ia.installer.actions.InstallFile" objectID="f44fc5b2aba1">
<property name="belongsToUninstallPhase">
<boolean>false</boolean>
<int>0</int>
</property>
</object>
- <object refID="f46c2f42ab93"/>
<object class="com.zerog.ia.installer.actions.InstallDirectory" objectID="24485f85a670">
<property name="belongsToUninstallPhase">
<boolean>false</boolean>
<object refID="24485f89a672"/>
<object refID="24485f8aa672"/>
<object refID="244fff00ffff"/>
- <object refID="244ffffaa672"/>
- <object refID="244f00faa672"/>
+ <object refID="244ffffaa672"/>
+ <object refID="244f00faa672"/>
<object refID="24485f8ba672"/>
<object refID="24485f8aa673"/>
<object refID="24485f8ba673"/>
<object refID="f44ca393ab9f"/>
<object refID="f46c2f42ab93"/>
<object refID="1f46cffffab93"/>
+ <object refID="1f46efeefab93"/>
</visualChildren>
</object>
<object class="com.zerog.ia.installer.actions.InstallDirectory" objectID="f44fc5d5aba1">