From: tcofoegbu Date: Mon, 28 Nov 2016 16:02:32 +0000 (+0000) Subject: Merge branch 'features/JAL-2326_JOptionPane-refactoring' into develop X-Git-Tag: Release_2_10_3b1~399^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=19424d4e1623bfcdcf30567f7a233fe81c4a9e4e;hp=5f4e1e4c330b045e9c8bce28ee132a0fca3834d8;p=jalview.git Merge branch 'features/JAL-2326_JOptionPane-refactoring' into develop --- diff --git a/.classpath b/.classpath index 6583992..8aef745 100644 --- a/.classpath +++ b/.classpath @@ -64,7 +64,7 @@ - + diff --git a/AUTHORS b/AUTHORS index f0b4787..1bfc734 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,15 +7,16 @@ or might otherwise be considered author of Jalview. The people listed below are 'The Jalview Authors', who collectively own the copyright to the Jalview source code and permit it to be released under GPL. -This is the authoritative list. It was correct on 6th Oct 2016. +This is the authoritative list. It was correct on 23rd November 2016. If you are releasing a version of Jalview, please make sure any statement of authorship in the GUI reflects the list shown here. In particular, check the resources/authors.props file ! Jim Procter -Andrew Waterhouse Mungo Carstairs Tochukwu 'Charles' Ofoegbu +Kira Mourao +Andrew Waterhouse Jan Engelhardt Lauren Lui Anne Menard diff --git a/RELEASE b/RELEASE index 702d6e7..9bc5817 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -jalview.release=Release_2_10_0_Branch -jalview.version=2.10.0b1 +jalview.release=releases/Release_2_10_1_Branch +jalview.version=2.10.1 diff --git a/THIRDPARTYLIBS b/THIRDPARTYLIBS index 85aa587..e0be904 100644 --- a/THIRDPARTYLIBS +++ b/THIRDPARTYLIBS @@ -13,7 +13,7 @@ ext.edu.ucsf.rbvi.strucviz2 includes sources originally developed by Scooter Mor Licensing information for each library is given below: JGoogleAnalytics_0.3.jar APL 2.0 License - http://code.google.com/p/jgoogleanalytics/ -Jmol-14.2.14_2015.06.11.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/ +Jmol-14.6.4_2016.10.26.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/ VARNAv3-93.jar GPL licenced software by K�vin Darty, Alain Denise and Yann Ponty. http://varna.lri.fr activation.jar apache-mime4j-0.6.jar diff --git a/appletlib/JmolApplet-14.2.14_2015.06.11.jar b/appletlib/JmolApplet-14.2.14_2015.06.11.jar deleted file mode 100644 index 5d6338c..0000000 Binary files a/appletlib/JmolApplet-14.2.14_2015.06.11.jar and /dev/null differ diff --git a/appletlib/JmolApplet-14.6.4_2016.10.26.jar b/appletlib/JmolApplet-14.6.4_2016.10.26.jar new file mode 100644 index 0000000..e5c312c Binary files /dev/null and b/appletlib/JmolApplet-14.6.4_2016.10.26.jar differ diff --git a/build.xml b/build.xml index 1d4878b..8d27614 100755 --- a/build.xml +++ b/build.xml @@ -128,7 +128,7 @@ - + @@ -700,6 +700,10 @@ + + + + @@ -724,8 +728,10 @@ + + diff --git a/examples/appletDeployment.html b/examples/appletDeployment.html index 7fcca00..7b4daee 100644 --- a/examples/appletDeployment.html +++ b/examples/appletDeployment.html @@ -33,7 +33,7 @@ Main Jalview Applet Jar - JmolApplet-14.2.14_2015.06.11.jar + JmolApplet-14.6.4_2016.10.26.jar Jmol Applet Jar @@ -48,7 +48,7 @@

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">
+<applet code="jalview.bin.JalviewLite" width="756" height="560" archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.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" />
diff --git a/examples/applets.html b/examples/applets.html
index 1f65565..d997f14 100644
--- a/examples/applets.html
+++ b/examples/applets.html
@@ -41,7 +41,7 @@ Try out JalviewLite by pressing one of the buttons below.
       
         
+   	archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar">  
 	
 	
 	
@@ -64,7 +64,7 @@ Try out JalviewLite by pressing one of the buttons below.
     
       
+   archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar">
 
 
 
@@ -89,7 +89,7 @@ Try out JalviewLite by pressing one of the buttons below.
     
       
+   archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar">
 
 
 
@@ -116,7 +116,7 @@ Try out JalviewLite by pressing one of the buttons below.
     
       
+   archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar">
 
 
 
@@ -147,7 +147,7 @@ Try out JalviewLite by pressing one of the buttons below.
     
       
+   archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar">
 
 
 
@@ -171,7 +171,7 @@ Try out JalviewLite by pressing one of the buttons below.
       
 
+   archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar">
 
 
 
diff --git a/examples/embedded.html b/examples/embedded.html
index 0d5ddf3..0cea17d 100644
--- a/examples/embedded.html
+++ b/examples/embedded.html
@@ -40,7 +40,7 @@
   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).

+ archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar"> diff --git a/examples/embeddedWJmol.html b/examples/embeddedWJmol.html index 501c20e..6fdcc07 100644 --- a/examples/embeddedWJmol.html +++ b/examples/embeddedWJmol.html @@ -211,7 +211,7 @@ jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"","ajaxPageState":
+archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar" width="0" height="0"> diff --git a/examples/linkedapplets_ng.html b/examples/linkedapplets_ng.html index 5890515..8ddfd2f 100644 --- a/examples/linkedapplets_ng.html +++ b/examples/linkedapplets_ng.html @@ -38,7 +38,7 @@ + code="jalview.bin.JalviewLite" width="800" height="300" id="jvapp" mayscript="True" scriptable="True" archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar"> @@ -61,7 +61,7 @@ + code="jalview.bin.JalviewLite" width="800" height="300" id="jvfollower" mayscript="True" scriptable="True" archive="jalviewApplet.jar,JmolApplet-14.6.4_2016.10.26.jar,java-json.jar,json_simple-1.1.jar"> diff --git a/help/help.jhm b/help/help.jhm index 407899e..e034fc2 100755 --- a/help/help.jhm +++ b/help/help.jhm @@ -22,7 +22,7 @@ - + diff --git a/help/helpTOC.xml b/help/helpTOC.xml index bf1710c..3a6b0b3 100755 --- a/help/helpTOC.xml +++ b/help/helpTOC.xml @@ -23,9 +23,6 @@ - - - diff --git a/help/html/features/chimera.html b/help/html/features/chimera.html index cbef2c1..5ae00af 100644 --- a/help/html/features/chimera.html +++ b/help/html/features/chimera.html @@ -73,7 +73,10 @@ When a selection is highlighted in a Jalview window, use the Select→Select Highlighted Region or press B to add the mapped positions to the alignment window's column - selection. + selection.
Hint: Use your machine's 'switch + application' key combination (Alt-Tab on Windows and Linux, + Cmd-Tab on OSX) to quickly switch between UCSF Chimera and Jalview + before pressing 'B' to select highlighted regions.

