From: Jim Procter
Date: Wed, 19 Jun 2019 10:13:59 +0000 (+0100)
Subject: Merge branch 'develop' into releases/Release_2_11_Branch
X-Git-Tag: Release_2_11_0~7
X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=26a4dfe581da93351c44436473ad4965bb1f261a;hp=ec0ae2c16b0434d9ff3041f01a486c0c7ef20a9c;p=jalview.git
Merge branch 'develop' into releases/Release_2_11_Branch
---
diff --git a/build.gradle b/build.gradle
index 9f00d2b..f5149da 100644
--- a/build.gradle
+++ b/build.gradle
@@ -471,13 +471,20 @@ task convertBuildingMD(type: Exec) {
def buildingMD = "$jalviewDir/$docDir/building.md"
def css = "$jalviewDir/$docDir/github.css"
- def pandoc = pandoc_exec
+ def pandoc = null
+ pandoc_exec.split(",").each {
+ if (file(it.trim()).exists()) {
+ pandoc = it.trim()
+ return true
+ }
+ }
+
def hostname = "hostname".execute().text.trim()
- if (! file(pandoc).exists() && hostname.equals("jv-bamboo")) {
+ if ((pandoc == null || ! file(pandoc).exists()) && hostname.equals("jv-bamboo")) {
pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
}
- if (file(pandoc).exists()) {
+ if (pandoc != null && file(pandoc).exists()) {
commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
} else {
commandLine "true"
diff --git a/gradle.properties b/gradle.properties
index f5c6f49..08bcbd7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -109,6 +109,6 @@ JSIGN_SH = echo
eclipse_extra_jdt_prefs_file = .settings/org.eclipse.jdt.core.jalview.prefs
-pandoc_exec = /usr/local/bin/pandoc
+pandoc_exec = /usr/local/bin/pandoc,/usr/bin/pandoc
dev = false
diff --git a/help/help/html/calculations/pca.html b/help/help/html/calculations/pca.html
index 3529cae..3bf21cb 100755
--- a/help/help/html/calculations/pca.html
+++ b/help/help/html/calculations/pca.html
@@ -70,7 +70,7 @@
nucleotide substitution matrix, or by sequence percentage identity,
or sequence feature similarity.
-
+
The PCA Viewer
@@ -84,7 +84,9 @@
towards the front of the view.
The 3d view can be rotated by dragging the mouse with the left
- mouse button pressed. The view can also be zoomed in and out with
+ mouse button pressed, or with the arrow
+ keys when SHIFT is pressed. The
+ view can also be zoomed in and out with
the up and down arrow keys (and the roll bar of the
mouse if present). Labels will be shown for each sequence if the
entry in the View menu is checked, and the plot background colour
@@ -122,7 +124,7 @@ left-clicking and dragging the mouse over the display. -->
Initially, the display shows the first three components of the
similarity space, but any eigenvector can be used by changing the
- selected dimension for the x, y, or z axis through each ones menu
+ selected dimension for the x, y, or z axis through each one's menu
located below the 3d display. The Reset
button will reset axis and rotation settings to their defaults.
@@ -131,7 +133,7 @@ left-clicking and dragging the mouse over the display. -->
The output of points and transformed point coordinates was
added to the Jalview desktop in v2.7. The Reset button
and Change Parameters menu were added in Jalview 2.8. Support
- for PAM250 based PCA was added in Jalview 2.8.1.
+ for PAM250 based PCA was added in Jalview 2.8.1.In Jalview 2.11, support for saving and restoring PCAs in Project files was added, and the Change parameters menu removed.
Reproducing PCA calculations performed with older
diff --git a/help/help/html/calculations/pcaviewer.gif b/help/help/html/calculations/pcaviewer.gif
deleted file mode 100644
index 78c82f2..0000000
Binary files a/help/help/html/calculations/pcaviewer.gif and /dev/null differ
diff --git a/help/help/html/calculations/pcaviewer.png b/help/help/html/calculations/pcaviewer.png
new file mode 100644
index 0000000..7dc5b80
Binary files /dev/null and b/help/help/html/calculations/pcaviewer.png differ
diff --git a/help/help/html/calculations/treeviewer.html b/help/help/html/calculations/treeviewer.html
index 8cb2b59..f326f19 100755
--- a/help/help/html/calculations/treeviewer.html
+++ b/help/help/html/calculations/treeviewer.html
@@ -42,16 +42,17 @@
alignment, such as another tree viewer.
- Grouping sequences by partitioning the
- tree at a particular distance
Clicking anywhere along
- the extent of the tree (but not on a leaf or internal node) defines
- a tree 'partition', by cutting every branch of the tree spanning the
- depth where the mouse-click occurred. Groups are created containing
- sequences at the leaves of each connected sub tree. These groups are
- each given a different colour, which are reflected in other windows
- in the same way as if the sequence IDs were selected, and can be
- edited in the same way as user defined sequence groups.
-
+ Grouping
+ sequences by partitioning the tree at a particular distance
+ Clicking anywhere along the extent of the tree (but not on a leaf or
+ internal node) defines a tree 'partition', by cutting every branch of
+ the tree spanning the depth where the mouse-click occurred. A red line
+ will be shown where the partition was made, and groups are created
+ containing sequences at the leaves of each connected sub tree. These
+ groups are each given a different colour, which are reflected in other
+ windows in the same way as if the sequence IDs were selected, and can
+ be edited in the same way as user defined sequence groups.
+
Tree partitions are useful for comparing clusters produced by
different methods and measures. They are also an effective way of
diff --git a/help/help/html/releases.html b/help/help/html/releases.html
index 8cebf4f..dfc159b 100755
--- a/help/help/html/releases.html
+++ b/help/help/html/releases.html
@@ -162,8 +162,8 @@ li:before {
when in wrapped mode
- Can select columns by dragging left/right in
- annotations
+ Can select columns by dragging left/right in a graph or histogram
+ annotation
Help button on Uniprot and PDB search panels
@@ -177,9 +177,11 @@ li:before {
popup menu
- Sequence Details report opens positioned to top
- of report
-
+ Red line indicating tree-cut position not shown if no subgroups are created
+
+ Removed ability to configure length of search history by right-clicking search box
+
+
Java 11 Support
@@ -199,9 +201,19 @@ li:before {
DAS sequence retrieval and annotation
capabilities removed from the Jalview Desktop
+
+ Castor library for XML marshalling and
+ unmarshalling has been replaced by JAXB for Jalview projects
+ and XML based data retrieval clients
+ Disable VAMSAS menu in preparation for removal
Jalview Desktop no longer distributed via Java Web Start
-
- Development and Release Processes
+ Documentation
+
+ -
+ Added remarks about transparent rendering effects
+ not supported in EPS figure export
+
+
Development and Release Processes
-
Jalview Native Application and
@@ -222,134 +234,221 @@ li:before {
gradle-eclipse
-
- Atlassian Bamboo continuous integration server for
+ Atlassian Bamboo continuous integration for
unattended Test Suite execution
-
Memory test suite to detect leaks in common
operations
-
- IntervalStoreJ (new updatable NCList
- implementation) used for Sequence Feature collections
- -
- Castor library for XML marshalling and
- unmarshalling has been replaced by JAXB for Jalview projects
- and XML based data retrieval clients
+ IntervalStoreJ (NCList
+ implementation that alows updates) used for Sequence Feature collections
+ - More unit test coverage, and minor issues resolved.
-
-
- -
- Timeouts when retrieving data from Ensembl
- -
- 'View [Structure] Mappings' and structure superposition in Jmol fail on Windows
- -
- Text misaligned in EPS or SVG image export with monospaced font
- -
- Warning of 'Duplicate entry' when saving
- Jalview project involving multiple views
- -
- Overview for complementary view in a linked
- CDS/Protein alignment is not updated when Hide Columns by
- Annotation dialog hides columns
- -
- Selection highlighting in the complement of
- a CDS/Protein alignment stops working after making a
- selection in one view, then making another selection in the
- other view
- -
- Annotations tooltip changes beyond visible columns
- -
- Table Columns could be re-ordered in
- Feature Settings and Jalview Preferences panels
- -
- Jalview hangs when closing windows
- or the overview updates with large alignments
- -
- Tree and PCA calculation fails for selected
- region if columns were selected by dragging right-to-left
- and the mouse moved to the left of the first column
- -
- Couldn't hide selected columns adjacent
- to a hidden column marker via scale popup menu
- -
- Error message for trying to load in invalid
- URLs doesn't tell users the invalid URL
- -
- Nonpositional features lose feature group
- on export as Jalview features file
- -
- Blank extra columns drawn or
- printed when columns are hidden
- -
- Regular expression error for '(' in Select Columns by Annotation description
- -
- Scroll doesn't stop on mouse up after
- dragging out of Scale or Annotation Panel
- -
- Column selection incorrect after scrolling out of scale panel
- -
- Left/right drag in annotation can scroll alignment down
- -
- Error if mouse moved before clicking Reveal in scale panel
- -
- Column display is out by one after Page Down, Page Up in wrapped mode
- -
- Finder doesn't skip hidden regions
- -
- Finder searches in minimised alignments
- -
- 'Apply Colour to All Groups' not always selected on
- opening an alignment
- -
- 'Colour by Annotation' not marked selected in Colour menu
- -
- Per-group Clustal colour scheme changes when
- different groups in the alignment are selected
- -
- Internationalised colour scheme names not shown correctly in menu
- -
- Colour by Annotation can go black at min/max threshold limit
- -
- Value input for graduated feature colour threshold gets 'unrounded'
- -
- PCA image export doesn't respect background colour
- -
- PCA points don't dim when rotated about y axis
- -
- PCA Print dialog continues after Cancel
- -
- Cancel in Tree Font dialog resets alignment, not Tree font
- -
- Associate Tree with All Views not restored from project file
- -
- Scrolling of split frame is sluggish if Overview shown in complementary view
- -
- stop_gained variants not shown correctly on peptide sequence
- -
- Help page can be opened twice
-
- Editing
-
- -
- Start and End should be updated when
- sequence data at beginning or end of alignment added/removed
- via 'Edit' sequence
- -
- Delete/Cut selection doesn't relocate
- sequence features correctly when start of sequence is
- removed (Known defect since 2.10)
-
- New Known Defects
-
- -
- Input Data menu entry is greyed out when PCA View is restored from a Jalview 2.11 project
- -
- Alignment panel height can be too small after 'New View'
- -
- Display is incorrect after removing gapped columns within hidden columns
-
- |
-
+
+
+ -
+ Timeouts when retrieving data from Ensembl
+
+ -
+ 'View [Structure] Mappings' and structure
+ superposition in Jmol fail on Windows
+
+ -
+ Blank error dialog is displayed when discovering
+ structures for sequences with lots of PDB structures
+
+ -
+ Text misaligned in EPS or SVG image export with
+ monospaced font
+
+ -
+ Warning of 'Duplicate entry' when saving Jalview
+ project involving multiple views
+
+ -
+ Overview for complementary view in a linked
+ CDS/Protein alignment is not updated when Hide Columns by
+ Annotation dialog hides columns
+
+ -
+ Selection highlighting in the complement of a
+ CDS/Protein alignment stops working after making a selection in
+ one view, then making another selection in the other view
+
+ -
+ Annotations tooltip changes beyond visible
+ columns
+
+ -
+ Table Columns could be re-ordered in Feature
+ Settings and Jalview Preferences panels
+
+ -
+ Jalview hangs when closing windows or the
+ overview updates with large alignments
+
+ -
+ Tree and PCA calculation fails for selected
+ region if columns were selected by dragging right-to-left and the
+ mouse moved to the left of the first column
+
+ -
+ Couldn't hide selected columns adjacent to a
+ hidden column marker via scale popup menu
+
+ -
+ Error message for trying to load in invalid URLs
+ doesn't tell users the invalid URL
+
+ -
+ Nonpositional features lose feature group on
+ export as Jalview features file
+
+ -
+ 'Graduated colour' option not offered for
+ manually created features (where if feature score is Float.NaN)
+
+ -
+ Blank extra columns drawn or printed
+ when columns are hidden
+
+ -
+ Regular expression error for '(' in Select
+ Columns by Annotation description
+
+ -
+ Scroll doesn't stop on mouse up after dragging
+ out of Scale or Annotation Panel
+
+ -
+ Column selection incorrect after scrolling out of
+ scale panel
+
+ -
+ Left/right drag in annotation can scroll
+ alignment down
+
+ -
+ Error if mouse moved before clicking Reveal in
+ scale panel
+
+ -
+ Column display is out by one after Page Down,
+ Page Up in wrapped mode
+
+ -
+ Finder doesn't skip hidden regions
+
+ -
+ Finder searches in minimised alignments
+
+ -
+ 'Apply Colour to All Groups' not always selected
+ on opening an alignment
+
+ -
+ 'Colour by Annotation' not marked selected in
+ Colour menu
+
+ -
+ Per-group Clustal colour scheme changes when
+ different groups in the alignment are selected
+
+ -
+ Internationalised colour scheme names not shown
+ correctly in menu
+
+ -
+ Colour by Annotation can go black at min/max
+ threshold limit
+
+ -
+ Value input for graduated feature colour
+ threshold gets 'unrounded'
+
+ -
+ PCA image export doesn't respect background
+ colour
+
+ -
+ PCA points don't dim when rotated about y axis
+
+ -
+ PCA Print dialog continues after Cancel
+
+ -
+ Cancel in Tree Font dialog resets alignment, not
+ Tree font
+
+ -
+ Associate Tree with All Views not restored from
+ project file
+
+ -
+ Scrolling of split frame is sluggish if Overview
+ shown in complementary view
+
+ -
+ stop_gained variants not shown correctly on
+ peptide sequence
+
+ -
+ Sequence Details report opens positioned to top
+ of report
+
+ -
+ Help page can be opened twice
+
+ Editing
+
+ -
+ Start and End should be updated when sequence
+ data at beginning or end of alignment added/removed via 'Edit'
+ sequence
+
+ -
+ Delete/Cut selection doesn't
+ relocate sequence features correctly when start of sequence is
+ removed (Known defect since 2.10)
+
+ -
+ Inserting gap sequence via the Edit Sequence
+ dialog corrupts dataset sequence
+
+ -
+ Codon consensus logo incorrectly scaled when
+ shown without normalisation
+
+
+ New Known Defects
+
+ -
+ Input Data menu entry is greyed out when PCA View
+ is restored from a Jalview 2.11 project
+
+ -
+ Alignment panel height can be too small after
+ 'New View'
+
+ -
+ Display is incorrect after removing gapped
+ columns within hidden columns
+
+ -
+ Rightmost selection is lost when mouse re-enters
+ window after dragging left to select columns to left of visible
+ region
+
+ -
+ Features coloured according to their description
+ string and thresholded by score in earlier versions of Jalview are
+ not shown as thresholded features in 2.11. To workaround please
+ create a Score filter instead.
+
+
+ |
+
@@ -555,6 +654,11 @@ li:before {
Improved performance when rendering lots
of features (particularly when transparency is disabled)
+
+ Experimental features in 2.10.2 for
+ exchange of Jalview features and Chimera attributes made
+ generally available
+
|
@@ -1428,6 +1532,15 @@ li:before {
User defined gap colour not shown in
overview when features overlaid on alignment
+
+ Feature settings for different views not
+ recovered correctly from Jalview project file
+
+
+ Feature colours in overview when first opened
+ (automatically via preferences) are different to the main
+ alignment panel
+
Data import/export
diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties
index f095290..d2d8e88 100644
--- a/resources/lang/Messages.properties
+++ b/resources/lang/Messages.properties
@@ -1226,9 +1226,6 @@ label.structure_chooser_filter_time = Structure Chooser - Filter time ({0})
label.structure_chooser_no_of_structures = Structure Chooser - {0} Found ({1})
info.no_pdb_entry_found_for = No PDB entry found for {0}
exception.unable_to_detect_internet_connection = Jalview is unable to detect an internet connection
-exception.fts_rest_service_no_longer_available = {0} rest services no longer available!
-exception.resource_not_be_found = The requested resource could not be found
-exception.fts_server_error = There seems to be an error from the {0} server
exception.fts_server_unreachable = Jalview is unable to reach the {0} server. \nPlease ensure that you are connected to the internet and try again.
label.nw_mapping = Needleman & Wunsch Alignment
label.sifts_mapping = SIFTs Mapping
@@ -1245,8 +1242,6 @@ action.next_page= >>
action.prev_page= <<
label.next_page_tooltip=Next Page
label.prev_page_tooltip=Previous Page
-exception.bad_request=Bad request. There is a problem with your input.
-exception.service_not_available=Service not available. The server is being updated, try again later.
status.launching_3d_structure_viewer = Launching 3D Structure viewer...
status.fetching_3d_structures_for_selected_entries = Fetching 3D Structures for selected entries...
status.fetching_dbrefs_for_sequences_without_valid_refs = Fetching db refs for {0} sequence(s) without valid db ref required for SIFTS mapping
diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties
index ec7eb5d..e9e18ce 100644
--- a/resources/lang/Messages_es.properties
+++ b/resources/lang/Messages_es.properties
@@ -1200,7 +1200,6 @@ tooltip.rnalifold_settings=Modificar la configuraci
label.show_selected_annotations=Mostrar anotaciones seleccionadas
status.colouring_chimera=Coloreando Chimera
label.configure_displayed_columns=Configurar Columnas Mostradas
-exception.resource_not_be_found=El recurso solicitado no se ha encontrado
label.aacon_calculations=cálculos AACon
label.pdb_web-service_error=Error de servicio web PDB
exception.unable_to_detect_internet_connection=Jalview no puede detectar una conexión a Internet
@@ -1225,13 +1224,10 @@ exception.fts_server_unreachable=Jalview no puede conectar con el servidor {0}.
exception.outofmemory_loading_mmcif_file=Sin memoria al cargar el fichero mmCIF
label.hide_columns_not_containing=Ocultar las columnas que no contengan
label.pdb_sequence_fetcher=Recuperador de secuencias PDB
-exception.fts_server_error=Parece que hay un error desde el servidor {0}
-exception.service_not_available=Servicio no disponible. El servidor se está actualizando, vuelva a intentarlo más tarde.
status.waiting_for_user_to_select_output_file=Esperando que el usuario seleccione el fichero {0}
action.prev_page=<<
status.cancelled_image_export_operation=Operación de exportación {0} cancelada
label.couldnt_run_groovy_script=No se ha podido ejecutar el script Groovy
-exception.bad_request=Solicitud incorrecta. Hay un problema con su entrada.
label.run_groovy=Ejecutar script Groovy desde la consola
action.next_page=>>
label.uniprot_sequence_fetcher=Recuperador de secuencias UniProt
@@ -1247,7 +1243,6 @@ label.next_page_tooltip=P
label.sifts_mapping=Mapeado SIFTs
label.mapping_method=Método de mapeo de secuencia \u27F7 estructura
info.error_creating_file=Error al crear fichero {0}
-exception.fts_rest_service_no_longer_available= Servicios Rest {0} ya no están disponibles!
status.launching_3d_structure_viewer=Lanzando visualizador de estructura 3D...
status.obtaining_mapping_with_sifts=Obteniendo mapeo por SIFTS
status.fetching_3d_structures_for=Buscando la estructura 3D para {0}
diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java
index e4f2dfa..f1d5e79 100755
--- a/src/jalview/analysis/AAFrequency.java
+++ b/src/jalview/analysis/AAFrequency.java
@@ -531,7 +531,7 @@ public class AAFrequency
for (int col = 0; col < cols; col++)
{
// todo would prefer a Java bean for consensus data
- Hashtable columnHash = new Hashtable();
+ Hashtable columnHash = new Hashtable<>();
// #seqs, #ungapped seqs, counts indexed by (codon encoded + 1)
int[] codonCounts = new int[66];
codonCounts[0] = alignment.getSequences().size();
@@ -551,6 +551,7 @@ public class AAFrequency
{
codonCounts[codonEncoded + 2]++;
ungappedCount++;
+ break;
}
}
}
diff --git a/src/jalview/commands/EditCommand.java b/src/jalview/commands/EditCommand.java
index b9d32f7..aae72d6 100644
--- a/src/jalview/commands/EditCommand.java
+++ b/src/jalview/commands/EditCommand.java
@@ -838,7 +838,7 @@ public class EditCommand implements CommandI
// old ds and edited ds are different, so
// create the new dataset sequence
SequenceI newds = new Sequence(oldds);
- newds.setSequence(fullseq);
+ newds.setSequence(fullseq.toUpperCase());
if (command.oldds == null)
{
diff --git a/src/jalview/fts/core/FTSRestClient.java b/src/jalview/fts/core/FTSRestClient.java
index f94d455..8b1c785 100644
--- a/src/jalview/fts/core/FTSRestClient.java
+++ b/src/jalview/fts/core/FTSRestClient.java
@@ -43,13 +43,13 @@ import java.util.Objects;
*/
public abstract class FTSRestClient implements FTSRestClientI
{
- protected Collection dataColumns = new ArrayList();
+ protected Collection dataColumns = new ArrayList<>();
- protected Collection dataColumnGroups = new ArrayList();
+ protected Collection dataColumnGroups = new ArrayList<>();
- protected Collection searchableDataColumns = new ArrayList();
+ protected Collection searchableDataColumns = new ArrayList<>();
- protected Collection defaulDisplayedDataColumns = new ArrayList();
+ protected Collection defaulDisplayedDataColumns = new ArrayList<>();
protected FTSDataColumnI primaryKeyColumn;
@@ -446,22 +446,22 @@ public abstract class FTSRestClient implements FTSRestClientI
throw new Exception("Couldn't find data column group with id : " + id);
}
- public String getMessageByHTTPStatusCode(int code, String service)
+ public static String getMessageByHTTPStatusCode(int code, String service)
{
String message = "";
switch (code)
{
case 400:
- message = MessageManager.getString("exception.bad_request");
+ message = "Bad request. There is a problem with your input.";
break;
case 410:
message = MessageManager.formatMessage(
- "exception.fts_rest_service_no_longer_available", service);
+ service + " rest services no longer available!");
break;
case 403:
case 404:
- message = MessageManager.getString("exception.resource_not_be_found");
+ message = "The requested resource could not be found";
break;
case 408:
case 409:
@@ -470,16 +470,16 @@ public abstract class FTSRestClient implements FTSRestClientI
case 502:
case 504:
case 505:
- message = MessageManager.formatMessage("exception.fts_server_error",
- service);
+ message = "There seems to be an error from the " + service
+ + " server";
break;
case 503:
- message = MessageManager.getString("exception.service_not_available");
+ message = "Service not available. The server is being updated, try again later.";
break;
default:
break;
}
- return message;
+ return String.valueOf(code) + " " + message;
}
protected String getResourceFile(String fileName)
diff --git a/src/jalview/fts/service/pdb/PDBFTSRestClient.java b/src/jalview/fts/service/pdb/PDBFTSRestClient.java
index cbeaff1..5293c32 100644
--- a/src/jalview/fts/service/pdb/PDBFTSRestClient.java
+++ b/src/jalview/fts/service/pdb/PDBFTSRestClient.java
@@ -152,10 +152,11 @@ public class PDBFTSRestClient extends FTSRestClient
// System.out.println("query >>>>>>> " + pdbRestRequest.toString());
// Check the response status and report exception if one occurs
- if (clientResponse.getStatus() != 200)
+ int responseStatus = clientResponse.getStatus();
+ if (responseStatus != 200)
{
String errorMessage = "";
- if (clientResponse.getStatus() == 400)
+ if (responseStatus == 400)
{
errorMessage = parseJsonExceptionString(responseString);
throw new Exception(errorMessage);
@@ -163,7 +164,7 @@ public class PDBFTSRestClient extends FTSRestClient
else
{
errorMessage = getMessageByHTTPStatusCode(
- clientResponse.getStatus(), "PDB");
+ responseStatus, "PDB");
throw new Exception(errorMessage);
}
}
diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java
index e18d6af..ec2ebe3 100644
--- a/src/jalview/gui/StructureChooser.java
+++ b/src/jalview/gui/StructureChooser.java
@@ -322,6 +322,11 @@ public class StructureChooser extends GStructureChooser
boolean isUniProtRefsFound = false;
StringBuilder queryBuilder = new StringBuilder();
Set seqRefs = new LinkedHashSet<>();
+
+ /*
+ * note PDBs as DBRefEntry so they are not duplicated in query
+ */
+ Set pdbids = new HashSet<>();
if (seq.getAllPDBEntries() != null
&& queryBuilder.length() < MAX_QLENGTH)
@@ -330,9 +335,10 @@ public class StructureChooser extends GStructureChooser
{
if (isValidSeqName(entry.getId()))
{
- queryBuilder.append("pdb_id:").append(entry.getId().toLowerCase())
- .append(" OR ");
+ String id = entry.getId().toLowerCase();
+ queryBuilder.append("pdb_id:").append(id).append(" OR ");
isPDBRefsFound = true;
+ pdbids.add(id);
}
}
}
@@ -355,9 +361,13 @@ public class StructureChooser extends GStructureChooser
else if (dbRef.getSource().equalsIgnoreCase(DBRefSource.PDB))
{
- queryBuilder.append("pdb_id:")
- .append(getDBRefId(dbRef).toLowerCase()).append(" OR ");
- isPDBRefsFound = true;
+ String id = getDBRefId(dbRef).toLowerCase();
+ if (!pdbids.contains(id))
+ {
+ queryBuilder.append("pdb_id:").append(id).append(" OR ");
+ isPDBRefsFound = true;
+ pdbids.add(id);
+ }
}
else
{
diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper.java b/src/jalview/util/ShortcutKeyMaskExWrapper.java
index c9ed231..f73b8d4 100644
--- a/src/jalview/util/ShortcutKeyMaskExWrapper.java
+++ b/src/jalview/util/ShortcutKeyMaskExWrapper.java
@@ -23,14 +23,16 @@ public class ShortcutKeyMaskExWrapper
if (specversion >= modern)
{
- wrapper = new ShortcutKeyMaskExWrapper11();
+ wrapper = new jalview.util.ShortcutKeyMaskExWrapper11();
+ SHIFT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper11.SHIFT_DOWN_MASK;
+ ALT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper11.ALT_DOWN_MASK;
}
else
{
- wrapper = new ShortcutKeyMaskExWrapper8();
+ wrapper = new jalview.util.ShortcutKeyMaskExWrapper8();
+ SHIFT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper8.SHIFT_DOWN_MASK;
+ ALT_DOWN_MASK = jalview.util.ShortcutKeyMaskExWrapper8.ALT_DOWN_MASK;
}
- SHIFT_DOWN_MASK = wrapper.SHIFT_DOWN_MASK;
- ALT_DOWN_MASK = wrapper.ALT_DOWN_MASK;
}
public static int getMenuShortcutKeyMaskEx()
diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper11.java b/src/jalview/util/ShortcutKeyMaskExWrapper11.java
index 41a6aa0..7a3c8ca 100644
--- a/src/jalview/util/ShortcutKeyMaskExWrapper11.java
+++ b/src/jalview/util/ShortcutKeyMaskExWrapper11.java
@@ -7,8 +7,15 @@ import java.awt.event.MouseEvent;
public class ShortcutKeyMaskExWrapper11 implements ShortcutKeyMaskExWrapperI
{
- public final static int SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
- public final static int ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+ public final static int SHIFT_DOWN_MASK;
+
+ public final static int ALT_DOWN_MASK;
+
+ static
+ {
+ SHIFT_DOWN_MASK = KeyEvent.SHIFT_DOWN_MASK;
+ ALT_DOWN_MASK = KeyEvent.ALT_DOWN_MASK;
+ }
@Override
public int getMenuShortcutKeyMaskEx()
@@ -31,4 +38,5 @@ public class ShortcutKeyMaskExWrapper11 implements ShortcutKeyMaskExWrapperI
return e.getModifiersEx();
}
+
}
diff --git a/src/jalview/util/ShortcutKeyMaskExWrapper8.java b/src/jalview/util/ShortcutKeyMaskExWrapper8.java
index 78254b5..a7817bd 100644
--- a/src/jalview/util/ShortcutKeyMaskExWrapper8.java
+++ b/src/jalview/util/ShortcutKeyMaskExWrapper8.java
@@ -7,8 +7,15 @@ import java.awt.event.MouseEvent;
public class ShortcutKeyMaskExWrapper8 implements ShortcutKeyMaskExWrapperI
{
- public final static int SHIFT_DOWN_MASK = KeyEvent.SHIFT_MASK;
- public final static int ALT_DOWN_MASK = KeyEvent.ALT_MASK;
+ public final static int SHIFT_DOWN_MASK;
+
+ public final static int ALT_DOWN_MASK;
+
+ static
+ {
+ SHIFT_DOWN_MASK = KeyEvent.SHIFT_MASK;
+ ALT_DOWN_MASK = KeyEvent.ALT_MASK;
+ }
@Override
public int getMenuShortcutKeyMaskEx()
diff --git a/test/jalview/commands/EditCommandTest.java b/test/jalview/commands/EditCommandTest.java
index 2160657..348d871 100644
--- a/test/jalview/commands/EditCommandTest.java
+++ b/test/jalview/commands/EditCommandTest.java
@@ -90,11 +90,11 @@ public class EditCommandTest
testee = new EditCommand();
seqs = new SequenceI[4];
seqs[0] = new Sequence("seq0", "abcdefghjk");
- seqs[0].setDatasetSequence(new Sequence("seq0ds", "abcdefghjk"));
+ seqs[0].setDatasetSequence(new Sequence("seq0ds", "ABCDEFGHJK"));
seqs[1] = new Sequence("seq1", "fghjklmnopq");
- seqs[1].setDatasetSequence(new Sequence("seq1ds", "fghjklmnopq"));
+ seqs[1].setDatasetSequence(new Sequence("seq1ds", "FGHJKLMNOPQ"));
seqs[2] = new Sequence("seq2", "qrstuvwxyz");
- seqs[2].setDatasetSequence(new Sequence("seq2ds", "qrstuvwxyz"));
+ seqs[2].setDatasetSequence(new Sequence("seq2ds", "QRSTUVWXYZ"));
seqs[3] = new Sequence("seq3", "1234567890");
seqs[3].setDatasetSequence(new Sequence("seq3ds", "1234567890"));
al = new Alignment(seqs);
@@ -285,7 +285,8 @@ public class EditCommandTest
4, 8, al);
assertEquals("abcdefghjk", seqs[0].getSequenceAsString());
assertEquals("fghjZ-xYopq", seqs[1].getSequenceAsString());
- assertEquals("fghjZxYopq",
+ // Dataset Sequence should always be uppercase
+ assertEquals("fghjZxYopq".toUpperCase(),
seqs[1].getDatasetSequence().getSequenceAsString());
assertEquals("qrstuvwxyz", seqs[2].getSequenceAsString());
assertEquals("1234567890", seqs[3].getSequenceAsString());
@@ -315,7 +316,8 @@ public class EditCommandTest
assertEquals("ABxyZ-DEF", seq.getSequenceAsString());
assertEquals(1, seq.getStart());
assertEquals(8, seq.getEnd());
- assertEquals("ABxyZDEF",
+ // Dataset sequence always uppercase
+ assertEquals("ABxyZDEF".toUpperCase(),
seq.getDatasetSequence().getSequenceAsString());
assertEquals(8, seq.getDatasetSequence().getEnd());
@@ -340,7 +342,8 @@ public class EditCommandTest
assertEquals("ABxyZ-DEF", seq.getSequenceAsString());
assertEquals(1, seq.getStart());
assertEquals(8, seq.getEnd());
- assertEquals("ABxyZDEF",
+ // dataset sequence should be Uppercase
+ assertEquals("ABxyZDEF".toUpperCase(),
seq.getDatasetSequence().getSequenceAsString());
assertEquals(8, seq.getDatasetSequence().getEnd());
@@ -363,8 +366,8 @@ public class EditCommandTest
assertEquals("----klmnopq", seqs[1].getSequenceAsString());
// and ds is preserved
assertTrue(dsseq == seqs[1].getDatasetSequence());
- // and it is unchanged
- assertEquals("fghjklmnopq", dsseq.getSequenceAsString());
+ // and it is unchanged and UPPERCASE !
+ assertEquals("fghjklmnopq".toUpperCase(), dsseq.getSequenceAsString());
// and that alignment sequence start has been adjusted
assertEquals(5, seqs[1].getStart());
assertEquals(11, seqs[1].getEnd());
@@ -390,8 +393,8 @@ public class EditCommandTest
assertEquals("----klmnopq", seqs[1].getSequenceAsString());
// and ds is preserved
assertTrue(dsseq == seqs[1].getDatasetSequence());
- // and it is unchanged
- assertEquals("fghjklmnopq", dsseq.getSequenceAsString());
+ // and it is unchanged AND UPPERCASE !
+ assertEquals("fghjklmnopq".toUpperCase(), dsseq.getSequenceAsString());
// and that alignment sequence start has been adjusted
assertEquals(5, seqs[1].getStart());
assertEquals(11, seqs[1].getEnd());