From: gmungoc
Date: Mon, 19 Sep 2016 16:56:18 +0000 (+0100)
Subject: Merge branch 'develop' into features/JAL-2094_colourInterface
X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=refs%2Fheads%2Ffeatures%2FJAL-2094_colourInterface;hp=d737688dfdb8d00ed63a699fb86548499d75bcf2
Merge branch 'develop' into features/JAL-2094_colourInterface
Conflicts:
src/jalview/api/FeatureColourI.java
src/jalview/api/FeatureRenderer.java
src/jalview/appletgui/FeatureColourChooser.java
src/jalview/appletgui/FeatureRenderer.java
src/jalview/appletgui/FeatureSettings.java
src/jalview/appletgui/SeqCanvas.java
src/jalview/appletgui/SequenceRenderer.java
src/jalview/appletgui/UserDefinedColours.java
src/jalview/ext/ensembl/EnsemblGene.java
src/jalview/gui/FeatureColourChooser.java
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/Jalview2XML.java
src/jalview/gui/SeqCanvas.java
src/jalview/gui/TreeCanvas.java
src/jalview/io/FeaturesFile.java
src/jalview/io/PDBFeatureSettings.java
src/jalview/renderer/seqfeatures/FeatureRenderer.java
src/jalview/schemes/FeatureColour.java
src/jalview/schemes/FeatureColourAdapter.java
src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java
src/jalview/viewmodel/seqfeatures/FeatureRendererSettings.java
src/jalview/ws/jws1/SeqSearchWSThread.java
src/jalview/ws/jws2/AADisorderClient.java
test/jalview/io/FeaturesFileTest.java
test/jalview/schemes/FeatureColourTest.java
---
diff --git a/.checkstyle b/.checkstyle
new file mode 100644
index 0000000..0329bb7
--- /dev/null
+++ b/.checkstyle
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.xml b/build.xml
index 57cd9d2..184596c 100755
--- a/build.xml
+++ b/build.xml
@@ -27,7 +27,9 @@
-
+
+
+
@@ -88,6 +90,9 @@
+
+
+
@@ -374,7 +379,7 @@
-
@@ -382,7 +387,7 @@
-
+
@@ -516,7 +521,7 @@
-
+
@@ -611,16 +616,16 @@
-
-
+
+
-
-
-
+
+
+
@@ -637,7 +642,7 @@
-
+
@@ -649,14 +654,14 @@
-
+
-
-
+
+
-Click here to view decorated page
+Click here to view decorated page
- Notes on applet deployment
-
-
- **NEW FEATURES** in Jalview 2.9
+ Notes on applet deployment
+
+
+To run Jalview applet in your web page download the Jars listed above. The snippet below shows a minimal code for embedding Jalview applet into a web page.
+
+<applet code="jalview.bin.JalviewLite" width="756" height="560" archive="jalviewApplet.jar,JmolApplet-14.2.14_2015.06.11.jar,java-json.jar,json_simple-1.1.jar">
+ <param name="permissions" value="sandbox" />
+ <param name="file" value="plantfdx.fa" />
+ <param name="features" value="plantfdx.features" />
+ <param name="userDefinedColour" value="C=yellow; R,K,H=FF5555; D,E=5555FF" />
+ <param name="showFullId" value="false" />
+ <param name="embedded" value="true" />
+ <param name="linkLabel_1" value="Uniprot" />
+ <param name="linkUrl_1" value="http://www.uniprot.org/uniprot/$SEQUENCE_ID$" />
+ <param name="linkLabel_2" value="EMBL-EBI Search" />
+ <param name="linkUrl_2" value="http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$" />
+ <param name="APPLICATION_URL" value="http://www.jalview.org/services/launchApp" />
+</applet>
+
+
+
+
+
+
+
+
+ Applet Release History
+
+ Release
+
+ New Features / required changes
+
+
+ 2.9 (Latest)
+
Split Views for cDNA and Protein alignments Specify second alignment with 'file2' parameter, and set cDNA/Protein column scaling with scaleProteinAsCdna
@@ -54,9 +107,11 @@
archive="jalviewApplet.jar,JmolApplet-14.2.14_2015.06.11.jar,java-json.jar,json_simple-1.1.jar "
-
- **NEW FEATURES** in Jalview 2.8
-
+
+
+ 2.8
+
Normalised sequence logo display
RNA secondary structure annotation row
@@ -71,9 +126,11 @@
original Jalview structure viewer will still be available.
-
- **NEW FEATURES** in Jalview 2.7
-
+
+
+ 2.7
+
Javascript callbacks capabilitiesoninit parameter and methods for registering javascript handlers for selections, mouseovers and linking to Jmol applets on the page.
To use javascript callbacks, ensure the applet tag includes the 'mayscript ' attribute - either as a parameter (<param name="mayscript" value="true"/;gt;) or as a bare attribute in the applet html tag).
@@ -86,13 +143,17 @@
the Jmol binary distribution available at the Jmol Sourceforge site,
or download the Jmol applet from here
Minimum recommended version of Java runtime for the applet is now 1.5 (JalviewLite v2.6 without the Jmol viewer may work ok on earlier Java environments but compatibility can no-longer be guaranteed).
-
- **NEW FEATURES** in Jalview 2.5
-
- New parameters to control display of tree annotation, width of alignment columns, and to disable the jalview button and check for Jmol on startup.
-
- **NEW FEATURES** in Jalview 2.4
-
+
+
+ 2.5
+
+ New parameters to control display of tree annotation, width of alignment columns, and to disable the jalview button and check for Jmol on startup.
+
+
+
+ 2.4
+
New applet API methods for feature display control, views, and obtaining current selection via javascript.
Group show and hide parameters:
"showfeaturegroups" and
@@ -104,9 +165,11 @@
"debug" parameter to control verbosity of the applet's console output.
"showbutton" parameter to disable launch button and open JalviewLite immediatly.
"nojmol" parameter to disable check for Jmol classes.
-
- **NEW FEATURES** in Jalview 2.3
-
+
+
+ 2.3
+
Note that Parameter "PDBFile" now takes
the PDB file followed by a space separated list of alignment sequence
ids to associate the structure to. It is also possible to associate
@@ -126,11 +189,12 @@
Note parameter "PDBSeq" is no longer required.
Jalview 2.3 was updated to work with Jmol 11. See the versions archive if you want to download the old Jmol applet .
-
-
-
- **NEW FEATURES** in Jalview 2.1
-
+
+
+ 2.1
+
Jalview Applet can read and display JNet secondary structure annotation
directly via the jnetfile parameter.
@@ -158,5 +222,9 @@
<param name="sequence2" value="FER1_PEA/14-29 TSFLRTQPMPMSVTTT">
(All the usual Jalview File formats are valid, however each
new line in an alignment file must be entered as a parameter)
-
+
+
+
+
+
diff --git a/examples/appletParameters.html b/examples/appletParameters.html
index 433f5a9..cc95ecb 100644
--- a/examples/appletParameters.html
+++ b/examples/appletParameters.html
@@ -28,7 +28,7 @@ which are described below . Once initialised,
the applet can be interacted with via its
Javascript API .
Issues arising from tightening of Java Security default settings JalviewLite is provided as a signed applet with 'sandbox' permissions and wildcards that allow it to be run from any website. Unfortunately, earlier versions of Java may not be compatible with these settings.
- For additional deployment notes, see below .
+ For additional deployment notes, see Applet Deployment .
Applet Parameters The applet takes the following initialisation parameters.
diff --git a/examples/applets.html b/examples/applets.html
index 34118b8..1f65565 100644
--- a/examples/applets.html
+++ b/examples/applets.html
@@ -22,19 +22,14 @@
-
JalviewLite Button Examples
-Try out JalviewLite by pressing one of the buttons below.
- For more information on how to use the applet in your website, see the applet parameters and other documentation in the links to the left.
+Try out JalviewLite by pressing one of the buttons below.
+ View the source for the examples below here (If the link doesn't work on your browser try going to this page and viewing the page source manually).
+ For more information on how to use the applet in your website, see the applet deployment, applet parameters, and other documentation in the links to the left.
Ferredoxins, chloroplast precursor related UniRef50
diff --git a/examples/embedded.html b/examples/embedded.html
index aa67325..0d5ddf3 100644
--- a/examples/embedded.html
+++ b/examples/embedded.html
@@ -23,9 +23,6 @@
@@ -40,6 +37,7 @@
plantfdx.annotations -
Jalview Alignment Annotations File
+
View the source code for this example here (If the link doesn't work on your browser try going to
this page and viewing the page source manually).
diff --git a/examples/embeddedWJmol.html b/examples/embeddedWJmol.html
index f629312..1ecff58 100644
--- a/examples/embeddedWJmol.html
+++ b/examples/embeddedWJmol.html
@@ -260,11 +260,7 @@ jmolInitialize("","JmolApplet-14.2.14_2015.06.11.jar");
modeltofiles+="1gaq.txt";
diff --git a/examples/exampleFeatures.txt b/examples/exampleFeatures.txt
index b7038f5..7c8d26c 100755
--- a/examples/exampleFeatures.txt
+++ b/examples/exampleFeatures.txt
@@ -28,73 +28,74 @@ ST-MOTIF label|||0|0
#ac25a1
STARTGROUP uniprot
+Pfam family FER_CAPAA -1 0 0 Pfam
Iron-sulfur (2Fe-2S) FER_CAPAA -1 39 39 METAL
Iron-sulfur (2Fe-2S) FER_CAPAA -1 44 44 METAL
Iron-sulfur (2Fe-2S) FER_CAPAA -1 47 47 METAL
Iron-sulfur (2Fe-2S) FER_CAPAA -1 77 77 METAL
-Fer2 Status: True Positive Pfam 8_8 FER_CAPAA -1 8 83 Pfam
+Fer2 Status: True Positive Pfam 8_8 FER_CAPAA -1 8 83 Pfam
Ferredoxin_fold Status: True Positive FER_CAPAA -1 3 93 Cath
Iron-sulfur (2Fe-2S) FER_CAPAN -1 86 86 METAL
Iron-sulfur (2Fe-2S) FER_CAPAN -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER_CAPAN -1 94 94 METAL
Iron-sulfur (2Fe-2S) FER_CAPAN -1 124 124 METAL
-Fer2 Status: True Positive Pfam 55_13 FER_CAPAN -1 55 130 Pfam
+Fer2 Status: True Positive Pfam 55_13 FER_CAPAN -1 55 130 Pfam
Ferredoxin_fold Status: True Positive FER_CAPAN -1 45 140 Cath
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 86 86 METAL
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 94 94 METAL
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 124 124 METAL
-Fer2 Status: True Positive Pfam 55_13 FER1_SOLLC -1 55 130 Pfam
+Fer2 Status: True Positive Pfam 55_13 FER1_SOLLC -1 55 130 Pfam
Ferredoxin_fold Status: True Positive FER1_SOLLC -1 45 140 Cath
-Fer2 Status: True Positive Pfam 55_13 Q93XJ9_SOLTU -1 55 130 Pfam
+Fer2 Status: True Positive Pfam 55_13 Q93XJ9_SOLTU -1 55 130 Pfam
Ferredoxin_fold Status: True Positive Q93XJ9_SOLTU -1 45 140 Cath
Iron-sulfur (2Fe-2S) FER1_PEA -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER1_PEA -1 96 96 METAL
Iron-sulfur (2Fe-2S) FER1_PEA -1 99 99 METAL
Iron-sulfur (2Fe-2S) FER1_PEA -1 129 129 METAL
-Fer2 Status: True Positive Pfam 60_13 FER1_PEA -1 60 135 Pfam
+Fer2 Status: True Positive Pfam 60_13 FER1_PEA -1 60 135 Pfam
Ferredoxin_fold Status: True Positive FER1_PEA -1 50 145 Cath
-Fer2 Status: True Positive Pfam 63_13 Q7XA98_TRIPR -1 63 138 Pfam
+Fer2 Status: True Positive Pfam 63_13 Q7XA98_TRIPR -1 63 138 Pfam
Ferredoxin_fold Status: True Positive Q7XA98_TRIPR -1 53 148 Cath
Iron-sulfur (2Fe-2S) FER1_MESCR -1 90 90 METAL
Iron-sulfur (2Fe-2S) FER1_MESCR -1 95 95 METAL
Iron-sulfur (2Fe-2S) FER1_MESCR -1 98 98 METAL
Iron-sulfur (2Fe-2S) FER1_MESCR -1 128 128 METAL
-Fer2 Status: True Positive Pfam 59_13 FER1_MESCR -1 59 134 Pfam
+Fer2 Status: True Positive Pfam 59_13 FER1_MESCR -1 59 134 Pfam
Ferredoxin_fold Status: True Positive FER1_MESCR -1 49 144 Cath
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 89 89 METAL
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 94 94 METAL
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 97 97 METAL
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 127 127 METAL
-Fer2 Status: True Positive Pfam 58_13 FER1_SPIOL -1 58 133 Pfam
+Fer2 Status: True Positive Pfam 58_13 FER1_SPIOL -1 58 133 Pfam
Ferredoxin_fold Status: True Positive FER1_SPIOL -1 48 143 Cath
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 39 39 METAL
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 44 44 METAL
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 47 47 METAL
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 77 77 METAL
-Fer2 Status: True Positive Pfam 8_8 FER3_RAPSA -1 8 83 Pfam
+Fer2 Status: True Positive Pfam 8_8 FER3_RAPSA -1 8 83 Pfam
Ferredoxin_fold Status: True Positive FER3_RAPSA -1 3 93 Cath
Iron-sulfur (2Fe-2S) FER_BRANA -1 39 39 METAL
Iron-sulfur (2Fe-2S) FER_BRANA -1 44 44 METAL
Iron-sulfur (2Fe-2S) FER_BRANA -1 47 47 METAL
Iron-sulfur (2Fe-2S) FER_BRANA -1 77 77 METAL
-Fer2 Status: True Positive Pfam 8_8 FER_BRANA -1 8 83 Pfam
+Fer2 Status: True Positive Pfam 8_8 FER_BRANA -1 8 83 Pfam
Ferredoxin_fold Status: True Positive FER_BRANA -1 2 96 Cath
Iron-sulfur (2Fe-2S) FER2_ARATH -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER2_ARATH -1 96 96 METAL
Iron-sulfur (2Fe-2S) FER2_ARATH -1 99 99 METAL
Iron-sulfur (2Fe-2S) FER2_ARATH -1 129 129 METAL
-Fer2 Status: True Positive Pfam 60_13 FER2_ARATH -1 60 135 Pfam
+Fer2 Status: True Positive Pfam 60_13 FER2_ARATH -1 60 135 Pfam
Ferredoxin_fold Status: True Positive FER2_ARATH -1 50 145 Cath
-Fer2 Status: True Positive Pfam 60_11 Q93Z60_ARATH -1 60 118 Pfam
+Fer2 Status: True Positive Pfam 60_11 Q93Z60_ARATH -1 60 118 Pfam
Ferredoxin_fold Status: True Positive Q93Z60_ARATH -1 52 118 Cath
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 96 96 METAL
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 99 99 METAL
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 129 129 METAL
-Fer2 Status: True Positive Pfam 60_13 FER1_MAIZE -1 60 135 Pfam
+Fer2 Status: True Positive Pfam 60_13 FER1_MAIZE -1 60 135 Pfam
Ferredoxin_fold Status: True Positive FER1_MAIZE -1 50 145 Cath
-Fer2 Status: True Positive Pfam 52_12 O80429_MAIZE -1 52 127 Pfam
+Fer2 Status: True Positive Pfam 52_12 O80429_MAIZE -1 52 127 Pfam
Ferredoxin_fold Status: True Positive O80429_MAIZE -1 42 137 Cath
ENDGROUP uniprot
diff --git a/examples/formComplete.html b/examples/formComplete.html
index 91d94f8..9e89990 100644
--- a/examples/formComplete.html
+++ b/examples/formComplete.html
@@ -24,9 +24,7 @@
@@ -35,7 +33,7 @@
Using the Javascript API to fill out forms using data from JalviewLite
Click the Javascript buttons below to interact with the Applet
instance on the page.
-View the source in your browser to see how it has been done.
+ View the source here to see how it has been done (If the link doesn't work on your browser try going to this page and viewing the page source manually).
View the full JalviewLite API documentation .
diff --git a/examples/groovy/featureCounter.groovy b/examples/groovy/featureCounter.groovy
index 08d038d..a16d8bb 100644
--- a/examples/groovy/featureCounter.groovy
+++ b/examples/groovy/featureCounter.groovy
@@ -5,8 +5,15 @@ import jalview.workers.AlignmentAnnotationFactory;
* Example script that registers two alignment annotation calculators
* - one that counts residues in a column with Pfam annotation
* - one that counts only charged residues with Pfam annotation
- * Modify this example as required to count by column any desired value that can be
- * derived from the residue and sequence features at each position of an alignment.
+ *
+ * To try:
+ * 1. load uniref50.fa from the examples folder
+ * 2. load features onto it from from examples/exampleFeatures.txt
+ * 3. Open this script in the Groovy console.
+ * 4. Either execute this script from the console, or via Calculate->Run Groovy Script
+
+ * To explore further, try changing this script to count other kinds of occurrences of
+ * residue and sequence features at columns in an alignment.
*/
/*
@@ -42,14 +49,15 @@ def hasPfam = { features ->
}
/*
- * Closure that counts residues with a Pfam feature annotation
+ * Closure that computes an annotation based on
+ * presence of particular residues and features
* Parameters are
* - the name (label) for the alignment annotation
* - the description (tooltip) for the annotation
* - a closure (groovy function) that tests whether to include a residue
* - a closure that tests whether to increment count based on sequence features
*/
-def getColumnCounter = { name, desc, residueTester, featureCounter ->
+def getColumnCounter = { name, desc, acceptResidue, acceptFeatures ->
[
getName: { name },
getDescription: { desc },
@@ -58,9 +66,9 @@ def getColumnCounter = { name, desc, residueTester, featureCounter ->
count:
{ res, feats ->
def c = 0
- if (residueTester.call(res))
+ if (acceptResidue.call(res))
{
- if (featureCounter.call(feats))
+ if (acceptFeatures.call(feats))
{
c++
}
@@ -71,12 +79,12 @@ def getColumnCounter = { name, desc, residueTester, featureCounter ->
}
/*
- * Define annotation that counts any residue with Pfam domain annotation
+ * Define an annotation row that counts any residue with Pfam domain annotation
*/
def pfamAnnotation = getColumnCounter("Pfam", "Count of residues with Pfam domain annotation", {true}, hasPfam)
/*
- * Define annotation that counts charged residues with Pfam domain annotation
+ * Define an annotation row that counts charged residues with Pfam domain annotation
*/
def chargedPfamAnnotation = getColumnCounter("Pfam charged", "Count of charged residues with Pfam domain annotation", isCharged, hasPfam)
diff --git a/examples/groovy/printtitle.groovy b/examples/groovy/printtitle.groovy
index 813df63..b3387ea 100644
--- a/examples/groovy/printtitle.groovy
+++ b/examples/groovy/printtitle.groovy
@@ -19,14 +19,17 @@
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
// do something groovy in jalview
-print "Hello World.\n";
-def alf = Jalview.getAlignFrames();
+println "Hello World.\n"
+println "First sequence is " + currentAlFrame.viewport.alignment.getSequenceAt(0).getDisplayId(true)
+
+def alf = Jalview.getAlignFrames()
for (ala in alf)
{
// ala is an jalview.gui.AlignFrame object
- print ala.getTitle()+"\n";
+ println ala.getTitle()
// get the parent jalview.datamodel.Alignment from the alignment viewport
- def alignment = ala.viewport.alignment;
+ def alignment = ala.viewport.alignment
// get the first sequence from the jalview.datamodel.Alignment object
- def seq = alignment.getSequenceAt(0);
+ def seq = alignment.getSequenceAt(0)
}
+Jalview.quit()
diff --git a/examples/javascriptLaunch.html b/examples/javascriptLaunch.html
index e161ad6..35b1d81 100644
--- a/examples/javascriptLaunch.html
+++ b/examples/javascriptLaunch.html
@@ -21,12 +21,7 @@
@@ -120,7 +115,7 @@ archive="jalviewApplet.jar,JmolApplet-14.2.14_2015.06.11.jar,java-json.jar,json_
-Javascript Launch Button The button below demonstrates how JalviewLite can be launched via a javascript action.
+Javascript Launch Button The button below demonstrates how JalviewLite can be launched via a javascript action. View the source here to see how it has been done (If the link doesn't work on your browser try going to this page and viewing the page source manually).
diff --git a/examples/linkedapplets_ng.html b/examples/linkedapplets_ng.html
index 0449c0b..5890515 100644
--- a/examples/linkedapplets_ng.html
+++ b/examples/linkedapplets_ng.html
@@ -22,9 +22,7 @@
@@ -36,7 +34,7 @@
JalviewLite Linked Applets Demo
The two applets below use JalviewLite's javascript API to exchange events about the currently selected region and mouse position in the alignment.
-
+ View the source here to see how it has been done (If the link doesn't work on your browser try going to this page and viewing the page source manually).
Description: Fer2 Status: True Positive Pfam 8_83