Basic screen operations (see Selecting regions from Search Results

- Press 'B' or select the Select Highlighted Columns option - from the alignment window's select menu to add columns containing + Press 'B' or use the Select Highlighted Columns option from + the alignment window's select menu to add columns containing highlighted search results to the alignment window's column - selection. + selection. Alt-'B' will add all but the highlighted columns, and + Ctrl (or Cmd) -B will toggle the column selection for the + highlighted region.

diff --git a/help/html/keys.html b/help/html/keys.html index b79ce4d..1a5fc18 100755 --- a/help/html/keys.html +++ b/help/html/keys.html @@ -169,16 +169,16 @@ columns are selected, you should use the H B Both - Mark the currently highlighted columns + Add highlighted columns to current column selection Alt 'B' Both - Mark all but the currently highlighted columns + Add all but the currently highlighted columns to current selection Control 'B' Both - Toggle the marks on the currently highlighted - columns (or all others if Alt is pressed) + Toggle the column selection marks for the currently highlighted + columns (or all others if Alt is also pressed) H diff --git a/help/html/releases.html b/help/html/releases.html index 2d0c4e8..6f44b3d 100755 --- a/help/html/releases.html +++ b/help/html/releases.html @@ -48,67 +48,151 @@

2.10.1
- 24/11/2016
+ 29/11/2016
- General -
    -
  • Improved memory usage: sparse arrays used for all consensus calculations
  • -
  • -
- Application -
    -
  • Sequence ID tool tips have been tamed (databases sorted alphabetically, abridged ID sets)
  • -
  • New replacement token for creating URLs just from database cross references. Users with custom links will receive a warning dialog asking them to update their preferences.
  • -
  • Cancel button and escape listener on dialog warning user about disconnecting Jalview from a Chimera session
  • -
  • Custom URL links for database cross-references are matched to database name regardless of case
  • -
  • - - -
- Applet + General
    +
  • + Improved memory usage: sparse arrays used + for all consensus calculations +
  • +
  • + Jmol updated to version 14.6.4 (released 3rd Oct 2016) +
  • +
  • Updated Jalview's Certum code signing certificate + for 2016-2017
- Build and deployment + Application
    -
  • +
  • + Sequence ID tool tip presents abridged + set of database cross-references, sorted alphabetically +
  • +
  • + New replacement token for creating URLs just + from database cross references. Users with custom links + will receive a warning + dialog asking them to update their preferences. +
  • +
  • + Cancel button and escape listener on + dialog warning user about disconnecting Jalview from a + Chimera session +
  • +
  • + Jalview's Chimera control window closes if + the Chimera it is connected to is shut down +
  • +
  • + New keystroke (B) and Select highlighted + columns menu item to mark columns containing + highlighted regions (e.g. from structure selections or results + of a Find operation) +
  • +
  • + Command line option for batch-generation + of HTML pages rendering alignment data with the BioJS + MSAviewer +
-
- +
General
    -
  • Columns with more than one modal residue are not coloured or thresholded according to percent identity (first observed in Jalview 2.8.2)
  • -
  • Threonine incorrectly reported as not hydrophobic
  • -
  • Updates to documentation pages (above PID threshold, amino acid properties)
  • -
  • Lower case residues in sequences are not reported as mapped to residues in a structure file in the View Mapping report
  • +
  • + Columns with more than one modal residue + are not coloured or thresholded according to percent + identity (first observed in Jalview 2.8.2) +
  • +
  • + Threonine incorrectly reported as not + hydrophobic +
  • +
  • + Updates to documentation pages (above PID + threshold, amino acid properties) +
  • +
  • + Lower case residues in sequences are not + reported as mapped to residues in a structure file in the + View Mapping report +
  • +
  • + Identical features with non-numeric scores + could be added multiple times to a sequence +
  • +
  • + Disulphide + bond features shown as two highlighted residues rather + than a range in linked structure views, and treated + correctly when selecting and computing trees from features +
  • +
  • + Custom URL links for database + cross-references are matched to database name regardless + of case +
  • +
Application
    -
  • Custom URL links for specific database names without regular expressions also offer invalid links from Sequence ID
  • -
  • Removing a single configured link in the URL links pane in Connections preferences doesn't actually update Jalview configuration
  • -
  • CTRL-Click on a selected region to open the alignment area popup menu doesn't work on El-Capitan
  • -
  • Jalview doesn't offer to associate mmCIF files with similarly named sequences if dropped onto the alignment
  • -
  • Additional mappings are shown for PDB entries where more chains exist in the PDB accession than are reported in the SIFTS file
  • -
  • Certain structures do not get mapped to the structure view when displayed with Chimera
  • -
  • No chains shown in the Chimera view panel's View->Show Chains submenu
  • - -
  • -
  • -
- Applet -
    -
- Build and deployment -
    -
  • Failing/passing unit tests
  • +
  • + Custom URL links for specific database + names without regular expressions also offer links from + Sequence ID +
  • +
  • + Removing a single configured link in the + URL links pane in Connections preferences doesn't actually + update Jalview configuration +
  • +
  • + CTRL-Click on a selected region to open + the alignment area popup menu doesn't work on El-Capitan +
  • +
  • + Jalview doesn't offer to associate mmCIF + files with similarly named sequences if dropped onto the + alignment +
  • +
  • + Additional mappings are shown for PDB + entries where more chains exist in the PDB accession than + are reported in the SIFTS file +
  • +
  • + Certain structures do not get mapped to + the structure view when displayed with Chimera +
  • +
  • + No chains shown in the Chimera view + panel's View->Show Chains submenu +
  • +
  • + Export as HTML with embedded SVG doesn't + work for wrapped alignment views +
  • +
  • + Rename UI components for running JPred + predictions from 'JNet' to 'JPred' +
  • +
  • + Export as PNG or SVG is + corrupted when annotation panel vertical scroll is not at + first annotation row +
  • +
  • + Attempting to view structure for Hen + lysozyme results in a PDB Client error dialog box +
- New Known Issues +
diff --git a/help/html/webServices/urllinks.html b/help/html/webServices/urllinks.html index 36c7c6b..088a539 100644 --- a/help/html/webServices/urllinks.html +++ b/help/html/webServices/urllinks.html @@ -66,10 +66,19 @@ the sequence ID for the sequence (since Jalview 2.10.1).

- If Jalview opens a project with links which include $SEQUENCE_ID$ tokens, it will present - the user with a warning message, as these links may need to be updated to use $DB_ACCESSION$, if - they were added before Jalview 2.10.1. The message lists the links which should be reviewed. - The warning can be turned off completely via a checkbox in the message dialog. + Warning dialog about updating + your configured URL links
In the desktop + prior to Jalview 2.10.1, the only way to configure custom links for + a particular database cross-reference for a sequence was to give it + a name that + exactly matched the database source, and a regular + expression for filtering out any spurious matches generated when the + custom linked was tested against the Sequence's ID string. Since the + introduction of the $DB_ACCESSION$ token, however, $SEQUENCE_ID$ + will not be used for database cross-reference accession strings, and + if you have custom links configured, Jalview will raise a warning + message so let you know that you may need to update your links to + use $DB_ACCESSION$.

Regular Expression Substitution
A url may diff --git a/help/html/whatsNew.html b/help/html/whatsNew.html index 448430d..1c20885 100755 --- a/help/html/whatsNew.html +++ b/help/html/whatsNew.html @@ -24,70 +24,55 @@

- What's new in Jalview 2.10.0b1 ? + What's new in Jalview 2.10.1 ?

- Jalview 2.10.0b1 is a patch release for 2.10, the next major release - in the Jalview 2 series. Full details are in the Jalview 2.10b1 Release - Notes, but the highlights are below. + Jalview 2.10.1 was released on 24th November 2016. Full details are + in the Jalview 2.10.1 + Release Notes, but the highlights are below. This is also the + first release to include contributions from Kira Mourão, who + joined Jalview's core development team in October 2016.

    -
  • Drag and drop reinstated for the Jalview desktop on - Windows, Linux and older OSX systems.
  • -
  • Problems loading local PDB files have been fixed
  • -
  • Conservation shading can be disabled for PID and consensus - based colour scheme
  • -
-

Major highlights of the 2.10.0 Release

-
    -
  • Ensembl sequence fetcher
    Annotated - Genes, transcripts and proteins can be retrieved via Jalview's new - Ensembl REST - client. Support for import of Ensembl data allows: -
      -
    • Aligned locus view
      Transcripts - retrieved for a gene identifier via the Ensembl or - EnsemblGenomes sequence databases are automatically aligned to - their reference genome, and introns hidden from the view.
    • -
    • Sequence variant data
      Jalview - propagates variant annotation on genomic regions onto - transcripts and protein products, complete with associated - metadata such as clinical significance.
    • -
  • -
  • Ensembl and ENA 'show cross-references' - support
    The Calculations menu's 'Show - cross-references' now offers Ensembl as well as EMBLCDS and - Uniprot when CDS/Protein mapping data is available for download or - display. This allows variant annotation to be added directly to an - alignment of UniProt sequences.
  • -
  • Working with structures -
      -
    • More accurate structure mappings
      - Jalview now utilises the PDBe's SIFTS database (at EMBL-EBI) - to match structures - to UniProt sequences, even for structures containing - multiple copies of a sequence.
    • -
    • Import structures as mmCIF
      Jalview - now downloads data from the EMBL-EBI's PDBe site as mmCIF. This allows very large - structures to be imported, such as the HIV virus capsid - assembly.
    • -
    • Chimera users will need to upgrade to - 1.11.1
      If you use Chimera to view structures - downloaded by Jalview 2.10, you will need to make sure you are - running the latest version of Chimera.
    • -
  • -
  • UniProt Free Text Search
    The new - search dialog for UniProt allows you to browse and retrieve - sequences with free-text search, or structured queries.
  • -
  • Reference sequence alignment view
    - Jalview 2.9 introduced support for reference sequences. In 2.10, - when a reference sequence is defined for the alignment, the - alignment column ruler is now numbered according to the reference - sequence. The reference sequence for alignment views can also be - saved and restored from Jalview projects.
  • +
  • More memory efficient
    We've slimmed + down the consensus analysis data structures used by Jalview so + even wider alignments can be worked with.
  • +
  • Select highlighted region
    Press 'B' + or use the new menu option in the alignment window's Select menu + to mark columns containing highlighted regions generated from + structure selections, mouse-overs, or resulting from a Find + operation.
  • +
  • New custom link mechanism for opening URLs + for database cross references.
    If you have customised URL + links in your Jalview preferences, then you may already have seen + the warning dialog (see below).
  • +
  • New command line export option for BioJS + MSAviewer
    A number of small bugs with the HTML export + functions from the Jalview desktop were also fixed.
  • +
  • Small but significant changes to the + physicochemical properties and consensus calculations
    Threonine + is no longer considered a non-hydrophobic residue in the protein + conservation calculation, and minor bugs addressed in PID and + consensus colouring.
  • +
  • Correct display of disulphide bond + features
    In linked structure views, Jalview would + highlight all residues between in addition to the two linked + cysteines. The 'select columns by feature' function in the feature + settings would also select all intermediate columns.
+

+ Warning dialog about updating + your configured URL links
In the desktop prior to Jalview + 2.10.1, the only way to configure custom links for a particular + database cross-reference for a sequence was to give it a name that exactly + matched the database source, and a regular expression for filtering + out any spurious matches generated when the custom linked was tested + against the Sequence's ID string. Since the introduction of the + $DB_ACCESSION$ token, however, $SEQUENCE_ID$ will not be used for + database cross-reference accession strings, and if you have custom + links configured, Jalview will raise a warning message so let you + know that you may need to update your links to use $DB_ACCESSION$. +

diff --git a/lib/Jmol-14.2.14_2015.06.11.jar b/lib/Jmol-14.2.14_2015.06.11.jar deleted file mode 100644 index 1470745..0000000 Binary files a/lib/Jmol-14.2.14_2015.06.11.jar and /dev/null differ diff --git a/lib/Jmol-14.6.4_2016.10.26.jar b/lib/Jmol-14.6.4_2016.10.26.jar new file mode 100644 index 0000000..1016c3f Binary files /dev/null and b/lib/Jmol-14.6.4_2016.10.26.jar differ diff --git a/nbproject/project.properties b/nbproject/project.properties index ac1a2e3..b569f55 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -59,8 +59,8 @@ file.reference.jalview-src=src file.reference.jaxrpc.jar=lib/jaxrpc.jar file.reference.JGoogleAnalytics_0.3.jar=lib/JGoogleAnalytics_0.3.jar file.reference.jhall.jar=lib/jhall.jar -file.reference.Jmol-14.2.14_2015.06.11.jar=lib/Jmol-14.2.14_2015.06.11.jar -file.reference.JmolApplet-14.2.14_2015.06.11.jar=appletlib/JmolApplet-14.2.14_2015.06.11.jar +file.reference.Jmol-14.6.4_2016.10.26.jar=lib/Jmol-14.6.4_2016.10.26.jar +file.reference.JmolApplet-14.6.4_2016.10.26.jar=appletlib/JmolApplet-14.6.4_2016.10.26.jar file.reference.log4j-1.2.8.jar=lib/log4j-1.2.8.jar file.reference.mail.jar=lib/mail.jar file.reference.min-jaba-client.jar=lib/min-jaba-client-2.0.jar @@ -92,7 +92,7 @@ javac.classpath=\ ${file.reference.jaxrpc.jar}:\ ${file.reference.JGoogleAnalytics_0.3.jar}:\ ${file.reference.jhall.jar}:\ - ${file.reference.Jmol-14.2.14_2015.06.11.jar}:\ + ${file.reference.Jmol-14.6.4_2016.10.26.jar}:\ ${file.reference.miglayout-4.0-swing.jar}:\ ${file.reference.log4j-1.2.8.jar}:\ ${file.reference.mail.jar}:\ @@ -101,7 +101,7 @@ javac.classpath=\ ${file.reference.xml-apis.jar}:\ ${file.reference.xercesImpl.jar}:\ ${file.reference.wsdl4j.jar}:\ - ${file.reference.JmolApplet-14.2.14_2015.06.11.jar} \ + ${file.reference.JmolApplet-14.6.4_2016.10.26.jar} \ ${file.reference.varna-3.9-dev.jar} # Space-separated list of extra javac options javac.compilerargs= diff --git a/resources/authors.props b/resources/authors.props index bcb07cf..3488ac6 100644 --- a/resources/authors.props +++ b/resources/authors.props @@ -1,4 +1,4 @@ YEAR=2016 -AUTHORS=J Procter, M Carstairs, TC Ofoegbu, AM Waterhouse, J Engelhardt, LM Lui, A Menard, D Barton, N Sherstnev, D Roldan-Martinez, M Clamp, S Searle, G Barton -AUTHORFNAMES=Jim Procter, Mungo Carstairs, Tochukwu 'Charles' Ofoegbu, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, Anne Menard, Daniel Barton, Natasha Sherstnev, David Roldan-Martinez, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton +AUTHORS=J Procter, M Carstairs, TC Ofoegbu, K Mourao, AM Waterhouse, J Engelhardt, LM Lui, A Menard, D Barton, N Sherstnev, D Roldan-Martinez, M Clamp, S Searle, G Barton +AUTHORFNAMES=Jim Procter, Mungo Carstairs, Tochukwu 'Charles' Ofoegbu, Kira Mourao, Andrew Waterhouse, Jan Engelhardt, Lauren Lui, Anne Menard, Daniel Barton, Natasha Sherstnev, David Roldan-Martinez, Michele Clamp, James Cuff, Steve Searle, David Martin & Geoff Barton \ No newline at end of file diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 9a58965..6360dc7 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -126,7 +126,7 @@ action.colour = Colour action.calculate = Calculate action.select_all = Select all action.select_highlighted_columns = Select Highlighted Columns -tooltip.select_highlighted_columns = Press B to mark highlighted columns, Ctrl-B to toggle, and Alt-B to mark all but highlighted columns +tooltip.select_highlighted_columns = Press B to mark highlighted columns, Ctrl-(or Cmd)-B to toggle, and Alt-B to mark all but highlighted columns action.deselect_all = Deselect all action.invert_selection = Invert selection action.using_jmol = Using Jmol diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 9c2436c..e5b5e27 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -122,6 +122,8 @@ action.change_font_tree_panel = Cambiar fuente (panel del action.colour = Color action.calculate = Calcular action.select_all = Seleccionar Todo +action.select_highlighted_columns = Seleccionar columnas resaltadas +tooltip.select_highlighted_columns = Presione B para marcar las columnas resaltadas, Ctrl (o Cmd)-B para cambiarlas, y Alt-B para marcar todas menos las columnas resaltadas action.deselect_all = Deseleccionar Todo action.invert_selection = Invertir selección action.using_jmol = Usar Jmol diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java index 95221d2..1d57a31 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java @@ -1,3 +1,35 @@ +/* vim: set ts=2: */ +/** + * Copyright (c) 2006 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions, and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Redistributions must acknowledge that this software was + * originally developed by the UCSF Computer Graphics Laboratory + * under support by the NIH National Center for Research Resources, + * grant P41-RR01081. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ package ext.edu.ucsf.rbvi.strucviz2; import java.awt.Color; diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java index fdcf34f..736e459 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraManager.java @@ -1,3 +1,35 @@ +/* vim: set ts=2: */ +/** + * Copyright (c) 2006 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions, and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Redistributions must acknowledge that this software was + * originally developed by the UCSF Computer Graphics Laboratory + * under support by the NIH National Center for Research Resources, + * grant P41-RR01081. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ package ext.edu.ucsf.rbvi.strucviz2; import jalview.ws.HttpClientUtils; diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraModel.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraModel.java index 7da7a48..d2f4b11 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraModel.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimeraModel.java @@ -1,3 +1,35 @@ +/* vim: set ts=2: */ +/** + * Copyright (c) 2006 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions, and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Redistributions must acknowledge that this software was + * originally developed by the UCSF Computer Graphics Laboratory + * under support by the NIH National Center for Research Resources, + * grant P41-RR01081. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ package ext.edu.ucsf.rbvi.strucviz2; import java.awt.Color; diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java index 6fd6340..effe556 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java @@ -1,3 +1,35 @@ +/* vim: set ts=2: */ +/** + * Copyright (c) 2006 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions, and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Redistributions must acknowledge that this software was + * originally developed by the UCSF Computer Graphics Laboratory + * under support by the NIH National Center for Research Resources, + * grant P41-RR01081. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ package ext.edu.ucsf.rbvi.strucviz2; import jalview.bin.Cache; diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/StructureSettings.java b/src/ext/edu/ucsf/rbvi/strucviz2/StructureSettings.java index 08a6cb7..77c1883 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/StructureSettings.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/StructureSettings.java @@ -1,3 +1,35 @@ +/* vim: set ts=2: */ +/** + * Copyright (c) 2006 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions, and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Redistributions must acknowledge that this software was + * originally developed by the UCSF Computer Graphics Laboratory + * under support by the NIH National Center for Research Resources, + * grant P41-RR01081. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ package ext.edu.ucsf.rbvi.strucviz2; /** diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java b/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java index 2b2ce48..379097c 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/port/ListenerThreads.java @@ -1,3 +1,35 @@ +/* vim: set ts=2: */ +/** + * Copyright (c) 2006 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions, and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Redistributions must acknowledge that this software was + * originally developed by the UCSF Computer Graphics Laboratory + * under support by the NIH National Center for Research Resources, + * grant P41-RR01081. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ package ext.edu.ucsf.rbvi.strucviz2.port; import java.io.BufferedReader; diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index 160224b..0c80c37 100644 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -843,9 +843,10 @@ public class APopupMenu extends java.awt.PopupMenu implements void addPDB() { - if (seq.getAllPDBEntries() != null) + Vector pdbs = seq.getAllPDBEntries(); + if (pdbs != null&& !pdbs.isEmpty()) { - PDBEntry entry = seq.getAllPDBEntries().firstElement(); + PDBEntry entry = pdbs.firstElement(); if (ap.av.applet.jmolAvailable) { diff --git a/src/jalview/appletgui/AppletJmolBinding.java b/src/jalview/appletgui/AppletJmolBinding.java index 3a36ed5..684d357 100644 --- a/src/jalview/appletgui/AppletJmolBinding.java +++ b/src/jalview/appletgui/AppletJmolBinding.java @@ -29,8 +29,6 @@ import jalview.structure.StructureSelectionManager; import java.awt.Container; import java.util.Map; -import javajs.awt.Dimension; - import org.jmol.api.JmolAppConsoleInterface; import org.jmol.console.AppletConsole; import org.jmol.java.BS; @@ -186,7 +184,7 @@ class AppletJmolBinding extends JalviewJmolBinding } @Override - public Dimension resizeInnerPanel(String data) + public int[] resizeInnerPanel(String data) { // TODO Auto-generated method stub return null; diff --git a/src/jalview/controller/AlignViewController.java b/src/jalview/controller/AlignViewController.java index 9451c3b..e9a0dbf 100644 --- a/src/jalview/controller/AlignViewController.java +++ b/src/jalview/controller/AlignViewController.java @@ -243,10 +243,6 @@ public class AlignViewController implements AlignViewControllerI SequenceFeature[] sfs = sq.getSequenceFeatures(); if (sfs != null) { - /* - * check whether the feature start/end (base 1) - * overlaps the selection start/end - */ int ist = sq.findIndex(sq.getStart()); int iend = sq.findIndex(sq.getEnd()); if (iend < startPosition || ist > endPosition) @@ -264,29 +260,54 @@ public class AlignViewController implements AlignViewControllerI // - findIndex wastes time by starting from first character and // counting - int i = sq.findIndex(sf.getBegin()); - int j = sq.findIndex(sf.getEnd()); - if (j < startPosition || i > endPosition) + int sfStartCol = sq.findIndex(sf.getBegin()); + int sfEndCol = sq.findIndex(sf.getEnd()); + + if (sf.isContactFeature()) + { + /* + * 'contact' feature - check for 'start' or 'end' + * position within the selected region + */ + if (sfStartCol >= startPosition + && sfStartCol <= endPosition) + { + bs.set(sfStartCol - 1); + sequenceHasFeature = true; + } + if (sfEndCol >= startPosition && sfEndCol <= endPosition) + { + bs.set(sfEndCol - 1); + sequenceHasFeature = true; + } + continue; + } + + /* + * contiguous feature - select feature positions (if any) + * within the selected region + */ + if (sfStartCol > endPosition || sfEndCol < startPosition) { // feature is outside selected region continue; } sequenceHasFeature = true; - if (i < startPosition) + if (sfStartCol < startPosition) { - i = startPosition; + sfStartCol = startPosition; } - if (i < ist) + if (sfStartCol < ist) { - i = ist; + sfStartCol = ist; } - if (j > endPosition) + if (sfEndCol > endPosition) { - j = endPosition; + sfEndCol = endPosition; } - for (; i <= j; i++) + for (; sfStartCol <= sfEndCol; sfStartCol++) { - bs.set(i - 1); // convert to base 0 + bs.set(sfStartCol - 1); // convert to base 0 } } } diff --git a/src/jalview/datamodel/Profile.java b/src/jalview/datamodel/Profile.java index 5464596..1501808 100644 --- a/src/jalview/datamodel/Profile.java +++ b/src/jalview/datamodel/Profile.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; diff --git a/src/jalview/datamodel/ProfileI.java b/src/jalview/datamodel/ProfileI.java index cf2b394..65a5c0d 100644 --- a/src/jalview/datamodel/ProfileI.java +++ b/src/jalview/datamodel/ProfileI.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; public interface ProfileI diff --git a/src/jalview/datamodel/Profiles.java b/src/jalview/datamodel/Profiles.java index 98a8c6d..f65830a 100644 --- a/src/jalview/datamodel/Profiles.java +++ b/src/jalview/datamodel/Profiles.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; public class Profiles implements ProfilesI diff --git a/src/jalview/datamodel/ProfilesI.java b/src/jalview/datamodel/ProfilesI.java index 6719de6..82398d9 100644 --- a/src/jalview/datamodel/ProfilesI.java +++ b/src/jalview/datamodel/ProfilesI.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; public interface ProfilesI diff --git a/src/jalview/datamodel/ResidueCount.java b/src/jalview/datamodel/ResidueCount.java index 0d0348c..3e3a966 100644 --- a/src/jalview/datamodel/ResidueCount.java +++ b/src/jalview/datamodel/ResidueCount.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; import jalview.util.Comparison; diff --git a/src/jalview/datamodel/SearchResultMatchI.java b/src/jalview/datamodel/SearchResultMatchI.java index 732f1dc..a47ca8b 100644 --- a/src/jalview/datamodel/SearchResultMatchI.java +++ b/src/jalview/datamodel/SearchResultMatchI.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; /** diff --git a/src/jalview/datamodel/SearchResultsI.java b/src/jalview/datamodel/SearchResultsI.java index 93183f2..52a0467 100644 --- a/src/jalview/datamodel/SearchResultsI.java +++ b/src/jalview/datamodel/SearchResultsI.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; import java.util.BitSet; diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index 0baa78e..15f54b9 100755 --- a/src/jalview/datamodel/SequenceFeature.java +++ b/src/jalview/datamodel/SequenceFeature.java @@ -532,4 +532,20 @@ public class SequenceFeature return s.hashCode() + getBegin() + getEnd() + (int) getScore() + getStrand(); } + + /** + * Answers true if the feature's start/end values represent two related + * positions, rather than ends of a range. Such features may be visualised or + * reported differently to features on a range. + */ + public boolean isContactFeature() + { + // TODO abstract one day to a FeatureType class + if ("disulfide bond".equalsIgnoreCase(type) + || "disulphide bond".equalsIgnoreCase(type)) + { + return true; + } + return false; + } } diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 56287a9..7a394f7 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -49,8 +49,6 @@ import java.util.List; import java.util.Map; import java.util.Vector; -import javajs.awt.Dimension; - import org.jmol.adapter.smarter.SmarterJmolAdapter; import org.jmol.api.JmolAppConsoleInterface; import org.jmol.api.JmolSelectionListener; @@ -1411,7 +1409,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel } @Override - public Dimension resizeInnerPanel(String data) + public int[] resizeInnerPanel(String data) { // Jalview doesn't honour resize panel requests return null; diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index b2ba256..180da8f 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -38,8 +38,6 @@ import java.util.List; import java.util.Map; import java.util.Vector; -import javajs.awt.Dimension; - import org.jmol.api.JmolStatusListener; import org.jmol.api.JmolViewer; import org.jmol.c.CBK; @@ -626,7 +624,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener * Not implemented - returns null */ @Override - public Dimension resizeInnerPanel(String data) + public int[] resizeInnerPanel(String data) { return null; } diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index dc1f95b..e61b042 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1299,8 +1299,8 @@ public class AlignmentPanel extends GAlignmentPanel implements if (onscreen || (idwidth = Cache.getIntegerProperty("FIGURE_FIXEDIDWIDTH")) == null) { - return (getIdPanel().getWidth() > 0 ? getIdPanel().getWidth() - : calculateIdWidth().width + 4); + int w = getIdPanel().getWidth(); + return (w > 0 ? w : calculateIdWidth().width + 4); } return idwidth.intValue() + 4; } @@ -1448,7 +1448,7 @@ public class AlignmentPanel extends GAlignmentPanel implements public void makePNGImageMap(File imgMapFile, String imageName) { - // /////ONLY WORKS WITH NONE WRAPPED ALIGNMENTS + // /////ONLY WORKS WITH NON WRAPPED ALIGNMENTS // //////////////////////////////////////////// int idWidth = getVisibleIdWidth(false); FontMetrics fm = getFontMetrics(av.getFont()); @@ -1462,7 +1462,6 @@ public class AlignmentPanel extends GAlignmentPanel implements { int s, sSize = av.getAlignment().getHeight(), res, alwidth = av .getAlignment().getWidth(), g, gSize, f, fSize, sy; - StringBuffer text = new StringBuffer(); PrintWriter out = new PrintWriter(new FileWriter(imgMapFile)); out.println(jalview.io.HTMLOutput.getImageMapHTML()); out.println(" res) { - text.append("
" + groups[g].getName() + ""); + text.append("
").append(groups[g].getName()) + .append(""); } } @@ -1521,12 +1522,13 @@ public class AlignmentPanel extends GAlignmentPanel implements { if (text.length() < 1) { - text.append("= seq.findPosition(res))) { - if (features[f].getType().equals("disulfide bond")) + if (features[f].isContactFeature()) { if (features[f].getBegin() == seq.findPosition(res) || features[f].getEnd() == seq .findPosition(res)) { - text.append("
disulfide bond " - + features[f].getBegin() + ":" - + features[f].getEnd()); + text.append("
").append(features[f].getType()) + .append(" ").append(features[f].getBegin()) + .append(":").append(features[f].getEnd()); } } else @@ -1554,13 +1556,13 @@ public class AlignmentPanel extends GAlignmentPanel implements && !features[f].getType().equals( features[f].getDescription())) { - text.append(" " + features[f].getDescription()); + text.append(" ").append(features[f].getDescription()); } if (features[f].getValue("status") != null) { - text.append(" (" + features[f].getValue("status") - + ")"); + text.append(" (").append(features[f].getValue("status")) + .append(")"); } } } diff --git a/src/jalview/io/JnetAnnotationMaker.java b/src/jalview/io/JnetAnnotationMaker.java index d5593e3..3feae5d 100755 --- a/src/jalview/io/JnetAnnotationMaker.java +++ b/src/jalview/io/JnetAnnotationMaker.java @@ -192,13 +192,13 @@ public class JnetAnnotationMaker if (id.equals("JNETCONF")) { annot = new AlignmentAnnotation(preds[i].getName(), - "JNet Output", annotations, 0f, 10f, + "JPred Output", annotations, 0f, 10f, AlignmentAnnotation.BAR_GRAPH); } else { annot = new AlignmentAnnotation(preds[i].getName(), - "JNet Output", annotations); + "JPred Output", annotations); } if (seqRef != null) diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index 850b1dc..6c8f40f 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -141,8 +141,7 @@ public class SequenceAnnotationReport void appendFeature(final StringBuilder sb, int rpos, Map minmax, SequenceFeature feature) { - String tmpString; - if (feature.getType().equals("disulfide bond")) + if (feature.isContactFeature()) { if (feature.getBegin() == rpos || feature.getEnd() == rpos) { @@ -150,7 +149,8 @@ public class SequenceAnnotationReport { sb.append("
"); } - sb.append("disulfide bond ").append(feature.getBegin()).append(":") + sb.append(feature.getType()).append(" ").append(feature.getBegin()) + .append(":") .append(feature.getEnd()); } } @@ -178,7 +178,7 @@ public class SequenceAnnotationReport if (feature.getDescription() != null && !feature.description.equals(feature.getType())) { - tmpString = feature.getDescription(); + String tmpString = feature.getDescription(); String tmp2up = tmpString.toUpperCase(); int startTag = tmp2up.indexOf(""); if (startTag > -1) @@ -223,11 +223,11 @@ public class SequenceAnnotationReport // check score should be shown if (!Float.isNaN(feature.getScore())) { - float[][] rng = (minmax == null) ? null : ((float[][]) minmax - .get(feature.getType())); + float[][] rng = (minmax == null) ? null : minmax.get(feature + .getType()); if (rng != null && rng[0] != null && rng[0][0] != rng[0][1]) { - sb.append(" Score=" + feature.getScore()); + sb.append(" Score=").append(String.valueOf(feature.getScore())); } } String status = (String) feature.getValue("status"); diff --git a/src/jalview/renderer/seqfeatures/FeatureRenderer.java b/src/jalview/renderer/seqfeatures/FeatureRenderer.java index b007365..9e0089f 100644 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@ -188,15 +188,20 @@ public class FeatureRenderer extends FeatureRendererModel } /** - * This is used by the Molecule Viewer and Overview to get the accurate colour - * of the rendered sequence + * This is used by Structure Viewers and the Overview Window to get the + * feature colour of the rendered sequence, returned as an RGB value + * + * @param defaultColour + * @param seq + * @param column + * @return */ - public synchronized int findFeatureColour(int initialCol, + public synchronized int findFeatureColour(int defaultColour, final SequenceI seq, int column) { if (!av.isShowSequenceFeatures()) { - return initialCol; + return defaultColour; } SequenceFeature[] sequenceFeatures = seq.getSequenceFeatures(); @@ -223,7 +228,7 @@ public class FeatureRenderer extends FeatureRendererModel if (lastSequenceFeatures == null || sfSize == 0) { - return initialCol; + return defaultColour; } if (jalview.util.Comparison.isGap(lastSeq.getCharAt(column))) @@ -244,7 +249,7 @@ public class FeatureRenderer extends FeatureRendererModel if (offscreenImage != null) { - offscreenImage.setRGB(0, 0, initialCol); + offscreenImage.setRGB(0, 0, defaultColour); drawSequence(offscreenImage.getGraphics(), lastSeq, column, column, 0); return offscreenImage.getRGB(0, 0); @@ -255,7 +260,7 @@ public class FeatureRenderer extends FeatureRendererModel if (currentColour == null) { - return initialCol; + return defaultColour; } else { @@ -275,6 +280,19 @@ public class FeatureRenderer extends FeatureRendererModel int epos; + /** + * Draws the sequence on the graphics context, or just determines the colour + * that would be drawn (if flag offscreenrender is true). + * + * @param g + * @param seq + * @param start + * start column (or sequence position in offscreenrender mode) + * @param end + * end column (not used in offscreenrender mode) + * @param y1 + * vertical offset at which to draw on the graphics + */ public synchronized void drawSequence(Graphics g, final SequenceI seq, int start, int end, int y1) { @@ -312,12 +330,10 @@ public class FeatureRenderer extends FeatureRendererModel } sfSize = lastSequenceFeatures.length; - String type; for (int renderIndex = 0; renderIndex < renderOrder.length; renderIndex++) { - type = renderOrder[renderIndex]; - - if (type == null || !showFeatureOfType(type)) + String type = renderOrder[renderIndex]; + if (!showFeatureOfType(type)) { continue; } @@ -332,16 +348,16 @@ public class FeatureRenderer extends FeatureRendererModel continue; } - if (featureGroups != null - && sequenceFeature.featureGroup != null - && sequenceFeature.featureGroup.length() != 0 - && featureGroups.containsKey(sequenceFeature.featureGroup) - && !featureGroups.get(sequenceFeature.featureGroup) - .booleanValue()) + if (featureGroupNotShown(sequenceFeature)) { continue; } + /* + * check feature overlaps the visible part of the alignment, + * unless doing offscreenRender (to the Overview window or a + * structure viewer) which is not limited + */ if (!offscreenRender && (sequenceFeature.getBegin() > epos || sequenceFeature .getEnd() < spos)) @@ -349,35 +365,43 @@ public class FeatureRenderer extends FeatureRendererModel continue; } + Color featureColour = getColour(sequenceFeature); + boolean isContactFeature = sequenceFeature.isContactFeature(); + if (offscreenRender && offscreenImage == null) { - if (sequenceFeature.begin <= start - && sequenceFeature.end >= start) + /* + * offscreen mode with no image (image is only needed if transparency + * is applied to feature colours) - just check feature is rendered at + * the requested position (start == sequence position in this mode) + */ + boolean featureIsAtPosition = sequenceFeature.begin <= start + && sequenceFeature.end >= start; + if (isContactFeature) + { + featureIsAtPosition = sequenceFeature.begin == start + || sequenceFeature.end == start; + } + if (featureIsAtPosition) { // this is passed out to the overview and other sequence renderers // (e.g. molecule viewer) to get displayed colour for rendered // sequence - currentColour = new Integer(getColour(sequenceFeature).getRGB()); + currentColour = new Integer(featureColour.getRGB()); // used to be retreived from av.featuresDisplayed // currentColour = av.featuresDisplayed // .get(sequenceFeatures[sfindex].type); } } - else if (sequenceFeature.type.equals("disulfide bond")) + else if (isContactFeature) { renderFeature(g, seq, seq.findIndex(sequenceFeature.begin) - 1, - seq.findIndex(sequenceFeature.begin) - 1, - getColour(sequenceFeature) - // new Color(((Integer) av.featuresDisplayed - // .get(sequenceFeatures[sfindex].type)).intValue()) - , start, end, y1); + seq.findIndex(sequenceFeature.begin) - 1, featureColour, + start, end, y1); renderFeature(g, seq, seq.findIndex(sequenceFeature.end) - 1, - seq.findIndex(sequenceFeature.end) - 1, - getColour(sequenceFeature) - // new Color(((Integer) av.featuresDisplayed - // .get(sequenceFeatures[sfindex].type)).intValue()) - , start, end, y1); + seq.findIndex(sequenceFeature.end) - 1, featureColour, + start, end, y1); } else if (showFeature(sequenceFeature)) @@ -388,19 +412,17 @@ public class FeatureRenderer extends FeatureRendererModel renderScoreFeature(g, seq, seq.findIndex(sequenceFeature.begin) - 1, seq.findIndex(sequenceFeature.end) - 1, - getColour(sequenceFeature), start, end, y1, + featureColour, start, end, y1, normaliseScore(sequenceFeature)); } else { renderFeature(g, seq, seq.findIndex(sequenceFeature.begin) - 1, seq.findIndex(sequenceFeature.end) - 1, - getColour(sequenceFeature), start, end, y1); + featureColour, start, end, y1); } } - } - } if (transparency != 1.0f && g != null) @@ -412,6 +434,24 @@ public class FeatureRenderer extends FeatureRendererModel } /** + * Answers true if the feature belongs to a feature group which is not + * currently displayed, else false + * + * @param sequenceFeature + * @return + */ + protected boolean featureGroupNotShown( + final SequenceFeature sequenceFeature) + { + return featureGroups != null + && sequenceFeature.featureGroup != null + && sequenceFeature.featureGroup.length() != 0 + && featureGroups.containsKey(sequenceFeature.featureGroup) + && !featureGroups.get(sequenceFeature.featureGroup) + .booleanValue(); + } + + /** * Called when alignment in associated view has new/modified features to * discover and display. * diff --git a/src/jalview/util/SparseCount.java b/src/jalview/util/SparseCount.java index e6b45f2..7fd9792 100644 --- a/src/jalview/util/SparseCount.java +++ b/src/jalview/util/SparseCount.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.util; import jalview.ext.android.SparseIntArray; diff --git a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index 4ac4804..c1ad465 100644 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@ -288,8 +288,12 @@ public abstract class FeatureRendererModel implements continue; } - if ((features[i].getBegin() <= res) - && (features[i].getEnd() >= res)) + // check if start/end are at res, and if not a contact feature, that res + // lies between start and end + if ((features[i].getBegin() == res || features[i].getEnd() == res) + || (!features[i].isContactFeature() + && (features[i].getBegin() < res) && (features[i] + .getEnd() >= res))) { tmp.add(features[i]); } @@ -564,9 +568,16 @@ public abstract class FeatureRendererModel implements return fc.isColored(sequenceFeature); } + /** + * Answers true if the feature type is currently selected to be displayed, + * else false + * + * @param type + * @return + */ protected boolean showFeatureOfType(String type) { - return av.getFeaturesDisplayed().isVisible(type); + return type == null ? false : av.getFeaturesDisplayed().isVisible(type); } @Override diff --git a/test/jalview/analysis/ConservationTest.java b/test/jalview/analysis/ConservationTest.java index 5d21672..fb58655 100644 --- a/test/jalview/analysis/ConservationTest.java +++ b/test/jalview/analysis/ConservationTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.analysis; import static org.testng.Assert.assertEquals; diff --git a/test/jalview/analysis/FinderTest.java b/test/jalview/analysis/FinderTest.java index bae98c5..e215b6b 100644 --- a/test/jalview/analysis/FinderTest.java +++ b/test/jalview/analysis/FinderTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.analysis; import static org.testng.Assert.assertEquals; diff --git a/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java b/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java index 2b48032..1da23ea 100644 --- a/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java +++ b/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java @@ -28,6 +28,8 @@ import jalview.gui.JvOptionPane; import jalview.io.FileLoader; import jalview.io.FormatAdapter; +import java.util.Arrays; + import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -147,4 +149,45 @@ public class FeatureScoreModelTest + "(" + s + ") should still be distinct from FER1_MAIZE (3)"); } } + + /** + * Check findFeatureAt doesn't return contact features except at contact + * points TODO:move to under the FeatureRendererModel test suite + */ + @Test(groups = { "Functional" }) + public void testFindFeatureAt_PointFeature() throws Exception + { + String alignment = "a CCCCCCGGGGGGCCCCCC\n" + "b CCCCCCGGGGGGCCCCCC\n" + + "c CCCCCCGGGGGGCCCCCC\n"; + AlignFrame af = new jalview.io.FileLoader(false) + .LoadFileWaitTillLoaded(alignment, FormatAdapter.PASTE); + SequenceI aseq = af.getViewport().getAlignment().getSequenceAt(0); + SequenceFeature sf = null; + sf = new SequenceFeature("disulphide bond", "", 2, 5, Float.NaN, ""); + aseq.addSequenceFeature(sf); + Assert.assertTrue(sf.isContactFeature()); + af.refreshFeatureUI(true); + af.getFeatureRenderer().setAllVisible(Arrays.asList("disulphide bond")); + Assert.assertEquals(af.getFeatureRenderer().getDisplayedFeatureTypes() + .size(), 1, "Should be just one feature type displayed"); + // step through and check for pointwise feature presence/absence + Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtRes(aseq, 1) + .size(), 0); + // step through and check for pointwise feature presence/absence + Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtRes(aseq, 2) + .size(), 1); + // step through and check for pointwise feature presence/absence + Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtRes(aseq, 3) + .size(), 0); + // step through and check for pointwise feature presence/absence + Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtRes(aseq, 4) + .size(), 0); + // step through and check for pointwise feature presence/absence + Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtRes(aseq, 5) + .size(), 1); + // step through and check for pointwise feature presence/absence + Assert.assertEquals(af.getFeatureRenderer().findFeaturesAtRes(aseq, 6) + .size(), 0); + } + } diff --git a/test/jalview/controller/AlignViewControllerTest.java b/test/jalview/controller/AlignViewControllerTest.java index 7ac1452..f8ea142 100644 --- a/test/jalview/controller/AlignViewControllerTest.java +++ b/test/jalview/controller/AlignViewControllerTest.java @@ -55,10 +55,10 @@ public class AlignViewControllerTest @Test(groups = "Functional") public void testFindColumnsWithFeature() { - SequenceI seq1 = new Sequence("seq1", "aMMMaaaaaaaaaaaaaaaa"); - SequenceI seq2 = new Sequence("seq2", "aaaMMMMMMMaaaaaaaaaa"); - SequenceI seq3 = new Sequence("seq3", "aaaaaaaaaaMMMMMaaaaa"); - SequenceI seq4 = new Sequence("seq3", "aaaaaaaaaaaaaaaaaaaa"); + SequenceI seq1 = new Sequence("seq1", "-a-MMMaaaaaaaaaaaaaaaa"); + SequenceI seq2 = new Sequence("seq2", "aa--aMM-MMMMMaaaaaaaaaa"); + SequenceI seq3 = new Sequence("seq3", "abcab-caD-aaMMMMMaaaaa"); + SequenceI seq4 = new Sequence("seq4", "abc--abcaaaaaaaaaaaaaa"); /* * features start/end are base 1 @@ -71,13 +71,16 @@ public class AlignViewControllerTest null)); seq3.addSequenceFeature(new SequenceFeature("Metal", "desc", 11, 15, 0f, null)); + // disulfide bond is a 'contact feature' - only select its 'start' and 'end' + seq3.addSequenceFeature(new SequenceFeature("disulfide bond", "desc", 8, 12, + 0f, null)); /* - * select the first three columns --> Metal in seq1 2-3 + * select the first five columns --> Metal in seq1 cols 4-5 */ SequenceGroup sg = new SequenceGroup(); sg.setStartRes(0); // base 0 - sg.setEndRes(2); + sg.setEndRes(4); sg.addSequence(seq1, false); sg.addSequence(seq2, false); sg.addSequence(seq3, false); @@ -88,36 +91,37 @@ public class AlignViewControllerTest bs); assertEquals(1, seqCount); assertEquals(2, bs.cardinality()); - assertTrue(bs.get(1)); - assertTrue(bs.get(2)); + assertTrue(bs.get(3)); // base 0 + assertTrue(bs.get(4)); /* - * select the first four columns: Metal in seq1 2:4, seq2 4:4 + * select the first seven columns: Metal in seq1 cols 4-6, seq2 cols 6-7 */ - sg.setEndRes(3); + sg.setEndRes(6); bs.clear(); seqCount = AlignViewController.findColumnsWithFeature("Metal", sg, bs); assertEquals(2, seqCount); - assertEquals(3, bs.cardinality()); - assertTrue(bs.get(1)); - assertTrue(bs.get(2)); + assertEquals(4, bs.cardinality()); assertTrue(bs.get(3)); + assertTrue(bs.get(4)); + assertTrue(bs.get(5)); + assertTrue(bs.get(6)); /* - * select column 11: Metal in seq3 only + * select column 14: Metal in seq3 only */ - sg.setStartRes(10); - sg.setEndRes(10); + sg.setStartRes(13); + sg.setEndRes(13); bs.clear(); seqCount = AlignViewController.findColumnsWithFeature("Metal", sg, bs); assertEquals(1, seqCount); assertEquals(1, bs.cardinality()); - assertTrue(bs.get(10)); + assertTrue(bs.get(13)); /* - * select columns 16-20: no Metal feature + * select columns 18-20: no Metal feature */ - sg.setStartRes(15); + sg.setStartRes(17); sg.setEndRes(19); bs.clear(); seqCount = AlignViewController.findColumnsWithFeature("Metal", sg, bs); @@ -125,6 +129,30 @@ public class AlignViewControllerTest assertEquals(0, bs.cardinality()); /* + * columns 11-13 should not match disulfide bond at 8/12 + */ + sg.setStartRes(10); + sg.setEndRes(12); + bs.clear(); + seqCount = AlignViewController.findColumnsWithFeature("disulfide bond", + sg, bs); + assertEquals(0, seqCount); + assertEquals(0, bs.cardinality()); + + /* + * columns 6-18 should match disulfide bond at columns 9, 14 + */ + sg.setStartRes(5); + sg.setEndRes(17); + bs.clear(); + seqCount = AlignViewController.findColumnsWithFeature("disulfide bond", + sg, bs); + assertEquals(1, seqCount); + assertEquals(2, bs.cardinality()); + assertTrue(bs.get(8)); + assertTrue(bs.get(13)); + + /* * look for a feature that isn't there */ sg.setStartRes(0); diff --git a/test/jalview/datamodel/ResidueCountTest.java b/test/jalview/datamodel/ResidueCountTest.java index ac3ee69..4eb6dbf 100644 --- a/test/jalview/datamodel/ResidueCountTest.java +++ b/test/jalview/datamodel/ResidueCountTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.datamodel; import static org.testng.Assert.assertEquals; diff --git a/test/jalview/datamodel/SequenceFeatureTest.java b/test/jalview/datamodel/SequenceFeatureTest.java index e87d7e5..2da8918 100644 --- a/test/jalview/datamodel/SequenceFeatureTest.java +++ b/test/jalview/datamodel/SequenceFeatureTest.java @@ -208,4 +208,24 @@ public class SequenceFeatureTest sf1.setStatus("new"); assertTrue(sf1.equals(sf2)); } + + @Test(groups = { "Functional" }) + public void testIsContactFeature() + { + SequenceFeature sf = new SequenceFeature("type", "desc", 22, 33, 12.5f, + "group"); + assertFalse(sf.isContactFeature()); + sf.setType(""); + assertFalse(sf.isContactFeature()); + sf.setType(null); + assertFalse(sf.isContactFeature()); + sf.setType("Disulfide Bond"); + assertTrue(sf.isContactFeature()); + sf.setType("disulfide bond"); + assertTrue(sf.isContactFeature()); + sf.setType("Disulphide Bond"); + assertTrue(sf.isContactFeature()); + sf.setType("disulphide bond"); + assertTrue(sf.isContactFeature()); + } } diff --git a/test/jalview/ext/android/SparseIntArrayTest.java b/test/jalview/ext/android/SparseIntArrayTest.java index 2da45ed..d9ed73d 100644 --- a/test/jalview/ext/android/SparseIntArrayTest.java +++ b/test/jalview/ext/android/SparseIntArrayTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.ext.android; import static org.testng.Assert.assertEquals; diff --git a/test/jalview/ext/android/SparseShortArrayTest.java b/test/jalview/ext/android/SparseShortArrayTest.java index 2a89e65..034368f 100644 --- a/test/jalview/ext/android/SparseShortArrayTest.java +++ b/test/jalview/ext/android/SparseShortArrayTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.ext.android; import static org.testng.Assert.assertEquals; diff --git a/test/jalview/schemes/ResidueColourSchemeTest.java b/test/jalview/schemes/ResidueColourSchemeTest.java index 12a5491..d3a4fff 100644 --- a/test/jalview/schemes/ResidueColourSchemeTest.java +++ b/test/jalview/schemes/ResidueColourSchemeTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.schemes; import static org.testng.AssertJUnit.assertEquals; diff --git a/test/jalview/util/FormatTest.java b/test/jalview/util/FormatTest.java index 24cb573..1404f0b 100644 --- a/test/jalview/util/FormatTest.java +++ b/test/jalview/util/FormatTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.util; import static org.testng.Assert.assertEquals; diff --git a/test/jalview/util/PlatformTest.java b/test/jalview/util/PlatformTest.java index 1f7db54..307f450 100644 --- a/test/jalview/util/PlatformTest.java +++ b/test/jalview/util/PlatformTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.util; import static org.testng.Assert.assertFalse; diff --git a/test/jalview/util/SparseCountTest.java b/test/jalview/util/SparseCountTest.java index 4c5b55b..c4d67b6 100644 --- a/test/jalview/util/SparseCountTest.java +++ b/test/jalview/util/SparseCountTest.java @@ -1,3 +1,23 @@ +/* + * 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 . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.util; import static org.testng.Assert.assertEquals; diff --git a/utils/InstallAnywhere/Jalview.iap_xml b/utils/InstallAnywhere/Jalview.iap_xml index fc799bb..bf6eb0d 100755 --- a/utils/InstallAnywhere/Jalview.iap_xml +++ b/utils/InstallAnywhere/Jalview.iap_xml @@ -1245,7 +1245,7 @@ and any path to a file to save to the file]]> - + false @@ -1263,7 +1263,7 @@ and any path to a file to save to the file]]> true - + 5417196 @@ -3846,7 +3846,7 @@ Press "Done" to quit the installer.]]> true - + 10 @@ -3883,7 +3883,7 @@ Press "Done" to quit the installer.]]> true - + 10 @@ -3954,10 +3954,10 @@ Press "Done" to quit the installer.]]> true - true + false - + 10 @@ -3994,7 +3994,7 @@ Press "Done" to quit the installer.]]> true - + 10 @@ -4102,7 +4102,7 @@ Press "Done" to quit the installer.]]> true - + 10 @@ -4173,7 +4173,7 @@ Press "Done" to quit the installer.]]> true - + 10