/utils/install4j/jalview-installers-*.install4j
*.swp
/bin
+/doc/building.html
import org.apache.tools.ant.filters.ReplaceTokens
//import org.apache.tools.ant.filters.ReplaceRegexp
import org.gradle.internal.os.OperatingSystem
+import org.gradle.plugins.ide.eclipse.model.*
+
+
+import groovy.transform.ExternalizeMethods
buildscript {
dependencies {
ext {
// where the getdown channel will be built.
- // TODO: consider allowing this expression to be overrriden by -P arg
- getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION + '/'
+ // TODO: consider allowing this expression to be overridden by -P arg
+ getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION
getdownAppDir = getdownWebsiteDir + '/' + getdown_app_dir
- getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
+ //getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir
getdownLauncher = jalviewDir + '/' + getdown_launcher
getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
- def getdownChannel = getdown_channel_name
- if (getdown_channel_name.equals("COMMIT")) {
- getdownChannel = getGitHash()
- }
- getdown_app_base = getdown_channel_base+"/"+getdownChannel+"/"+JAVA_VERSION+"/"
+ getdown_app_base = getdown_channel_base+"/"+getdown_channel_name+"/"+JAVA_VERSION+"/"
modules_compileClasspath = fileTree(dir: "$jalviewDir/$j11modDir", include: ["*.jar"])
modules_runtimeClasspath = modules_compileClasspath
+ gitHash = ""
+ gitBranch = ""
}
def JAVA_INTEGER_VERSION
def getdown_alt_java_min_version
// this property is assigned below and expanded to multiple lines in the getdown task
def getdown_alt_multi_java_location
+// this property is for the Java library used in eclipse
+def eclipse_java_runtime_name
if (JAVA_VERSION.equals("1.8")) {
JAVA_INTEGER_VERSION = "8"
+ //libDir = j8libDir
libDir = j11libDir
libDistDir = j8libDir
compile_source_compatibility = 1.8
compile_target_compatibility = 1.8
getdown_alt_java_min_version = getdown_alt_java8_min_version
getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
+ eclipse_java_runtime_name = "JavaSE-1.8"
} else if (JAVA_VERSION.equals("11")) {
JAVA_INTEGER_VERSION = "11"
libDir = j11libDir
compile_target_compatibility = 11
getdown_alt_java_min_version = getdown_alt_java11_min_version
getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
+ eclipse_java_runtime_name = "JavaSE-11"
additional_compiler_args += [
'--module-path', ext.modules_compileClasspath.asPath,
'--add-modules', j11modules
resources {
srcDirs "$jalviewDir/$resourceDir"
- srcDirs "$jalviewDir/$libDistDir"
}
jar.destinationDir = file("$jalviewDir/$packageDir")
} else {
compileClasspath += files(sourceSets.main.java.outputDir)
}
- compileClasspath += sourceSets.main.compileClasspath
- compileClasspath += files( sourceSets.main.resources.srcDirs)
+
compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
removeThese += it
}
}
- containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
minusConfigurations += removeThese
plusConfigurations = [ ]
}
}
cp.entries.removeAll(removeTheseToo)
- }
-
- withXml {
- def node = it.asNode()
- def srcTestAttributes
- node.children().each{ cpe ->
- def attributes = cpe.attributes()
- if (attributes.get("kind") == "src" && attributes.get("path") == "test") {
- srcTestAttributes = cpe.find { a -> a.name() == "attributes" }
- return
- }
- }
- def addTestAttribute = true
- srcTestAttributes.each{a ->
- if (a.name() == "attribute" && a.attributes().getAt("name") == "test") {
- addTestAttribute = false
- }
- }
- if (addTestAttribute) {
- srcTestAttributes.append(new Node(null, "attribute", [name:"test", value:"true"]))
- }
-
- node.appendNode('classpathentry', [kind:"output", path:"bin/main"])
- node.appendNode('classpathentry', [kind:"lib", path:helpParentDir])
- node.appendNode('classpathentry', [kind:"lib", path:resourceDir])
+
+ print ("CP="+cp.inspect())
+
+ cp.entries += new Output("bin/main")
+ cp.entries += new Library(fileReference(helpParentDir))
+ cp.entries += new Library(fileReference(resourceDir))
+
HashMap<String, Boolean> addedLibPath = new HashMap<>();
- def allPaths = sourceSets.test.compileClasspath + sourceSets.main.compileClasspath
- sourceSets.main.compileClasspath.each{
- //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
- //no longer want to add outputDir as eclipse is using its own output dir in bin/main
+
+ // changing from sourcesets.main.classpath to specific Java version lib
+ //sourceSets.main.compileClasspath.each{
+ fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").each {
+ //don't want to add outputDir as eclipse is using its own output dir in bin/main
if (it.isDirectory() || ! it.exists()) {
// don't add dirs to classpath
- //println("Not adding directory "+it)
return
}
def itPath = it.toString()
//println("Not adding duplicate entry "+itPath)
} else {
//println("Adding entry "+itPath)
- node.appendNode('classpathentry', [kind:"lib", path:itPath])
+ cp.entries += new Library(fileReference(itPath))
addedLibPath.put(itPath, true)
}
}
- sourceSets.test.compileClasspath.each{
+
+ // changing from sourcesets.main.classpath to specific Java version lib
+ //sourceSets.test.compileClasspath.each{
+ fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"]).each {
//if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
//no longer want to add outputDir as eclipse is using its own output dir in bin/main
if (it.isDirectory() || ! it.exists()) {
// don't add dirs to classpath
- //println("Not adding directory "+it)
- return
+ return false // groovy "break" in .each loop
}
def itPath = it.toString()
if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
}
if (addedLibPath.get(itPath)) {
- //println("Not adding duplicate entry "+itPath)
+ // don't duplicate
} else {
- //println("Adding entry "+itPath)
- node.appendNode('classpathentry', [kind:"lib", path:itPath])
- .appendNode('attributes')
- .appendNode('attribute', [name:"test", value:"true"])
+ def lib = new Library(fileReference(itPath))
+ // this doesn't work... yet. Adding test=true attribute using withXml below
+ //def attrs = new Node(null, 'attributes', ["test":"true"])
+ //lib.appendNode(attrs) //
+ cp.entries += lib
addedLibPath.put(itPath, true)
}
}
- }
+ }
- }
- }
+ // withXml changes ignored by buildship, these add the "test=true" attribute
+ withXml {
+ def node = it.asNode()
+
+ def srcTestAttributes
+ node.children().each{ cpe ->
+ def attributes = cpe.attributes()
+ if (attributes.get("kind") == "src" && attributes.get("path") == "test") {
+ srcTestAttributes = cpe.find { a -> a.name() == "attributes" }
+ return
+ }
+ }
+ def addTestAttribute = true
+ srcTestAttributes.each{a ->
+ if (a.name() == "attribute" && a.attributes().getAt("name") == "test") {
+ addTestAttribute = false
+ }
+ }
+ if (addTestAttribute) {
+ srcTestAttributes.append(new Node(null, "attribute", [name:"test", value:"true"]))
+ }
+
+ node.children().each{ cpe ->
+ def attributes = cpe.attributes()
+ if (attributes.get("kind") == "lib" && attributes.get("path").startsWith("utils/")) {
+ cpe.appendNode('attributes')
+ .appendNode('attribute', [name:"test", value:"true"])
+ }
+ }
+ } // withXML
+ } // file
+
+ containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
+ } // classpath
jdt {
// for the IDE, use java 11 compatibility
- sourceCompatibility = 11
- targetCompatibility = 11
- javaRuntimeName = "JavaSE-11"
+ sourceCompatibility = compile_source_compatibility
+ targetCompatibility = compile_target_compatibility
+ javaRuntimeName = eclipse_java_runtime_name
file {
withProperties { props ->
def jalview_prefs = new Properties()
- def ins = new FileInputStream(eclipse_extra_jdt_prefs_file)
+ def ins = new FileInputStream(jalviewDirAbsolutePath+"/"+eclipse_extra_jdt_prefs_file)
jalview_prefs.load(ins)
ins.close()
jalview_prefs.forEach { t, v ->
}
}
}
-
-}
+
+ //synchronizationTasks eclipseClasspath
+ //autoBuildTasks eclipseClasspath
+}
task cloverInstr() {
// only instrument source, we build test classes as normal
com.atlassian.clover.CloverInstr.mainImpl(args)
}
}
-
+
task cloverReport {
group = "Verification"
delete cloverInstrDir
}
+// format is a string like date.format("dd MMMM yyyy")
def getDate(format) {
def date = new Date()
- //return date.format("dd MMMM yyyy")
return date.format(format)
}
-def getGitHash() {
- def stdout = new ByteArrayOutputStream()
+task setGitVals {
+ def hashStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
- standardOutput = stdout
- workingDir = jalviewDir
+ standardOutput = hashStdOut
+ ignoreExitValue true
}
- return stdout.toString().trim()
-}
-def getGitBranch() {
- def stdout = new ByteArrayOutputStream()
+ def branchStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
- standardOutput = stdout
- workingDir = jalviewDir
+ standardOutput = branchStdOut
+ ignoreExitValue true
}
- return stdout.toString().trim()
+
+ project.ext.gitHash = hashStdOut.toString().trim()
+ project.ext.gitBranch = branchStdOut.toString().trim()
+
+ outputs.upToDateWhen { false }
}
task createBuildProperties(type: WriteProperties) {
+ dependsOn setGitVals
inputs.dir("$jalviewDir/$sourceDir")
+ inputs.dir("$classes")
inputs.dir("$jalviewDir/$resourceDir")
outputFile "$classes/$buildPropertiesFile"
- /* taking time/date specific comment out to allow better incremental builds */
- //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
- comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
- property "BUILD_DATE", getDate("dd MMMM yyyy")
+ // taking time specific comment out to allow better incremental builds
+ comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
+ //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
+ property "BUILD_DATE", getDate("HH:mm:ss dd MMMM yyyy")
property "VERSION", JALVIEW_VERSION
- property "INSTALLATION", INSTALLATION+" git-commit:"+getGitHash()+" ["+getGitBranch()+"]"
+ property "INSTALLATION", INSTALLATION+" git-commit:"+project.ext.gitHash+" ["+project.ext.gitBranch+"]"
outputs.file(outputFile)
- outputs.dir("$classes")
+}
+
+def buildingHTML = "$jalviewDir/$docDir/building.html"
+task deleteBuildingHTML(type: Delete) {
+ delete buildingHTML
+}
+
+task convertBuildingMD(type: Exec) {
+ dependsOn deleteBuildingHTML
+ def buildingMD = "$jalviewDir/$docDir/building.md"
+ def css = "$jalviewDir/$docDir/github.css"
+
+ def pandoc = null
+ pandoc_exec.split(",").each {
+ if (file(it.trim()).exists()) {
+ pandoc = it.trim()
+ return true
+ }
+ }
+
+ def hostname = "hostname".execute().text.trim()
+ if ((pandoc == null || ! file(pandoc).exists()) && hostname.equals("jv-bamboo")) {
+ pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
+ }
+
+ if (pandoc != null && file(pandoc).exists()) {
+ commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
+ } else {
+ commandLine "true"
+ }
+
+ ignoreExitValue true
+
+ inputs.file(buildingMD)
+ inputs.file(css)
+ outputs.file(buildingHTML)
+}
+clean {
+ delete buildingHTML
}
task syncDocs(type: Sync) {
+ dependsOn convertBuildingMD
def syncDir = "$classes/$docDir"
from fileTree("$jalviewDir/$docDir")
into syncDir
destinationDir = file("$jalviewDir/$utilsDir")
source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"])
+ inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java")
+ inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java")
outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class")
outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class")
}
workingDir = jalviewDir
def help = "$classes/$helpDir"
args = [ "$classes/$helpDir", "-nointernet" ]
- //args = [ "$classesDir/$helpDir", "-nointernet" ]
doFirst {
helplinkscheckeroutputfile.createNewFile()
}
shadowJar {
+ group = "distribution"
dependsOn makeDist
from ("$jalviewDir/$libDistDir") {
include("*.jar")
props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
if (getdown_local == "true") {
- getdown_app_base = "file://"+file(getdownWebsiteDir).getAbsolutePath()
+ getdown_app_base = file(getdownWebsiteDir).toURI().toString()
}
props.put("getdown_txt_appbase", getdown_app_base)
props.each{ prop, val ->
+++ /dev/null
-<html>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ 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>Building Jalview from Source</title>
-</head>
-<body>
-<h1>Building Jalview from Source</h1>
-<p/>
-
-<p>
-You will need the following:<br/>
-<ul>
- <li> Obtain: git</li>
- <li> Build/run: Java Development Kit (JDK). JDK11 is now the recommended platform for developing with Jalview. You can obtain a pre-compiled JDK11 for many platforms from https://adoptopenjdk.net/</li>
- <li> Build: Gradle 5.1 or later. On linux you can obtain this with your package manager (e.g. <code>sudo yum install gradle</code> or <code>sudo apt install gradle</code> or on macOS with brew with <code>brew install gradle</code></li>
-</ul>
-With any luck, once you check out the Jalview source from git and set your JAVA_HOME and PATH correctly, you just need to change to the <code>jalview</code> directory and run <code>gradle getdown</code>.
-</p>
-
-<h2>Obtaining Jalview</h2>
-<p>This is easiest achieved with git:
-<pre>git clone http://www.jalview.org/git/jalview.git</pre>
-Then you can <code>cd jalview</code> to get into the top level jalview dir.
-
-
-<p>
-<h2>Minimal Jalview build</h2>
-<p>To run Jalview, you just need the jalview classes and the .jar libraries that Jalview depends on.</p>
-
-
-<!--
-<p>
-You will need the following (hopefully):<br>
-<ul>
-<li>Java development kit (JDK1.8 is now the recommended platform for developing with Jalview.</li>
-<li>Ant (1.7 or later will be needed for some of the jarsigning tools).</li>
-</ul>
-With any luck, after setting your paths and JAVA_HOME correctly, you
-just need to change to the Jalview directory and run ant (this works
-from eclipse too, but NetBeans is a bit trickier).
-<pre>
- ant
-</pre>
-
-</p>
-<p><strong>Building a webstart version of jalview</strong></p>
-Jalview depends on several libraries contained in the libs directory
-of the distribution. In order to access them, they must all be signed
-jars - using the same jarsigner key as jalview itself. There is a
-build target in ant to make the signed jar files in a directory called
-dist. But first you need to make your own key:
-<p><strong>Making your own key</strong></p>
-
- <p>The ant 'makefulldist' target assumes that a keystore exists in
- a directory 'keys'. To make a key accessible using the default
- settings in the build.xml file then make the keys directory and add
- the jarsigner key with the following :</p>
- <pre>mkdir keys</pre>
- <pre>keytool -genkey -keystore keys/.keystore -keypass alignmentisfun
- -storepass alignmentisfun -sigalg SHA1withRSA -keyalg RSA -alias jalview</pre>
- <em>(you will have to answer some personal questions here)</em>
- <pre>ant makedist -DWebStartLocation="file://.pathtojalviewsource./dist" -Dapplication.codebase="*"</pre>
- <p>This should eventually generate a jalview.jnlp file in ./dist
- along with a set of signed jars using the jalview key). In order to
- test locally via webstart you'll now need to add 'file:/' to your
- java webstart security exception list. Then:</p>
- <pre>javaws file://.pathtojalviewsource./dist/jalview.jnlp</pre>
- <p>Please remember to remove that entry afterwards, since it will leave
- your system vulnerable to malicious code.
- </p>
- <p>
- <strong>Building the JalviewLite applet<br>
- </strong> The JalviewLite applet is compiled using a subset of the packages in
- the src directory (specifically: MCView, and jalview.{datamodel,
- analysis, appletgui, utils, schemes, api, structure}, and
- com.stevesoft.*). Once compiled, these class files are obfuscated to
- make the code run efficiently. To compile the applet Jar, use the
- makeApplet task - optionally passing in a 'donotobfuscate' property to
- the ant build (e.g. -Ddonotobfuscate=true) to disable obfuscation. </p><p>
- The ant target 'pubapplet' can be used to compile install the
- jalviewApplet.jar and any dependent jars (under appletlib) into a copy
- of the examples directory created under the <em>outputDir</em> build
- property (which defaults to the 'dist' directory).
- </p>
- <p>
-<h1>using IDEs to build Jalview</h1>
- <p>The Jalview source distribution includes project definitions for
- Eclipse, Netbeans and some rather ancient Borland JBuilder .jpx
- project files. These files should be sufficient to set up basic source
- folders and build paths, but you will need to ensure that all .jar
- files in the lib and appletlib directories are added to the build path
- for your IDE project, and that the 'buildindices' target in Jalview's
- build.xml is executed with the 'outputDir' ant property set to the
- directory where the IDE expects to place compiled classes ('classes'
- directory for eclipse, 'build/classes' for netbeans).</p>
- <p>Note: It is generally not recommended that you distribute build
- artefacts that were generated automatically via an IDE's own packaging
- mechanism (e.g. Netbeans' executable Jar and dependent lib directory).
- The hand-crafted ant build.xml is (currently) the only officially
- supported method of building distributable versions of Jalview.</p>
- -->
-<address>
-<a href="mailto:help@jalview.org">Jalview development team</a>
-</address>
-</body>
-</html>
--- /dev/null
+# Building Jalview from Source
+
+## tl;dr
+
+```
+# download
+git clone http://source.jalview.org/git/jalview.git
+# compile
+cd jalview
+gradle shadowJar
+# run
+java -jar build/libs/jalview-all-11.jar
+
+# and/or create launcher
+gradle getdown
+# use launcher
+cd getdown/files
+java -jar getdown-launcher.jar . jalview
+```
+
+
+## Setting up
+
+The method here is described in terms of using a command line. You can easily do this on linux or in a Terminal window in macOS. You can do it in Windows.
+
+* Java 11 compliant JDK
+* gradle 5.1 or above
+* git
+
+> The versions and installation methods here are just suggestions (which we have tested
+so are known to work). If you need or wish to use different implementations (particularly
+you might need a bespoke JDK if you are on an exotic architecture) then the general
+build instructions should work with any gradle 5+. You should be able to compile the
+bytecode with any JDK Java 11+. The resulting bytecode (in particular the shadow jar)
+should be runnable in any JRE Java 1.8+. Remember that because Jalview and the getdown launcher
+are Java bytecode you can build on one system where you might have gradle, and run
+on another where you don't (JRE 1.8+ required).
+
+### Java 11 compliant JDK
+
+#### All platforms
+We recommend obtaining an OpenJDK JDK 11 (since 11 is the long term support release) from AdoptOpenJDK: <https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot>, either the *Installer* or `.zip`/`.tar.gz` variants whichever you prefer (if you're not sure, choose the *Installer*).
+
+>##### Alternative/CLI install of AdoptOpenJDK 11
+>
+>You can also install adoptopenjdk11 using either `brew` (macOS), `choco` (Windows)
+(see the section on `gradle` and `git` for more informaiton on `brew` and `choco`)
+or `yum` or `apt` (Linux):
+>
+>###### alternative for MacOS and Homebrew
+>```
+>brew tap adoptopenjdk/openjdk
+>brew cask install adoptopenjdk11
+>```
+>
+>###### alternative for Windows and Chocolatey
+>```
+>choco install adoptopenjdk11
+>```
+>
+>###### alternative for Linux with yum/apt
+>
+>see <https://adoptopenjdk.net/installation.html#linux-pkg>
+
+
+### gradle and git
+You should be able to install the latest (or sufficiently recent) versions of gradle and git using your OS package manager.
+
+#### MacOS
+we recommend using `brew`, which can be installed following the instructions at <https://brew.sh/>.
+After installing `brew`, open a Terminal window and type in (using an Administrator privileged user):
+
+```bash
+brew install gradle git
+```
+
+or if you aready have them installed but need to upgrade the version:
+
+```bash
+brew upgrade gradle git
+```
+
+#### Windows
+
+we suggest using the **Chocolatey** package manager. See install instructions at <https://chocolatey.org/>, and you will just need
+
+```bash
+choco install gradle
+choco install git
+```
+
+Alternatively, you could install a real `bash` shell and install both `gradle` and `git` through `apt-get`.
+See <https://devblogs.microsoft.com/commandline/bash-on-ubuntu-on-windows-download-now-3/>
+for how to install the ubuntu bash shell in Windows 10.
+
+Another alternative would be to install them separately. For `gradle` follow the instructions at <https://gradle.org/install/>, and for `git` here are a couple of suggestions: Git for Windows <https://gitforwindows.org/>.
+Getting the individual installs working together on the command line will be trickier
+so we recommend using Chocolatey or bash.
+
+
+#### Linux
+this will depend on which distribution you're using.
+
+##### For *Debian* based distributions (e.g. Mint, Ubuntu, Debian)
+run
+
+```bash
+ sudo apt-get install gradle git
+```
+
+##### for RPM-based distributions (e.g. Fedora, CentOS, RedHat)
+run
+
+```bash
+sudo yum install gradle git
+```
+
+If you have some other version of linux you'll probably be able to work it out!
+
+
+
+
+## Downloading the Jalview source tree
+
+This can be done with `git`.
+On the command line, change directory to where you want to download Jalview's build-tree
+top level directory. Then run
+
+```bash
+git clone http://source.jalview.org/git/jalview.git
+```
+
+You'll get some progress output and after a minute or two you should have the full
+Jalview build-tree in the folder `jalview`.
+
+### What's in the source tree?
+
+Jalview is a mature product with its codebase going back many years. As such it doesn't
+have a folder structure that most new gradle projects would have, so you might not
+find everything in the place you might expect. Here's a brief description of what
+you might find in the main folders under the `jalview` tree.
+
+Within the `jalview` folder you will find (of possible interest):
+
+ dir/ or file | contains
+---------------------|----------------------------------------------------------------------------------------------------------------
+ `bin/` | used by eclipse for compiled classes -- no need to touch this
+ `build/` | the gradle build dir
+ `classes/` | contains the compiled Java classes for the Jalview application
+ `dist/` | assembled `.jar` files needed to run Jalview application
+ `examples/` | example input files usable by Jalview
+ `getdown/` | the libraries used by the Javliew launcher (getdown)
+ `getdown/src/` | our modified source for `getdown`
+ `getdown/website/` | the assembled "download" folder used by getdown for downloads/upgrades
+ `getdown/files/` | the minimal fileset to launch the Jalview launcher, which can then download the rest of the Jalview application
+ `help/` | the help documents
+ `j8lib/` | libraries needed to run Jalview under Java 1.8
+ `j11lib/` | libraries needed to run Jalivew under Java 11
+ `resource/` | non-java resources used in the Jalview application
+ `src/` | the Jalview application source `.java` files
+ `test/` | Test class source files
+ `utils/` | helper applications used in the build process
+ `utils/install4j/` | files used by the packaging tool, install4j
+ `build.gradle` | the build file used by gradle
+ `gradle.properties` | configurable properties for the build process
+
+Note that you need a Java 11 JDK to compile Jalview whether your target build is Java 1.8 or Java 11.
+
+
+## Building Jalview
+
+You will need to have the Java 11 `javac` in your path, or alternatively you can configure
+gradle to know where this is by putting
+
+```
+org.gradle.java.home=/path_to_jdk_directory
+```
+in the `gradle.properties` file.
+
+> *You may want to see some of the other properties you can change at the end of this document.*
+
+### Minimal Jalview Build
+
+To compile the necessary class files, just run
+
+```bash
+gradle compileJava
+```
+to compile the classes into the `classes` folder.
+You should now be able to run the Jalview application directly with
+
+```bash
+java -cp "classes:resources:help:j11lib/*" jalview.bin.Jalview
+```
+
+You can also run with an automatic large memory setting (which will set the maximum
+memory heap of the Jalview JVM to 90% of your local physical memory) and docked icon setting
+(if possible in your OS) with
+
+```bash
+java -cp "classes:resources:help:j11lib/*" jalview.bin.Launcher
+```
+
+>*You must use just "`j11lib/*`" and not "`j11lib/*.jar`" as this is a special Java
+classpath argument wildcard interpreted by `java`, **not** a shell expansion wildcard interpreted
+by the shell.*
+
+Note that `jalview.bin.Launcher` is a simplified launcher class that re-launches `jalview.bin.Jalview`
+with the same JRE (*not* the same JVM instance), classpath and arguments, but with an automatically determined `-Xmx...`
+memory setting if one hasn't been provided.
+
+### Jalview in a Jar File
+
+To package the `classes`, `resources`, and `help` into one jar, you can run
+
+```bash
+gradle jar
+```
+which assembles the Jalview classes and resources into `dist/jalview.jar`
+
+To run this, use
+
+```bash
+java -cp "dist/jalview.jar:j11lib/*" jalview.bin.Jalview
+```
+
+### Distributed Jar Files
+
+To simplify this, all required `.jar` files can be assembled into the `dist` folder
+using
+
+```bash
+gradle makeDist
+```
+which puts all required jar files into `dist` so you can run with
+
+```bash
+java -cp "dist/*" jalview.bin.Jalview
+```
+
+### Single *shadow* Jar File
+
+The shadow jar file is a single `.jar` that contains all required classes and resources from `jalview.jar`
+and all of the supporting libraries in `j11lib/*.jar` merged into one `.jar` archive
+file. A default launching class (`MAIN-CLASS: jalview.bin.Launcher`) is specified in the `.jar`
+manifest file (`META/MANIFEST.MF`) so a start class doesn't need to be specified.
+
+Build the shadow jar file in `build/lib/jalview-all-11.jar` with
+
+```bash
+gradle shadowJar
+```
+and run it with
+
+```bash
+java -jar build/lib/jalview-all-11.jar
+```
+
+Because no arguments are required, most OSes will associate a `.jar` file with the
+`java` application (if this has been installed through the OS and not just a local
+unzip) as a `-jar` argument so you may find you can launch `jalview-all-11.jar`
+just by double-clicking on it)!
+
+> The `shadowJar` task is not a requirement for any other task, so to build the shadow
+jar file you must specify the `shadowJar` task.
+
+> The shadow jar file represents probably the simplest way to distribute the Jalview application to machines that already have a Java 11 installed,
+although without the many and compelling benefits of the `getdown` launcher.
+
+
+### Building the `getdown` launcher
+
+We have made significant customisations to the `getdown` launcher which you can find
+in `getdown/src/getdown`.
+
+> You don't need to build this afresh as the required `gradle-core.jar`
+and `gradle-launcher.jar` files are already distributed in `j11lib` and `getdown/lib` but if you want to, then
+you'll need a working Maven and also a Java 8 JDK. Ensure the Java 8 `javac` is forefront
+in your path and do
+>
+>```bash
+>cd getdown/src/getdown
+>mvn clean package -Dgetdown.host.whitelist="jalview.org,*.jalview.org"
+>```
+> and you will find the required `.jar` files in `core/target/gradle-core-XXX.jar`
+and `launcher/target/gradle-launcher-XXX.jar`. The `gradle-core.jar` should then be copied
+to all three of the `j8lib`, `j11lib` and `getdown/lib` folders, whilst the `gradle-launcher.jar` only
+needs to be copied to `getdown/lib`.
+>
+>The `mvn` command should ideally include the `-Dgetdown.host.whitelist=*.jalview.org` setting.
+ This, and the necessary file copying commands, can be found in `getdown/src/getdown/mvn_cmd`.
+
+To assemble Jalview with `getdown` use the following gradle task:
+
+```bash
+gradle getdown
+```
+
+This puts all the necessary files to launch Jalview with `getdown`
+into `getdown/website/11/`. This could be treated as the reference folder
+for `getdown`, which is where a getdown launcher will check to see if the Jalview application
+files it has are up to date, and download if they aren't or it simply doesn't have
+them.
+
+A minimal getdown-launcher can be found in `getdown/files/11/` which checks its up-to-date
+status with (the absolute path to) `getdown/website/11/`.
+
+This can be launched with
+
+```bash
+java -jar getdown/files/11/getdown-launcher.jar getdown/files/11/ jalview
+```
+
+> We've already met the `-jar file.jar` arguments. The next argument is the working folder for
+getdown, and the final argument, "`jalview`", is a getdown application id (only "`jalview`"
+is defined here).
+
+
+### Running tests
+
+There are substantial tests written for Jalview that use TestNG, which you can run with
+
+```bash
+gradle test
+```
+
+These normally take around 5 - 10 minutes to complete and outputs its full results into
+the `tests/` folder. A summary of results should appear in your console.
+
+
+### Installer packaging with *install4j*
+
+Jalview is currently using *install4j* <https://www.ej-technologies.com/products/install4j/overview.html>
+as its installer packaging tool.
+
+If you have a licensed installation of *install4j* you can build Jalview installers
+by running
+
+```bash
+gradle installers
+```
+
+though you may need to fiddle with the `install4j` and `copyInstall4jTemplate` tasks
+in `build.gradle` file to point to your installation of *install4j* and also to bundled
+JREs if you want to bundle those into the installers.
+
+If you want more details, get in touch on our development mailing list <jalview-dev@jalview.org>.
+Sign up at <http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev>.
+
+
+## Building in Eclipse
+
+We develop in Eclipse, and support settings to develop and save Jalview source code
+in our preferred style. We also support running the Jalview application, debugging
+and running tests with TestNG from within Eclipse.
+
+To get Jalview set up as a project in Eclipse, we recommend using at least the 2019-03
+version of Eclipse IDE for Java Developers which you can download from the Eclipse
+website: <https://www.eclipse.org/downloads/>
+
+Once installed, we also recommend installing several plugins from the Eclipse Marketplace.
+
+To do so, launch Eclipse, and go to Help->Eclipse Marketplace...
+
+Search for and install:
+
+1. Buildship Gradle Integration 3.0 (or greater)
+1. Groovy Development Tools 3.4.0 (or greater)
+1. TestNG for Eclipse (optional -- only needed if you want to run tests from Eclipse)
+
+> At time of writing, TestNG for Eclipse does not show up in the Eclipse Marketplace
+as the latest released version does not install in Eclipse 2019-03.
+However, you can install a working beta of TestNG for Eclipse by going to
+>
+Help->Install New Software...
+>
+and entering
+>
+`TestNG Eclipse Composite P2 Repo - http://beust.com/eclipse-beta`
+>
+into the *Work with* box and click on the *Add...* button.
+>
+Eclipse might pause for a bit with the word *Pending* in the table below at this point, but it will eventually list TestNG with
+a selection box under the *Name* column.
+>
+Select *TestNG* and carry on through the
+install process to install the TestNG plugin.
+
+After installing the plugins, it is a good to get Java 11 set up in Eclipse as the default JRE.
+
+To do this go to Preferences (Eclipse->Preferences in macOS, File->Preferences
+on Windows or Window->Preferences on Linux) and find
+
+Java -> Installed JREs
+
+If your Java 11 installation is not listed, click on
+
+*Add* -> Standard VM -> *Next*
+
+and enter the JRE home. You can browse to where it was installed. Give it a name (like "AdoptOpenJDK 11"). Select this JDK
+as the default JRE and click on *Apply and Close*.
+
+
+You can now import Jalview. It is important to import
+Jalview as a Gradle project (not as a Java project), so go to
+
+File->Import...
+
+find and select
+
+Gradle->Existing Gradle Project
+
+and then click on the *Next >* button.
+
+In the following options, it is the *Project Root Directory* you should set to be the
+`jalview` folder that git downloaded. Then you can click on the *Finish* button.
+
+
+## Gradle properties
+
+There are a lot of properties configured in `gradle.properties` which we strongly recommend
+being left as they are unless you have a specific problem with the build process.
+
+There are a few gradle properties you might want to set on the command line with the
+`-P` flag when building a version of Jalview with specific requirements:
+
+#### `JAVA_VERSION`
+This changes the *target* java bytecode version
+> NOTE that you will need to use a Java 11 (or greater) JDK Java compiler to build
+Jalview for any byte-code target version.
+
+Valid values are `11` and `1.8`.
+
+e.g.
+
+```bash
+gradle shadowJar -PJAVA_VERSION=1.8
+```
+
+When using `-PJAVA_VERSION=1.8` the libraries from `j8lib` (instead of `j11lib`) will be used in the compile
+and runtime classpath and also used in the `makeDist` build step. Where a Java version of `11` is used in folder and file names, it will
+instead use `1.8`. Also if you are building installer packages with *install4j* the
+package builder will look for JRE 1.8 bundles to package in the installers.
+
+> Note that continued development of Jalview will assume a Java 11+ runtime environment,
+the 2.11.0 release will run under a Java 1.8 JRE with a few minor features disabled.
+
+#### `CHANNEL`
+This changes the `appbase` setting in `getdown.txt` (`appbase` is where the getdown launcher
+looks to see if there's an updated file) to point to a particular Jalview
+channel. Expected values are `FILE`, `STABLE`, `DEVELOPMENT`, or a specific version
+of Jalview like `2.11` or `2.10.5`.
+
+A value of `FILE` behaves differently to the other expected values and will use a local
+file-system scheme URI instead of a Jalview release channel. This `file:` scheme URI
+uses an absolute path to the `getdown/website/<JAVA_VERSION>`
+
+On a regular development machine, this property will default to `LOCAL`.
+
+e.g.
+```bash
+gradle getdown -PCHANNEL=DEVELOPMENT
+```
+
+#### `MEDIA_TYPES`
+If you are building *install4j* installers (requires *install4j* to be installed) then this property specifies a comma-separated
+list of media types (i.e. platform specific installers) *install4j* should actually build.
+
+Currently the valid values are
+`linuxDeb`,
+`linuxRPM`,
+`macosArchive`,
+`unixArchive`,
+`unixInstaller`,
+`windows`
+
+The default value is all of them.
+
+e.g.
+```bash
+gradle installers -PJAVA_VERSION=1.8 -PMEDA_TYPE=macosArchive
+```
+
+To get an up-to-date list of possible values, you can run
+
+```bash
+perl -n -e 'm/^\s*<(\w+)[^>]*\bmediaFileName=/ && print "$1\n";' utils/install4j/install4j_template.install4j | sort -u
+```
+in the `jalview` root folder.
+
+
+---
+[Jalview Development Team](mailto:help@jalview.org)
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env bash
+pandoc -s -o building.html building.md --metadata pagetitle="Building Jalview from Source" --toc -H github.css
--- /dev/null
+<style>
+@font-face {
+ font-family: octicons-link;
+ src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');
+}
+
+body {
+ -webkit-text-size-adjust: 100%;
+ text-size-adjust: 100%;
+ color: #333;
+ font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+ font-size: 16px;
+ line-height: 1.6;
+ word-wrap: break-word;
+ width: 728px;
+ max-width: 99%;
+ box-sizing: border-box;
+ padding: 30px 30px 8rem 30px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+body a {
+ background-color: transparent;
+}
+
+body a:active,
+body a:hover {
+ outline: 0;
+}
+
+body strong {
+ font-weight: bold;
+}
+
+body h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+body img {
+ border: 0;
+}
+
+body hr {
+ box-sizing: content-box;
+ height: 0;
+}
+
+body pre {
+ overflow: auto;
+}
+
+body code,
+body kbd,
+body pre {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+body input {
+ color: inherit;
+ font: inherit;
+ margin: 0;
+}
+
+body html input[disabled] {
+ cursor: default;
+}
+
+body input {
+ line-height: normal;
+}
+
+body input[type="checkbox"] {
+ box-sizing: border-box;
+ padding: 0;
+}
+
+body table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+body td,
+body th {
+ padding: 0;
+}
+
+body * {
+ box-sizing: border-box;
+}
+
+body input {
+ font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+}
+
+body a {
+ color: #4078c0;
+ text-decoration: none;
+}
+
+body a:hover,
+body a:active {
+ text-decoration: underline;
+}
+
+body hr {
+ height: 0;
+ margin: 15px 0;
+ overflow: hidden;
+ background: transparent;
+ border: 0;
+ border-bottom: 1px solid #ddd;
+}
+
+body hr:before {
+ display: table;
+ content: "";
+}
+
+body hr:after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+body h1,
+body h2,
+body h3,
+body h4,
+body h5,
+body h6 {
+ margin-top: 15px;
+ margin-bottom: 15px;
+ line-height: 1.1;
+}
+
+body h1 {
+ font-size: 30px;
+}
+
+body h2 {
+ font-size: 21px;
+}
+
+body h3 {
+ font-size: 16px;
+}
+
+body h4 {
+ font-size: 14px;
+}
+
+body h5 {
+ font-size: 12px;
+}
+
+body h6 {
+ font-size: 11px;
+}
+
+body blockquote {
+ margin: 0;
+}
+
+body ul,
+body ol {
+ padding: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+body ol ol,
+body ul ol {
+ list-style-type: lower-roman;
+}
+
+body ul ul ol,
+body ul ol ol,
+body ol ul ol,
+body ol ol ol {
+ list-style-type: lower-alpha;
+}
+
+body dd {
+ margin-left: 0;
+}
+
+body code {
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ font-size: 12px;
+}
+
+body pre {
+ margin-top: 0;
+ margin-bottom: 0;
+ font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
+}
+
+body .select::-ms-expand {
+ opacity: 0;
+}
+
+body .octicon {
+ font: normal normal normal 16px/1 octicons-link;
+ display: inline-block;
+ text-decoration: none;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+body .octicon-link:before {
+ content: '\f05c';
+}
+
+body:before {
+ display: table;
+ content: "";
+}
+
+body:after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+body>*:first-child {
+ margin-top: 0 !important;
+}
+
+body>*:last-child {
+ margin-bottom: 0 !important;
+}
+
+body a:not([href]) {
+ color: inherit;
+ text-decoration: none;
+}
+
+body .anchor {
+ display: inline-block;
+ padding-right: 2px;
+ margin-left: -18px;
+}
+
+body .anchor:focus {
+ outline: none;
+}
+
+body h1,
+body h2,
+body h3,
+body h4,
+body h5,
+body h6 {
+ margin-top: 1em;
+ margin-bottom: 16px;
+ font-weight: bold;
+ line-height: 1.4;
+}
+
+body h1 .octicon-link,
+body h2 .octicon-link,
+body h3 .octicon-link,
+body h4 .octicon-link,
+body h5 .octicon-link,
+body h6 .octicon-link {
+ color: #000;
+ vertical-align: middle;
+ visibility: hidden;
+}
+
+body h1:hover .anchor,
+body h2:hover .anchor,
+body h3:hover .anchor,
+body h4:hover .anchor,
+body h5:hover .anchor,
+body h6:hover .anchor {
+ text-decoration: none;
+}
+
+body h1:hover .anchor .octicon-link,
+body h2:hover .anchor .octicon-link,
+body h3:hover .anchor .octicon-link,
+body h4:hover .anchor .octicon-link,
+body h5:hover .anchor .octicon-link,
+body h6:hover .anchor .octicon-link {
+ visibility: visible;
+}
+
+body h1 {
+ padding-bottom: 0.3em;
+ font-size: 1.75em;
+ line-height: 1.2;
+}
+
+body h1 .anchor {
+ line-height: 1;
+}
+
+body h2 {
+ padding-bottom: 0.3em;
+ font-size: 1.5em;
+ line-height: 1.225;
+}
+
+body h2 .anchor {
+ line-height: 1;
+}
+
+body h3 {
+ font-size: 1.25em;
+ line-height: 1.43;
+}
+
+body h3 .anchor {
+ line-height: 1.2;
+}
+
+body h4 {
+ font-size: 1em;
+}
+
+body h4 .anchor {
+ line-height: 1.2;
+}
+
+body h5 {
+ font-size: 1em;
+}
+
+body h5 .anchor {
+ line-height: 1.1;
+}
+
+body h6 {
+ font-size: 1em;
+ color: #777;
+}
+
+body h6 .anchor {
+ line-height: 1.1;
+}
+
+body p,
+body blockquote,
+body ul,
+body ol,
+body dl,
+body table,
+body pre {
+ margin-top: 0;
+ margin-bottom: 16px;
+}
+
+body hr {
+ height: 4px;
+ padding: 0;
+ margin: 16px 0;
+ background-color: #e7e7e7;
+ border: 0 none;
+}
+
+body ul,
+body ol {
+ padding-left: 2em;
+}
+
+body ul ul,
+body ul ol,
+body ol ol,
+body ol ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+body li>p {
+ margin-top: 16px;
+}
+
+body dl {
+ padding: 0;
+}
+
+body dl dt {
+ padding: 0;
+ margin-top: 16px;
+ font-size: 1em;
+ font-style: italic;
+ font-weight: bold;
+}
+
+body dl dd {
+ padding: 0 16px;
+ margin-bottom: 16px;
+}
+
+body blockquote {
+ padding: 0 15px;
+ color: #777;
+ border-left: 4px solid #ddd;
+}
+
+body blockquote>:first-child {
+ margin-top: 0;
+}
+
+body blockquote>:last-child {
+ margin-bottom: 0;
+}
+
+body table {
+ display: block;
+ width: 100%;
+ overflow: auto;
+ word-break: normal;
+ word-break: keep-all;
+}
+
+body table th {
+ font-weight: bold;
+}
+
+body table th,
+body table td {
+ padding: 6px 13px;
+ border: 1px solid #ddd;
+}
+
+body table tr {
+ background-color: #fff;
+ border-top: 1px solid #ccc;
+}
+
+body table tr:nth-child(2n) {
+ background-color: #f8f8f8;
+}
+
+body img {
+ max-width: 100%;
+ box-sizing: content-box;
+ background-color: #fff;
+}
+
+body code {
+ padding: 0;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin: 0;
+ font-size: 85%;
+ background-color: rgba(0,0,0,0.04);
+ border-radius: 3px;
+}
+
+body code:before,
+body code:after {
+ letter-spacing: -0.2em;
+ content: "\00a0";
+}
+
+body pre>code {
+ padding: 0;
+ margin: 0;
+ font-size: 100%;
+ word-break: normal;
+ white-space: pre;
+ background: transparent;
+ border: 0;
+}
+
+body .highlight {
+ margin-bottom: 16px;
+}
+
+body .highlight pre,
+body pre {
+ padding: 16px;
+ overflow: auto;
+ font-size: 85%;
+ line-height: 1.45;
+ background-color: #f7f7f7;
+ border-radius: 3px;
+}
+
+body .highlight pre {
+ margin-bottom: 0;
+ word-break: normal;
+}
+
+body pre {
+ word-wrap: normal;
+}
+
+body pre code {
+ display: inline;
+ max-width: initial;
+ padding: 0;
+ margin: 0;
+ overflow: initial;
+ line-height: inherit;
+ word-wrap: normal;
+ background-color: transparent;
+ border: 0;
+}
+
+body pre code:before,
+body pre code:after {
+ content: normal;
+}
+
+body kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font-size: 11px;
+ line-height: 10px;
+ color: #555;
+ vertical-align: middle;
+ background-color: #fcfcfc;
+ border: solid 1px #ccc;
+ border-bottom-color: #bbb;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 #bbb;
+}
+
+body .pl-c {
+ color: #969896;
+}
+
+body .pl-c1,
+body .pl-s .pl-v {
+ color: #0086b3;
+}
+
+body .pl-e,
+body .pl-en {
+ color: #795da3;
+}
+
+body .pl-s .pl-s1,
+body .pl-smi {
+ color: #333;
+}
+
+body .pl-ent {
+ color: #63a35c;
+}
+
+body .pl-k {
+ color: #a71d5d;
+}
+
+body .pl-pds,
+body .pl-s,
+body .pl-s .pl-pse .pl-s1,
+body .pl-sr,
+body .pl-sr .pl-cce,
+body .pl-sr .pl-sra,
+body .pl-sr .pl-sre {
+ color: #183691;
+}
+
+body .pl-v {
+ color: #ed6a43;
+}
+
+body .pl-id {
+ color: #b52a1d;
+}
+
+body .pl-ii {
+ background-color: #b52a1d;
+ color: #f8f8f8;
+}
+
+body .pl-sr .pl-cce {
+ color: #63a35c;
+ font-weight: bold;
+}
+
+body .pl-ml {
+ color: #693a17;
+}
+
+body .pl-mh,
+body .pl-mh .pl-en,
+body .pl-ms {
+ color: #1d3e81;
+ font-weight: bold;
+}
+
+body .pl-mq {
+ color: #008080;
+}
+
+body .pl-mi {
+ color: #333;
+ font-style: italic;
+}
+
+body .pl-mb {
+ color: #333;
+ font-weight: bold;
+}
+
+body .pl-md {
+ background-color: #ffecec;
+ color: #bd2c00;
+}
+
+body .pl-mi1 {
+ background-color: #eaffea;
+ color: #55a532;
+}
+
+body .pl-mdr {
+ color: #795da3;
+ font-weight: bold;
+}
+
+body .pl-mo {
+ color: #1d3e81;
+}
+
+body kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ line-height: 10px;
+ color: #555;
+ vertical-align: middle;
+ background-color: #fcfcfc;
+ border: solid 1px #ccc;
+ border-bottom-color: #bbb;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 #bbb;
+}
+
+body .task-list-item {
+ list-style-type: none;
+}
+
+body .task-list-item+.task-list-item {
+ margin-top: 3px;
+}
+
+body .task-list-item input {
+ margin: 0 0.35em 0.25em -1.6em;
+ vertical-align: middle;
+}
+
+body :checked+.radio-label {
+ z-index: 1;
+ position: relative;
+ border-color: #4078c0;
+}
+</style>
-mvn clean package -Dgetdown.host.whitelist=jalview.org,*.jalview.org && cp launcher/target/getdown-launcher-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-launcher.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j8lib/getdown-core.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j11lib/getdown-core.jar
+mvn clean package -Dgetdown.host.whitelist="jalview.org,*.jalview.org" && cp launcher/target/getdown-launcher-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-launcher.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j8lib/getdown-core.jar && cp core/target/getdown-core-1.8.3-SNAPSHOT.jar ../../../j11lib/getdown-core.jar
jalviewDir = .
+#JAVA_VERSION = 1.8
JAVA_VERSION = 11
JALVIEW_VERSION = DEVELOPMENT
INSTALLATION = Source
testngGroups = Functional
-javac_source = 11
-javac_target = 11
-
j8libDir = j8lib
j11libDir = j11lib
resourceDir = resources
getdown_website_dir = getdown/website
getdown_resource_dir = resource
getdown_app_dir = dist
-getdown_j11lib_dir = j11lib
+#getdown_j11lib_dir = j11lib
getdown_files_dir = getdown/files
getdown_launcher = getdown/lib/getdown-launcher.jar
getdown_core = getdown/lib/getdown-core-1.8.3-SNAPSHOT.jar
eclipse_extra_jdt_prefs_file = .settings/org.eclipse.jdt.core.jalview.prefs
+pandoc_exec = /usr/local/bin/pandoc,/usr/bin/pandoc
dev = false
nucleotide substitution matrix</a>, or by sequence percentage identity,
or sequence feature similarity.
</p>
- <img src="pcaviewer.gif">
+ <img src="pcaviewer.png">
<p>
<strong>The PCA Viewer</strong>
</p>
towards the front of the view.</p>
<p>
The 3d view can be rotated by dragging the mouse with the <strong>left
- mouse button</strong> pressed. The view can also be zoomed in and out with
+ mouse button</strong> pressed, or with the <strong>arrow
+ keys</strong> when <strong>SHIFT</strong> is pressed. The
+ view can also be zoomed in and out with
the up and down <strong>arrow keys</strong> (and the roll bar of the
mouse if present). Labels will be shown for each sequence if the
entry in the View menu is checked, and the plot background colour
<p>
Initially, the display shows the first three components of the
similarity space, but any eigenvector can be used by changing the
- selected dimension for the x, y, or z axis through each ones menu
+ selected dimension for the x, y, or z axis through each one's menu
located below the 3d display. The <strong><em>Reset</em></strong>
button will reset axis and rotation settings to their defaults.
</p>
<em>The output of points and transformed point coordinates was
added to the Jalview desktop in v2.7.</em> <em>The Reset button
and Change Parameters menu were added in Jalview 2.8.</em> <em>Support
- for PAM250 based PCA was added in Jalview 2.8.1.</em>
+ for PAM250 based PCA was added in Jalview 2.8.1.</em><em>In Jalview 2.11, support for saving and restoring PCAs in Project files was added, and the Change parameters menu removed.</em>
</p>
<p>
<strong>Reproducing PCA calculations performed with older
<tr>
<td width="60" align="center" nowrap>
<strong><a name="Jalview.2.11">2.11</a><br />
- <em>14/05/2019 (final due date !)</em></strong>
+ <em>20/06/2019</em></strong>
</td>
<td align="left" valign="top">
<ul>
<li>
<!-- JAL-1793 -->Annotate nucleotide alignments from VCF data files</li>
<li>
- <!-- JAL-3141 -->Optional automatic backups when saving
- Jalview project or alignment files</li>
- <li>
- <!-- JAL-1767,JAL-2647 -->Principal Components Analysis and
- Viewer state is saved in Jalview Project<br />The 'Change
- parameters' option has also been removed from the PCA viewer</li>
- <li>
- <!-- JAL-3127 -->New 'Colour by Sequence ID' (subgroup) option</li>
- <li>
- <!-- JAL-2620 -->Alternative genetic code tables supported for
+ <!-- JAL-2620 -->Alternative genetic code tables for
'Translate as cDNA'</li>
<li>
- <!-- JAL-2933 -->Finder panel remembers last position in each view</li>
- <li>
- <!-- JAL-3198 -->More efficient creation of selections and
- multiple groups when working with large alignments</li>
- <li>
- <!-- JAL-3200 -->Speedier import of annotation rows when
- parsing stockholm files</li>
- <li>
<!-- JAL-3018 -->Update of Ensembl Rest Client to API v10.0</li>
- <li>
- <!-- JAL-2808,JAL-2069 -->Sequence features can be filtered and
- shaded according to any associated attributes (e.g. variant
- attributes from VCF file, or key-value pairs imported from
- column 9 of GFF file)</li>
- <li>
- <!-- JAL-2897 -->Show synonymous codon variants on peptide sequences</li>
- <li>
- <!-- JAL-2792 -->Popup report of a selected sequence feature's details</li>
- <li>
- <!-- JAL-3139,JAL-2816 -->More efficient sequence feature render
- algorithm (Z-sort/transparency and filter aware)</li>
- <li>
- <!-- JAL-2527 -->Alignment Overview now by default shows
- only visible region of alignment (this can be changed in
- user preferences)</li>
- <li>
- <!-- JAL-3169 -->File Chooser stays open after Cancel overwrite</li>
- <li>
- <!-- JAL-2420,JAL-3166 -->Better popup menu behaviour when
- all sequences are hidden</li>
- <li>
- <!-- JAL-1244 -->Status bar shows bounds when dragging a selection
- region, and gap count when inserting or deleting gaps</li>
- <li>
- <!-- JAL-3132 -->Status bar updates over sequence and annotation labels</li>
- <li>
- <!-- JAL-3093 -->Show annotation tooltips and popup menus in wrapped mode</li>
- <li>
- <!-- JAL-3073 -->Can select columns by dragging left/right in annotations</li>
- <li>
- <!-- JAL-3049,JAL-3054 -->Improved tooltips in Feature Settings dialog</li>
- <li>
- <!-- JAL-2814 -->Help button on Uniprot and PDB search panels</li>
- <li>
- <!-- JAL-2621 -->Cursor changes over draggable box in Overview panel</li>
- <li>
- <!-- JAL-3203 -->Overview panel default changed to not show hidden regions</li>
- <li>
- <!-- JAL-3181 -->Consistent ordering of links in sequence id popup menu</li>
- <li>
- <!-- JAL-3021 -->Sequence Details report opens positioned to top of report</li>
- <li>
- <!-- JAL-3218 -->Scale panel popup menu allows Hide selected columns adjacent
- to a hidden column marker</li>
- <li>
- <!-- JAL-2975 -->Can use shift + arrow keys to rotate PCA image incrementally</li>
- <li>
- <!-- JAL-2965 -->PCA depth cueing with graduated colours</li>
- </ul>
+ <li><strong>Enhanced visualisation and analysis of Sequence Features</strong>
+ <ul>
+ <li>
+ <!-- JAL-2808,JAL-2069 -->Sequence features can be filtered and
+ shaded according to any associated attributes (e.g. variant
+ attributes from VCF file, or key-value pairs imported from
+ column 9 of GFF file)
+ </li>
+ <li>
+ <!-- JAL-2897 -->Show synonymous codon variants on peptide
+ sequences
+ </li>
+ <li>
+ <!-- JAL-2792 -->Popup window to show full report for a selected sequence feature's
+ details
+ </li>
+ <li>
+ <!-- JAL-3139,JAL-2816 -->More efficient sequence feature render
+ algorithm (Z-sort/transparency and filter aware)
+ </li>
+ <li>
+ <!-- JAL-3049,JAL-3054 -->Improved tooltips in Feature Settings
+ dialog
+ </li>
+ </ul>
+ </li>
+ <li>
+ <!-- JAL-3141 -->Backup files created when saving Jalview project
+ or alignment files
+ </li>
+ <li><strong>Principal Components Analysis Viewer</strong>
+ <ul>
+ <li>
+ <!-- JAL-1767,JAL-2647 -->Principal Components Analysis results
+ and Viewer state saved in Jalview Project
+ </li>
+ <li>'Change parameters' option removed from viewer's
+ drop-down menus</li>
+ <li>
+ <!-- JAL-2975 -->Can use shift + arrow keys to rotate PCA image
+ incrementally
+ </li>
+ <li>
+ <!-- JAL-2965 -->PCA plot is depth cued
+ </li>
+ </ul>
+ </li>
+ <li>
+ <!-- JAL-3127 -->New 'Colour by Sequence ID' option
+ </li>
+ <li><strong>Speed and Efficiency</strong>
+ <ul>
+ <li>
+ <!-- JAL-3198 -->More efficient creation of selections and
+ multiple groups when working with large alignments
+ </li>
+ <li>
+ <!-- JAL-3200 -->Speedier import of annotation rows when parsing
+ Stockholm files
+ </li>
+ </ul>
+ <li><strong>User Interface</strong>
+ <ul>
+ <li>
+ <!-- JAL-2933 -->Finder panel remembers last position in each
+ view
+ </li>
+ <li>
+ <!-- JAL-2527 -->Alignment Overview now WYSIWIS (What you see is
+ what is shown)<br />Only visible region of alignment is shown by
+ default (can be changed in user preferences)
+ </li>
+ <li>
+ <!-- JAL-3169 -->File Chooser stays open after responding Cancel
+ to the Overwrite Dialog
+ </li>
+ <li>
+ <!-- JAL-2420,JAL-3166 -->Better popup menu behaviour when all
+ sequences are hidden
+ </li>
+ <li>
+ <!-- JAL-1244 -->Status bar shows bounds when dragging a
+ selection region, and gap count when inserting or deleting gaps
+ </li>
+ <li>
+ <!-- JAL-3132 -->Status bar updates over sequence and annotation
+ labels
+ </li>
+ <li>
+ <!-- JAL-3093 -->Annotation tooltips and popup menus are shown
+ when in wrapped mode
+ </li>
+ <li>
+ <!-- JAL-3073 -->Can select columns by dragging left/right in
+ annotations
+ </li>
+ <li>
+ <!-- JAL-2814 -->Help button on Uniprot and PDB search panels
+ </li>
+ <li>
+ <!-- JAL-2621 -->Cursor changes over draggable box in Overview
+ panel
+ </li>
+ <li>
+ <!-- JAL-3181 -->Consistent ordering of links in sequence id
+ popup menu
+ </li>
+ </ul></li>
+ <li><strong>Java 11 Support</strong>
+ <ul>
+ <li>
+ <!-- JAL- -->Java 11 Native Desktop installer, standalone JAR
+ and getdown release channels
+ </li>
+ <li>
+ <!-- -->OSX GUI integrations for App menu's 'About' entry and
+ trapping CMD-Q
+ </li>
+ </ul></li>
+ </ul>
<em>Deprecations</em>
<ul>
<li>
<!-- JAL-3035 -->DAS sequence retrieval and annotation
capabilities removed from the Jalview Desktop
</li>
+ <li>
+ <!-- JAL-3063,JAL-3116 -->Castor library for XML marshalling and
+ unmarshalling has been replaced by JAXB for Jalview projects
+ and XML based data retrieval clients</li>
+ <li><!-- JAL-3311 -->Disable VAMSAS menu in preparation for removal</li>
+ <li><!-- -->Jalview Desktop no longer distributed via Java Web Start</li>
</ul>
- <em>Release Processes</em>
+ <em>Development and Release Processes</em>
<ul>
- <li>
- Atlassian Bamboo continuous integration server for
+ <li>
+ <!-- JAL-3196,JAL-3007 -->Jalview Native Application and
+ Installers built with Install4j (licensed to the Jalview open
+ source project) rather than InstallAnywhere
+ </li>
+ <li>
+ <!-- JAL-1929 -->Jalview Launcher System to auto-configure memory
+ settings, receive over the air updates and launch specific
+ versions via (<a href="https://github.com/threerings/getdown">Three
+ Rings' GetDown</a>)
+ </li>
+ <li>
+ <!-- JAL-3196,JAL-3179 -->Build system migrated from Ant to Gradle
+ </li>
+ <li>
+ <!-- JAL-3225 -->Eclipse project configuration managed with
+ gradle-eclipse
+ </li>
+ <li>
+ Atlassian Bamboo continuous integration for
unattended Test Suite execution</li>
<li>
<!-- JAL-2864 -->Memory test suite to detect leaks in common
operations</li>
<li>
- <!-- JAL-3140 -->IntervalStoreJ (new updatable NCList
- implementation) used for Sequence Feature collections</li>
- <li>
- <!-- JAL-3063,JAL-3116 -->Castor library for XML marshalling and
- unmarshalling has been replaced by JAXB for Jalview projects
- and XML based data retrieval clients</li>
+ <!-- JAL-3140 -->IntervalStoreJ (NCList
+ implementation that alows updates) used for Sequence Feature collections</li>
</ul>
</td>
<td align="left" valign="top">
<!-- JAL-2750 -->Tree and PCA calculation fails for selected
region if columns were selected by dragging right-to-left
and the mouse moved to the left of the first column</li>
+ <li>
+ <!-- JAL-3218 -->Couldn't hide selected columns adjacent
+ to a hidden column marker via scale popup menu</li>
<li>
<!-- JAL-2846 -->Error message for trying to load in invalid
URLs doesn't tell users the invalid URL</li>
<li>
<!-- JAL-2898 -->stop_gained variants not shown correctly on peptide sequence</li>
<li>
+ <!-- JAL-3021 -->Sequence Details report opens positioned to top of report</li>
+ <li>
<!-- JAL-914 -->Help page can be opened twice</li>
</ul>
<em>Editing</em>
</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="showComplementFeatures" type="xs:boolean" use="optional" default="false" />
+ <xs:attribute name="showComplementFeaturesOnTop" type="xs:boolean" use="optional" default="false" />
</xs:complexType>
</xs:element>
<xs:element name="UserColours" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:choice>
</xs:sequence>
+ <xs:attribute name="mappingType" type="xs:string" use="optional">
+ <xs:annotation>
+ <xs:documentation>Biotype of the mapping e.g. CdsToPeptide</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:attribute name="source" type="xs:string"/>
<xs:attribute name="version" type="xs:string"/>
<xs:attribute name="accessionId" type="xs:string"/>
+ <xs:attribute name="locus" type="xs:boolean" default="false">
+ <xs:annotation>
+ <xs:documentation>
+ true for gene locus mapping, source=species, version=assembly, accession=chromosome
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="biotype" type="xs:string" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ Biotype of the sequence (if known)
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
return;
}
- MapList newMap = targetToFrom.traverse(fromLoci.getMap());
+ MapList newMap = targetToFrom.traverse(fromLoci.getMapping());
if (newMap != null)
{
}
+ /**
+ * update singleton Strings with these build details
+ *
+ * @param version
+ * @param buildDate
+ * @param installation
+ */
public BuildDetails(String version, String buildDate, String installation)
{
BuildDetails.version = version;
BuildDetails.installation = installation;
}
+ @Override
public String getBuildDate()
{
return buildDate;
BuildDetails.buildDate = buildDate;
}
+ @Override
public String getVersion()
{
return version;
BuildDetails.version = version;
}
+ @Override
public String getInstallation()
{
return installation;
applicationProperties.remove("YEAR");
}
- // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
- // MUST FOLLOW READING OF LOCAL PROPERTIES FILE AS THE
- // VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW
- try
- {
- String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
- .getCodeSource().getLocation().toString()
- .concat("!/.build_properties"));
-
- java.net.URL localJarFileURL = new java.net.URL(buildDetails);
-
- InputStream in = localJarFileURL.openStream();
- applicationProperties.load(in);
- in.close();
- } catch (Exception ex)
- {
- System.out.println("Error reading build details: " + ex);
- applicationProperties.remove("VERSION");
- }
-
- 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 + ")";
- }
- new BuildDetails(codeVersion, null, codeInstallation);
+ loadBuildProperties(false);
SiftsSettings
.setMapWithSifts(Cache.getDefault("MAP_WITH_SIFTS", false));
"http://www.jalview.org/services/identifiers"));
IdOrgSettings.setDownloadLocation(ID_ORG_FILE);
- System.out
- .println("Jalview Version: " + codeVersion + codeInstallation);
-
StructureImportSettings.setDefaultStructureFileFormat(jalview.bin.Cache
.getDefault("PDB_DOWNLOAD_FORMAT", PDB_DOWNLOAD_FORMAT));
StructureImportSettings
// StructureImportSettings
// .setDefaultPDBFileParser(jalview.bin.Cache.getDefault(
// "DEFAULT_PDB_FILE_PARSER", DEFAULT_PDB_FILE_PARSER));
- // jnlpVersion will be null if we're using InstallAnywhere
+
+ String jnlpVersion = System.getProperty("jalview.version");
+
+ // jnlpVersion will be null if a latest version check for the channel needs to
+ // be done
// Dont do this check if running in headless mode
+
if (jnlpVersion == null && getDefault("VERSION_CHECK", true)
&& (System.getProperty("java.awt.headless") == null || System
.getProperty("java.awt.headless").equals("false")))
}
}
- setProperty("VERSION", codeVersion);
-
// LOAD USERDEFINED COLOURS
jalview.bin.Cache
.initUserColourSchemes(getProperty("USER_DEFINED_COLOURS"));
false);
}
+ public static void loadBuildProperties(boolean reportVersion)
+ {
+ String codeInstallation = getProperty("INSTALLATION");
+ boolean printV = codeInstallation == null;
+
+ // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
+ try
+ {
+ String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
+ .getCodeSource().getLocation().toString()
+ .concat("!/.build_properties"));
+
+ java.net.URL localJarFileURL = new java.net.URL(buildDetails);
+
+ InputStream in = localJarFileURL.openStream();
+ applicationProperties.load(in);
+ in.close();
+ } catch (Exception ex)
+ {
+ System.out.println("Error reading build details: " + ex);
+ applicationProperties.remove("VERSION");
+ }
+ String codeVersion = getProperty("VERSION");
+ codeInstallation = getProperty("INSTALLATION");
+
+ if (codeVersion == null)
+ {
+ // THIS SHOULD ONLY BE THE CASE WHEN TESTING!!
+ codeVersion = "Test";
+ codeInstallation = "";
+ }
+ else
+ {
+ codeInstallation = " (" + codeInstallation + ")";
+ }
+ setProperty("VERSION", codeVersion);
+ new BuildDetails(codeVersion, null, codeInstallation);
+ if (printV && reportVersion)
+ {
+ System.out
+ .println("Jalview Version: " + codeVersion + codeInstallation);
+ }
+ }
+
private static void deleteBuildProperties()
{
applicationProperties.remove("LATEST_VERSION");
try
{
oldValue = applicationProperties.setProperty(key, obj);
- if (!propsAreReadOnly)
+ if (propertiesFile != null && !propsAreReadOnly)
{
FileOutputStream out = new FileOutputStream(propertiesFile);
applicationProperties.store(out, "---JalviewX Properties File---");
}
}
}
+
+ /**
+ *
+ * @return Jalview version, build details and JVM platform version for console
+ */
+ public static String getVersionDetailsForConsole()
+ {
+ return "Jalview Version: "
+ + jalview.bin.Cache.getDefault("VERSION", "TEST")
+ + "\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"
+ + System.getProperty("os.arch") + " "
+ + System.getProperty("os.name") + " "
+ + System.getProperty("os.version")
+ + (jalview.bin.Cache.getDefault("VERSION", "TEST")
+ .equals("DEVELOPMENT")
+ ? "\nJava path:"
+ + System.getProperty(
+ "java.home")
+ + File.separator + "bin"
+ + File.separator + "java"
+ : "");
+ }
+
+ /**
+ *
+ * @return build details as reported in splashscreen
+ */
+ public static String getBuildDetailsForSplash()
+ {
+ // consider returning more human friendly info
+ // eg 'built from Source' or update channel
+ return jalview.bin.Cache.getDefault("INSTALLATION", "unknown");
+ }
}
System.out.println(System.getProperty("os.arch") + " "
+ System.getProperty("os.name") + " "
+ System.getProperty("os.version"));
+ // report Jalview version
+ Cache.loadBuildProperties(true);
String appdirString = System.getProperty("getdownappdir");
if (appdirString != null && appdirString.length() > 0)
public class DBRefEntry implements DBRefEntryI
{
- /*
- * the mapping to chromosome (genome) is held as an instance with
- * source = speciesId
- * version = assemblyId
- * accessionId = "chromosome:" + chromosomeId
- * map = mapping from sequence to reference assembly
- */
- public static final String CHROMOSOME = "chromosome";
-
String source = "";
String version = "";
}
return true;
}
-
- /**
- * Mappings to chromosome are held with accessionId as "chromosome:id"
- *
- * @return
- */
- public boolean isChromosome()
- {
- return accessionId != null && accessionId.startsWith(CHROMOSOME + ":");
- }
}
*
* @return
*/
- MapList getMap();
+ MapList getMapping();
}
--- /dev/null
+package jalview.datamodel;
+
+import jalview.util.MapList;
+
+/**
+ * A specialisation of DBRefEntry used to hold the chromosomal coordinates for a
+ * (typically gene) sequence
+ * <ul>
+ * <li>field <code>source</code> is used to hold a species id e.g. human</li>
+ * <li>field <code>version</code> is used to hold assembly id e.g GRCh38</li>
+ * <li>field <code>accession</code> is used to hold the chromosome id</li>
+ * <li>field <code>map</code> is used to hold the mapping from sequence to
+ * chromosome coordinates</li>
+ * </ul>
+ *
+ * @author gmcarstairs
+ *
+ */
+public class GeneLocus extends DBRefEntry implements GeneLociI
+{
+ /**
+ * Constructor adapts species, assembly, chromosome to DBRefEntry source,
+ * version, accession, respectively, and saves the mapping of sequence to
+ * chromosomal coordinates
+ *
+ * @param speciesId
+ * @param assemblyId
+ * @param chromosomeId
+ * @param mapping
+ */
+ public GeneLocus(String speciesId, String assemblyId, String chromosomeId,
+ Mapping mapping)
+ {
+ super(speciesId, assemblyId, chromosomeId, mapping);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param speciesId
+ * @param assemblyId
+ * @param chromosomeId
+ */
+ public GeneLocus(String speciesId, String assemblyId, String chromosomeId)
+ {
+ this(speciesId, assemblyId, chromosomeId, null);
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ return o instanceof GeneLocus && super.equals(o);
+ }
+
+ @Override
+ public MapList getMapping()
+ {
+ return map == null ? null : map.getMap();
+ }
+
+ /**
+ * Answers the species identifier e.g. "human", stored as field <code>source</code> of
+ * DBRefEntry
+ */
+ @Override
+ public String getSpeciesId()
+ {
+ return getSource();
+ }
+
+ /**
+ * Answers the genome assembly id e.g. "GRCh38", stored as field
+ * <code>version</code> of DBRefEntry
+ */
+ @Override
+ public String getAssemblyId()
+ {
+ return getVersion();
+ }
+
+ /**
+ * Answers the chromosome identifier e.g. "X", stored as field
+ * <code>accession</code> of DBRefEntry
+ */
+ @Override
+ public String getChromosomeId()
+ {
+ return getAccessionId();
+ }
+
+}
public void setGeneLoci(String speciesId, String assemblyId,
String chromosomeId, MapList map)
{
- addDBRef(new DBRefEntry(speciesId, assemblyId, DBRefEntry.CHROMOSOME
- + ":" + chromosomeId, new Mapping(map)));
+ addDBRef(new GeneLocus(speciesId, assemblyId, chromosomeId,
+ new Mapping(map)));
}
/**
{
for (final DBRefEntry ref : refs)
{
- if (ref.isChromosome())
+ if (ref instanceof GeneLociI)
{
- return new GeneLociI()
- {
- @Override
- public String getSpeciesId()
- {
- return ref.getSource();
- }
-
- @Override
- public String getAssemblyId()
- {
- return ref.getVersion();
- }
-
- @Override
- public String getChromosomeId()
- {
- // strip off "chromosome:" prefix to chrId
- return ref.getAccessionId().substring(
- DBRefEntry.CHROMOSOME.length() + 1);
- }
-
- @Override
- public MapList getMap()
- {
- return ref.getMap().getMap();
- }
- };
+ return (GeneLociI) ref;
}
}
}
int end = Integer.parseInt(obj.get("end").toString());
String source = obj.get("source").toString();
String strand = obj.get("strand").toString();
+ Object phase = obj.get("phase");
String alleles = JSONUtils
.arrayToList((JSONArray) obj.get("alleles"));
String clinSig = JSONUtils
SequenceFeature sf = new SequenceFeature(type, desc, start, end,
source);
sf.setStrand("1".equals(strand) ? "+" : "-");
+ if (phase != null)
+ {
+ sf.setPhase(phase.toString());
+ }
setFeatureAttribute(sf, obj, "id");
setFeatureAttribute(sf, obj, "Parent");
setFeatureAttribute(sf, obj, "consequence_type");
import jalview.api.FeatureColourI;
import jalview.api.FeatureSettingsModelI;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.DBRefEntry;
import jalview.datamodel.GeneLociI;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
EnsemblFeatureType.exon, EnsemblFeatureType.cds,
EnsemblFeatureType.variation };
+ private static final String CHROMOSOME = "chromosome";
+
/**
* Default constructor (to use rest.ensembl.org)
*/
if (geneLoci != null)
{
seq.setGeneLoci(geneLoci.getSpeciesId(), geneLoci.getAssemblyId(),
- geneLoci.getChromosomeId(), geneLoci.getMap());
+ geneLoci.getChromosomeId(), geneLoci.getMapping());
}
else
{
return false;
}
String[] tokens = description.split(":");
- if (tokens.length == 6 && tokens[0].startsWith(DBRefEntry.CHROMOSOME))
+ if (tokens.length == 6 && tokens[0].startsWith(CHROMOSOME))
{
String ref = tokens[1];
String chrom = tokens[2];
return;
}
- MapList geneMapping = loci.getMap();
+ MapList geneMapping = loci.getMapping();
List<int[]> exons = mapping.getFromRanges();
List<int[]> transcriptLoci = new ArrayList<>();
import jalview.bin.Cache;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.GeneLociI;
+import jalview.datamodel.GeneLocus;
+import jalview.datamodel.Mapping;
import jalview.util.MapList;
import java.io.BufferedReader;
fromEnd });
List<int[]> toRange = Collections.singletonList(new int[] { toStart,
toEnd });
- final MapList map = new MapList(fromRange, toRange, 1, 1);
- return new GeneLociI()
- {
-
- @Override
- public String getSpeciesId()
- {
- return species == null ? "" : species;
- }
-
- @Override
- public String getAssemblyId()
- {
- return assembly;
- }
-
- @Override
- public String getChromosomeId()
- {
- return chromosome;
- }
-
- @Override
- public MapList getMap()
- {
- return map;
- }
- };
+ final Mapping map = new Mapping(
+ new MapList(fromRange, toRange, 1, 1));
+ return new GeneLocus(species == null ? "" : species, assembly,
+ chromosome, map);
} catch (NullPointerException | NumberFormatException e)
{
Cache.log.error("Error looking up gene loci: " + e.getMessage());
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefSource;
import jalview.datamodel.GeneLociI;
+import jalview.datamodel.GeneLocus;
+import jalview.datamodel.Mapping;
import jalview.util.MapList;
import java.io.BufferedReader;
final String chr = chromosome;
List<int[]> fromRange = Collections.singletonList(new int[] { 1,
fromEnd });
- final MapList map = new MapList(fromRange, regions, 1, 1);
- return new GeneLociI()
- {
-
- @Override
- public String getSpeciesId()
- {
- return species == null ? "" : species;
- }
-
- @Override
- public String getAssemblyId()
- {
- return as;
- }
-
- @Override
- public String getChromosomeId()
- {
- return chr;
- }
-
- @Override
- public MapList getMap()
- {
- return map;
- }
- };
+ Mapping mapping = new Mapping(new MapList(fromRange, regions, 1, 1));
+ return new GeneLocus(species == null ? "" : species, as, chr,
+ mapping);
} catch (IOException | ParseException | NumberFormatException e)
{
// ignore
seq.getLength());
if (geneLoci != null)
{
- MapList map = geneLoci.getMap();
+ MapList map = geneLoci.getMapping();
int mappedFromLength = MappingUtils.getLength(map.getFromRanges());
if (mappedFromLength == seq.getLength())
{
seq.setGeneLoci(geneLoci.getSpeciesId(), geneLoci.getAssemblyId(),
- geneLoci.getChromosomeId(), geneLoci.getMap());
+ geneLoci.getChromosomeId(), map);
retrievedLoci.put(dbref, geneLoci);
return true;
}
seq.getLength());
if (geneLoci != null)
{
- MapList map = geneLoci.getMap();
+ MapList map = geneLoci.getMapping();
int mappedFromLength = MappingUtils.getLength(map.getFromRanges());
if (mappedFromLength == seq.getLength())
{
seq.setGeneLoci(geneLoci.getSpeciesId(), geneLoci.getAssemblyId(),
- geneLoci.getChromosomeId(), geneLoci.getMap());
+ geneLoci.getChromosomeId(), map);
retrievedLoci.put(dbref, geneLoci);
return true;
}
}
jconsole = new Console(this, showjconsole);
// add essential build information
- 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"
- + System.getProperty("os.arch") + " "
- + System.getProperty("os.name") + " "
- + System.getProperty("os.version")
- + (jalview.bin.Cache.getProperty("VERSION").equals("DEVELOPMENT")
- ? "\nJava path:"
- + System.getProperty(
- "java.home")
- + File.separator + "bin"
- + File.separator + "java"
- : "")
- );
+ jconsole.setHeader(jalview.bin.Cache.getVersionDetailsForConsole());
showConsole(showjconsole);
message.append("<h1><strong>Version: "
+ jalview.bin.Cache.getProperty("VERSION")
+ "</strong></h1>");
- message.append("<strong>Last Updated: <em>"
+ message.append("<strong>Built: <em>"
+ jalview.bin.Cache.getDefault("BUILD_DATE", "unknown")
- + "</em></strong>");
+ + "</em> from " + jalview.bin.Cache.getBuildDetailsForSplash()
+ + "</strong>");
}
else
if (jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking")
.equals("Checking"))
{
- message.append("<br>...Checking latest version...</br>");
+ // JBP removed this message for 2.11: May be reinstated in future version
+ // message.append("<br>...Checking latest version...</br>");
}
else if (!jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking")
.equals(jalview.bin.Cache.getProperty("VERSION")))
import jalview.viewmodel.AlignmentViewport;
import java.awt.Component;
-import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import javax.swing.AbstractAction;
import javax.swing.InputMap;
import javax.swing.JComponent;
+import javax.swing.JDesktopPane;
+import javax.swing.JInternalFrame;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;
import javax.swing.event.InternalFrameAdapter;
};
overrideKeyBinding(key_cmdF, action);
}
+
+ /**
+ * Override to do nothing if triggered from one of the child frames
+ */
+ @Override
+ public void setSelected(boolean selected) throws PropertyVetoException
+ {
+ JDesktopPane desktopPane = getDesktopPane();
+ JInternalFrame fr = desktopPane == null ? null
+ : desktopPane.getSelectedFrame();
+ if (fr == getTopFrame() || fr == getBottomFrame())
+ {
+ /*
+ * patch for JAL-3288 (deselecting top/bottom frame closes popup menu);
+ * it may be possible to remove this method in future
+ * if the underlying Java behaviour changes
+ */
+ if (selected)
+ {
+ moveToFront();
+ }
+ return;
+ }
+ super.setSelected(selected);
+ }
}
import jalview.api.FeatureColourI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
+import jalview.datamodel.GeneLociI;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.util.MessageManager;
@Override
public int compare(DBRefEntry ref1, DBRefEntry ref2)
{
- if (ref1.isChromosome())
+ if (ref1 instanceof GeneLociI)
{
return -1;
}
- if (ref2.isChromosome())
+ if (ref2 instanceof GeneLociI)
{
return 1;
}
{ "snRNA", "transcript" },
{ "miRNA", "transcript" },
{ "lincRNA", "transcript" },
+ { "lnc_RNA", "transcript" },
{ "rRNA", "transcript" },
{ "mRNA", "transcript" },
// there are many more sub-types of ncRNA...
String species = seqCoords.getSpeciesId();
String chromosome = seqCoords.getChromosomeId();
String seqRef = seqCoords.getAssemblyId();
- MapList map = seqCoords.getMap();
+ MapList map = seqCoords.getMapping();
// note this requires the configured species to match that
// returned with the Ensembl sequence; todo: support aliases?
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.GeneLocus;
import jalview.datamodel.GraphLine;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.Point;
parentseq = jds;
}
}
+
+ /*
+ * save any dbrefs; special subclass GeneLocus is flagged as 'locus'
+ */
if (dbrefs != null)
{
for (int d = 0; d < dbrefs.length; d++)
{
DBRef dbref = new DBRef();
- dbref.setSource(dbrefs[d].getSource());
- dbref.setVersion(dbrefs[d].getVersion());
- dbref.setAccessionId(dbrefs[d].getAccessionId());
- if (dbrefs[d].hasMap())
+ DBRefEntry dbRefEntry = dbrefs[d];
+ dbref.setSource(dbRefEntry.getSource());
+ dbref.setVersion(dbRefEntry.getVersion());
+ dbref.setAccessionId(dbRefEntry.getAccessionId());
+ if (dbRefEntry instanceof GeneLocus)
{
- Mapping mp = createVamsasMapping(dbrefs[d].getMap(), parentseq,
+ dbref.setLocus(true);
+ }
+ if (dbRefEntry.hasMap())
+ {
+ Mapping mp = createVamsasMapping(dbRefEntry.getMap(), parentseq,
jds, recurse);
dbref.setMapping(mp);
}
- // vamsasSeq.addDBRef(dbref);
vamsasSeq.getDBRef().add(dbref);
}
}
return datasetId;
}
+ /**
+ * Add any saved DBRefEntry's to the sequence. An entry flagged as 'locus' is
+ * constructed as a special subclass GeneLocus.
+ *
+ * @param datasetSequence
+ * @param sequence
+ */
private void addDBRefs(SequenceI datasetSequence, Sequence sequence)
{
for (int d = 0; d < sequence.getDBRef().size(); d++)
{
DBRef dr = sequence.getDBRef().get(d);
- jalview.datamodel.DBRefEntry entry = new jalview.datamodel.DBRefEntry(
- dr.getSource(), dr.getVersion(), dr.getAccessionId());
+ DBRefEntry entry;
+ if (dr.isLocus())
+ {
+ entry = new GeneLocus(dr.getSource(), dr.getVersion(),
+ dr.getAccessionId());
+ }
+ else
+ {
+ entry = new DBRefEntry(dr.getSource(), dr.getVersion(),
+ dr.getAccessionId());
+ }
if (dr.getMapping() != null)
{
entry.setMap(addMapping(dr.getMapping()));
return false;
}
return (jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMaskEx()
- & e.getModifiersEx()) != 0; // getModifiers()) != 0;
+ & jalview.util.ShortcutKeyMaskExWrapper
+ .getModifiersEx(e)) != 0; // getModifiers()) != 0;
}
return e.isControlDown();
}
package jalview.util;
-import java.awt.Toolkit;
-import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
public class ShortcutKeyMaskExWrapper
{
- private static boolean init = false;
+ private static final Float specversion;
- private static final Float specversion = Float
- .parseFloat(System.getProperty("java.specification.version"));
+ private static final float modern;
- private static final float modern = 11;
+ public static final int SHIFT_DOWN_MASK;
- public static int SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
+ public static final int ALT_DOWN_MASK;
- public static int ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+ private static final ShortcutKeyMaskExWrapperI wrapper;
- public ShortcutKeyMaskExWrapper()
+ static
{
- }
+ specversion = Float
+ .parseFloat(System.getProperty("java.specification.version"));
+ modern = 11;
- private static void init()
- {
- if (init)
- {
- return;
- }
- if (specversion < modern)
+ if (specversion >= modern)
{
- SHIFT_DOWN_MASK = KeyEvent.SHIFT_MASK;
- ALT_DOWN_MASK = KeyEvent.ALT_MASK;
+ wrapper = new jalview.util.ShortcutKeyMaskExWrapper11();
+ SHIFT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper11.SHIFT_DOWN_MASK;
+ ALT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper11.ALT_DOWN_MASK;
}
else
{
- SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
- ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+ wrapper = new jalview.util.ShortcutKeyMaskExWrapper8();
+ SHIFT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper8.SHIFT_DOWN_MASK;
+ ALT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper8.ALT_DOWN_MASK;
}
-
- init = true;
}
public static int getMenuShortcutKeyMaskEx()
{
- init();
- if (specversion < modern)
- {
- return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
- }
- else
- {
- return Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
- }
+ return wrapper.getMenuShortcutKeyMaskEx();
+ }
+
+ public static int getModifiersEx(MouseEvent e)
+ {
+ return wrapper.getModifiersEx(e);
}
}
--- /dev/null
+package jalview.util;
+
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+
+public class ShortcutKeyMaskExWrapper11 implements ShortcutKeyMaskExWrapperI
+{
+ public final static int SHIFT_DOWN_MASK;
+
+ public final static int ALT_DOWN_MASK;
+
+ static
+ {
+ SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
+ ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+ }
+
+ @Override
+ public int getMenuShortcutKeyMaskEx()
+ {
+ try
+ {
+ if (!GraphicsEnvironment.isHeadless())
+ {
+ return Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
+ }
+ } catch (java.lang.Throwable t)
+ {
+ }
+ return 0;
+ }
+
+ @Override
+ public int getModifiersEx(MouseEvent e)
+ {
+ return e.getModifiersEx();
+ }
+
+
+}
--- /dev/null
+package jalview.util;
+
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+
+public class ShortcutKeyMaskExWrapper8 implements ShortcutKeyMaskExWrapperI
+{
+ public final static int SHIFT_DOWN_MASK;
+
+ public final static int ALT_DOWN_MASK;
+
+ static
+ {
+ SHIFT_DOWN_MASK = KeyEvent.SHIFT_MASK;
+ ALT_DOWN_MASK = KeyEvent.ALT_MASK;
+ }
+
+ @Override
+ public int getMenuShortcutKeyMaskEx()
+ {
+ try
+ {
+ if (!GraphicsEnvironment.isHeadless())
+ {
+ return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+ }
+ } catch (java.lang.Throwable t)
+ {
+ }
+ return 0;
+ }
+
+ @Override
+ public int getModifiersEx(MouseEvent e)
+ {
+ return e.getModifiers();
+ }
+
+}
--- /dev/null
+package jalview.util;
+
+import java.awt.event.MouseEvent;
+
+public interface ShortcutKeyMaskExWrapperI
+{
+ public static int SHIFT_DOWN_MASK = 0;
+
+ public static int ALT_DOWN_MASK = 0;
+
+ public int getMenuShortcutKeyMaskEx();
+
+ public int getModifiersEx(MouseEvent e);
+}
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
* <attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* <attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="showComplementFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ * <attribute name="showComplementFeaturesOnTop" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* </restriction>
* </complexContent>
* </complexType>
* <attribute name="textColThreshold" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* <attribute name="complementId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="showComplementFeatures" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ * <attribute name="showComplementFeaturesOnTop" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* </restriction>
* </complexContent>
* </complexType>
protected String id;
@XmlAttribute(name = "complementId")
protected String complementId;
+ @XmlAttribute(name = "showComplementFeatures")
+ protected Boolean showComplementFeatures;
+ @XmlAttribute(name = "showComplementFeaturesOnTop")
+ protected Boolean showComplementFeaturesOnTop;
@XmlAttribute(name = "width")
protected Integer width;
@XmlAttribute(name = "height")
}
/**
+ * Gets the value of the showComplementFeatures property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public boolean isShowComplementFeatures() {
+ if (showComplementFeatures == null) {
+ return false;
+ } else {
+ return showComplementFeatures;
+ }
+ }
+
+ /**
+ * Sets the value of the showComplementFeatures property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setShowComplementFeatures(Boolean value) {
+ this.showComplementFeatures = value;
+ }
+
+ /**
+ * Gets the value of the showComplementFeaturesOnTop property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public boolean isShowComplementFeaturesOnTop() {
+ if (showComplementFeaturesOnTop == null) {
+ return false;
+ } else {
+ return showComplementFeaturesOnTop;
+ }
+ }
+
+ /**
+ * Sets the value of the showComplementFeaturesOnTop property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setShowComplementFeaturesOnTop(Boolean value) {
+ this.showComplementFeaturesOnTop = value;
+ }
+
+ /**
* Gets the value of the width property.
*
* @return
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
* </element>
* </choice>
* </sequence>
+ * <attribute name="mappingType" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </complexContent>
* </complexType>
@XmlElement(name = "Sequence")
protected Sequence sequence;
protected String dseqFor;
+ @XmlAttribute(name = "mappingType")
+ protected String mappingType;
/**
* Gets the value of the sequence property.
this.dseqFor = value;
}
+ /**
+ * Gets the value of the mappingType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMappingType() {
+ return mappingType;
+ }
+
+ /**
+ * Sets the value of the mappingType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMappingType(String value) {
+ this.mappingType = value;
+ }
+
}
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
* <attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="accessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="locus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="dsseqid" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="biotype" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </complexContent>
* </complexType>
protected List<Sequence.DBRef> dbRef;
@XmlAttribute(name = "dsseqid")
protected String dsseqid;
+ @XmlAttribute(name = "biotype")
+ protected String biotype;
/**
* Gets the value of the dbRef property.
this.dsseqid = value;
}
+ /**
+ * Gets the value of the biotype property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBiotype() {
+ return biotype;
+ }
+
+ /**
+ * Sets the value of the biotype property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBiotype(String value) {
+ this.biotype = value;
+ }
+
/**
* <p>Java class for anonymous complex type.
* <attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="accessionId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="locus" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* </restriction>
* </complexContent>
* </complexType>
protected String version;
@XmlAttribute(name = "accessionId")
protected String accessionId;
+ @XmlAttribute(name = "locus")
+ protected Boolean locus;
/**
* Gets the value of the mapping property.
this.accessionId = value;
}
+ /**
+ * Gets the value of the locus property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public boolean isLocus() {
+ if (locus == null) {
+ return false;
+ } else {
+ return locus;
+ }
+ }
+
+ /**
+ * Sets the value of the locus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setLocus(Boolean value) {
+ this.locus = value;
+ }
+
}
}
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2018.12.20 at 11:47:26 AM GMT
+// Generated on: 2019.06.07 at 02:21:15 PM BST
//
@javax.xml.bind.annotation.XmlSchema(namespace = "www.vamsas.ac.uk/jalview/version2", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
* transcript 'CDS' is 10-16, 17-21
* which is 'gene' 158-164, 210-214
*/
- MapList toMap = toLoci.getMap();
+ MapList toMap = toLoci.getMapping();
assertEquals(1, toMap.getFromRanges().size());
assertEquals(2, toMap.getFromRanges().get(0).length);
assertEquals(1, toMap.getFromRanges().get(0)[0]);
AlignmentUtils.transferGeneLoci(from, map, to);
assertEquals("GRCh38", toLoci.getAssemblyId());
assertEquals("7", toLoci.getChromosomeId());
- toMap = toLoci.getMap();
+ toMap = toLoci.getMapping();
assertEquals("[ [1, 12] ] 1:1 to [ [158, 164] [210, 214] ]",
toMap.toString());
}
import jalview.api.ViewStyleI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.GeneLocus;
import jalview.datamodel.HiddenSequences;
+import jalview.datamodel.Mapping;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.PDBEntry.Type;
import jalview.datamodel.SequenceCollectionI;
import jalview.schemes.StrandColourScheme;
import jalview.schemes.TCoffeeColourScheme;
import jalview.structure.StructureImportSettings;
+import jalview.util.MapList;
import jalview.util.matcher.Condition;
import jalview.viewmodel.AlignmentViewport;
.getAlignViewport(),
"Didn't restore correct view association for the PCA view");
}
+
+ /**
+ * Test save and reload of DBRefEntry including GeneLocus in project
+ *
+ * @throws Exception
+ */
+ @Test(groups = { "Functional" })
+ public void testStoreAndRecoverGeneLocus() throws Exception
+ {
+ Desktop.instance.closeAll_actionPerformed(null);
+ String seqData = ">P30419\nACDE\n>X1235\nGCCTGTGACGAA";
+ AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(seqData,
+ DataSourceType.PASTE);
+ assertNotNull(af, "Didn't read in the example file correctly.");
+
+ AlignmentViewPanel ap = Desktop.getAlignmentPanels(null)[0];
+ SequenceI pep = ap.getAlignment().getSequenceAt(0);
+ SequenceI cds = ap.getAlignment().getSequenceAt(1);
+
+ /*
+ * give 'protein' a dbref to self, a dbref with map to CDS,
+ * and a dbref with map to gene 'locus'
+ */
+ DBRefEntry dbref1 = new DBRefEntry("Uniprot", "1", "P30419", null);
+ pep.addDBRef(dbref1);
+ Mapping cdsmap = new Mapping(cds,
+ new MapList(new int[]
+ { 1, 4 }, new int[] { 1, 12 }, 1, 3));
+ DBRefEntry dbref2 = new DBRefEntry("EMBLCDS", "2", "X1235", cdsmap);
+ pep.addDBRef(dbref2);
+ Mapping locusmap = new Mapping(null,
+ new MapList(new int[]
+ { 1, 4 }, new int[] { 2674123, 2674135 }, 1, 3));
+ DBRefEntry dbref3 = new GeneLocus("human", "GRCh38", "5", locusmap);
+ pep.addDBRef(dbref3);
+
+ File tfile = File.createTempFile("testStoreAndRecoverGeneLocus",
+ ".jvp");
+ try
+ {
+ new Jalview2XML(false).saveState(tfile);
+ } catch (Throwable e)
+ {
+ Assert.fail("Didn't save the state", e);
+ }
+ Desktop.instance.closeAll_actionPerformed(null);
+
+ new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
+ DataSourceType.FILE);
+ AlignmentViewPanel rap = Desktop.getAlignmentPanels(null)[0];
+ SequenceI rpep = rap.getAlignment().getSequenceAt(0);
+ assertEquals(rpep.getName(), "P30419");
+ DBRefEntry[] dbrefs = rpep.getDBRefs();
+ assertEquals(dbrefs.length, 3);
+ DBRefEntry dbRef = dbrefs[0];
+ assertFalse(dbRef instanceof GeneLocus);
+ assertNull(dbRef.getMap());
+ assertEquals(dbRef, dbref1);
+
+ /*
+ * restored dbrefs with mapping have a different 'map to'
+ * sequence but otherwise match the original dbrefs
+ */
+ dbRef = dbrefs[1];
+ assertFalse(dbRef instanceof GeneLocus);
+ assertTrue(dbRef.equalRef(dbref2));
+ assertNotNull(dbRef.getMap());
+ SequenceI rcds = rap.getAlignment().getSequenceAt(1);
+ assertSame(dbRef.getMap().getTo(), rcds);
+ // compare MapList but not map.to
+ assertEquals(dbRef.getMap().getMap(), dbref2.getMap().getMap());
+
+ /*
+ * GeneLocus map.to is null so can compare Mapping objects
+ */
+ dbRef = dbrefs[2];
+ assertTrue(dbRef instanceof GeneLocus);
+ assertEquals(dbRef, dbref3);
+ }
}
else
{
internalHrefCount++;
+ String relFile = System.getProperty("os.name").indexOf("Win") > -1 ? href.replace("/", File.separator) : href;
File hrefFile = href.equals("") ? htmlFile : new File(htmlFolder,
href);
- if (hrefFile != htmlFile && !fileExists(hrefFile, href))
+ if (hrefFile != htmlFile && !fileExists(hrefFile, relFile))
{
badLink = true;
invalidInternalHrefCount++;