From: kiramt
Both the applet
and the desktop application are able to open URLs as 'popups' in
your web browser.
Double-clicking on the ID of a sequence
- will open the first URL that can be generated from its sequence ID.
+ will open the URL designated for 'popups' in the "Connections" tab of the Jalview desktop
+ preferences.
This is by default the EMBL-EBI site, but you can easily configure your own sequence URL links.
+ By default, the list of available links in the preferences dialog box
+ contains the item "EMBL-EBI Search",
+ which is set as the URL which opens on double-clicking on a sequence ID, and as a
+ menu item in the Links menu. This link will show a web page in your default
+ browser with the selected sequence id as part of the URL.
+
+ Also by default, the list of available links contains persistent URLs for many common
+ bioinformatics databases. These links are downloaded by Jalview from
+ the identifiers.org website, and the names and URLs are not user editable.
+
+ The list of links is sortable, by clicking on the headers of the table. The list
+ can be filtered using the free text search box below the table, or the
+ "Custom Only" button, which displays only user-defined links.
+
+ In the preferences dialog box, the links which appear in the Links menu
+ can be configured by selecting or deselecting links in the "In Menu"
+ column. The names of selected links will be displayed
+ on new menu items under the "Link" menu when you right
+ click on a sequence id.
+ You can configure which link is used when double-clicking on a sequence
+ by selecting or deselecting links in the "On Click" column. Exactly one
+ link must be configured for double-clicking. Since the link uses the sequence id
+ to construct the URL to open, the selected link must contain the
+ "$SEQUENCE_ID$" token (see below for details of the "$SEQUENCE_ID$"
+ and other tokens).
+ Additionally you can click new to add a
new link, and edit to modify an existing link, or delete
- to remove it.
You can name the link, this will be displayed
- on a new menu item under the "Link" menu when you right
- click on a sequence id.
The URL string must contain a
+ to remove it. Only URLs entered by the user (or the default EMBL-EBI link) may
+ be edited or deleted. When adding or editing a link, the URL string must contain a
token that can be replaced with a sequence ID or DB accession ID. The simplest token is
"$SEQUENCE_ID$", which will be replaced by the chosen
sequence id when you click on it.
@@@ -93,6 -66,21 +93,21 @@@
the sequence ID for the sequence (since Jalview 2.10.1).
+ 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 Check the Connections and Web services tab
A url may
contain a string of the form $SEQUENCE_ID=/regular
expression/=$ or $DB_ACCESSION=/regular expression/=$.
diff --combined resources/lang/Messages.properties
index bee4809,6360dc7..7833903
--- a/resources/lang/Messages.properties
+++ b/resources/lang/Messages.properties
@@@ -125,6 -125,8 +125,8 @@@ action.change_font_tree_panel = Change
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-(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
@@@ -137,8 -139,7 +139,8 @@@ action.view_flanking_regions = Show fla
label.view_flanking_regions = Show sequence data either side of the subsequences involved in this alignment
label.structures_manager = Structures Manager
label.nickname = Nickname:
-label.url = URL:
+label.url = URL
+label.url\: = URL:
label.input_file_url = Enter URL or Input File
label.select_feature = Select feature
label.name = Name
@@@ -410,6 -411,7 +412,6 @@@ label.couldnt_import_as_vamsas_session
label.vamsas_document_import_failed = Vamsas Document Import Failed
label.couldnt_locate = Couldn't locate {0}
label.url_not_found = URL not found
-label.no_link_selected = No link selected
label.new_sequence_url_link = New sequence URL link
label.cannot_edit_annotations_in_wrapped_view = Cannot edit annotations in wrapped view
label.wrapped_view_no_edit = Wrapped view - no edit
@@@ -1272,18 -1274,4 +1274,19 @@@ label.SEQUENCE_ID_no_longer_used = $SEQ
label.SEQUENCE_ID_for_DB_ACCESSION1 = Please review your URL links in the 'Connections' tab of the Preferences window:
label.SEQUENCE_ID_for_DB_ACCESSION2 = URL links using '$SEQUENCE_ID$' for DB accessions now use '$DB_ACCESSION$'.
label.do_not_display_again = Do not display this message again
-label.output_seq_details = Output Sequence Details to list all database references
+exception.url_cannot_have_miriam_id = {0} is a MIRIAM id and cannot be used as a custom url name
+exception.url_cannot_have_duplicate_id = {0} cannot be used as a label for more than one line
+label.filter = Filter text:
+action.customfilter = Custom only
+action.showall = Show All
+label.insert = Insert:
+action.seq_id = $SEQUENCE_ID$
+action.db_acc = $DB_ACCESSION$
+label.default = On Click
+label.inmenu = In Menu
+label.id = ID
+label.urltooltip = Only one url, which must use a sequence id, can be selected for the 'On Click' option
+label.edit_sequence_url_link = Edit sequence URL link
+warn.name_cannot_be_duplicate = URL names must be unique and cannot be MIRIAM ids
- label.invalid_name = Invalid Name !
++label.invalid_name = Invalid Name !
++label.output_seq_details = Output Sequence Details to list all database references
diff --combined resources/lang/Messages_es.properties
index 99aeed5,e5b5e27..88fb0a4
--- a/resources/lang/Messages_es.properties
+++ b/resources/lang/Messages_es.properties
@@@ -122,6 -122,8 +122,8 @@@ action.change_font_tree_panel = Cambia
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
@@@ -134,8 -136,7 +136,8 @@@ action.view_flanking_regions = Mostrar
label.view_flanking_regions = Mostrar los datos de la secuencia a ambos lados de las subsecuencias implicadas en este alineamiento
label.structures_manager = Administrar estructuras
label.nickname = Sobrenombre:
-label.url = URL:
+label.url\: = URL:
+label.url = URL
label.input_file_url = Introducir URL en el fichero de entrada
label.select_feature = Seleccionar característica
label.name = Nombre
@@@ -378,6 -379,7 +380,6 @@@ label.couldnt_import_as_vamsas_session
label.vamsas_document_import_failed = Fallo en la importación del documento Vamsas
label.couldnt_locate = No se pudo localizar {0}
label.url_not_found = URL no encontrada
-label.no_link_selected = Enlace no seleccionado
label.new_sequence_url_link = Enlace a una nueva secuencia URL
label.cannot_edit_annotations_in_wrapped_view = No se pueden editar anotaciones en vista envolvente
label.wrapped_view_no_edit = Vista envolvente - no editar
@@@ -1273,18 -1275,4 +1275,19 @@@ label.SEQUENCE_ID_no_longer_used = $SEQ
label.SEQUENCE_ID_for_DB_ACCESSION1 = Por favor, revise sus URLs en la pestaña 'Conexiones' de la ventana de Preferencias:
label.SEQUENCE_ID_for_DB_ACCESSION2 = URL enlaza usando '$SEQUENCE_ID$' para accesiones DB ahora usar '$DB_ACCESSION$'.
label.do_not_display_again = No mostrar este mensaje de nuevo
-label.output_seq_details = Seleccionar Detalles de la secuencia para ver todas
+exception.url_cannot_have_miriam_id = {0} is a MIRIAM id and cannot be used as a custom url name
+exception.url_cannot_have_duplicate_id = {0} cannot be used as a label for more than one link
+label.filter = Filter text:
+action.customfilter = Custom only
+action.showall = Show All
+label.insert = Insert:
+action.seq_id = $SEQUENCE_ID$
+action.db_acc = $DB_ACCESSION$
+label.default = On Click
+label.inmenu = In Menu
+label.id = ID
+label.urltooltip = Only one url, which must use a sequence id, can be selected for the 'On Click' option
+label.edit_sequence_url_link = Edit sequence URL link
+warn.name_cannot_be_duplicate = URL names must be unique and cannot be MIRIAM ids
- label.invalid_name = Invalid Name !
++label.invalid_name = Invalid Name !
++label.output_seq_details = Seleccionar Detalles de la secuencia para ver todas
diff --combined src/jalview/gui/DasSourceBrowser.java
index 26e9708,8c8f228..c5ec067
--- a/src/jalview/gui/DasSourceBrowser.java
+++ b/src/jalview/gui/DasSourceBrowser.java
@@@ -453,18 -453,18 +453,18 @@@ public class DasSourceBrowser extends G
pane12.add(nametf, BorderLayout.EAST);
panel.add(pane12, BorderLayout.NORTH);
pane12 = new JPanel(new BorderLayout());
- pane12.add(new JLabel(MessageManager.getString("label.url")),
+ pane12.add(new JLabel(MessageManager.getString("label.url:")),
BorderLayout.NORTH);
pane12.add(seqs, BorderLayout.SOUTH);
pane12.add(urltf, BorderLayout.EAST);
panel.add(pane12, BorderLayout.SOUTH);
- int reply = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
+ int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
panel,
MessageManager.getString("label.enter_local_das_source"),
- JOptionPane.OK_CANCEL_OPTION);
+ JvOptionPane.OK_CANCEL_OPTION);
- if (reply != JOptionPane.OK_OPTION)
+ if (reply != JvOptionPane.OK_OPTION)
{
return;
}
@@@ -534,21 -534,21 +534,21 @@@
if (!sourceRegistry.getSource(nickname).isLocal())
{
- JOptionPane
+ JvOptionPane
.showInternalMessageDialog(
Desktop.desktop,
MessageManager
.getString("label.you_can_only_edit_or_remove_local_das_sources"),
MessageManager.getString("label.public_das_source"),
- JOptionPane.WARNING_MESSAGE);
+ JvOptionPane.WARNING_MESSAGE);
return;
}
Object[] options = { "Edit", "Remove", "Cancel" };
- int choice = JOptionPane.showInternalOptionDialog(Desktop.desktop,
+ int choice = JvOptionPane.showInternalOptionDialog(Desktop.desktop,
"Do you want to edit or remove " + nickname + "?",
"Edit / Remove Local DAS Source",
- JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
+ JvOptionPane.YES_NO_CANCEL_OPTION, JvOptionPane.QUESTION_MESSAGE,
null, options, options[2]);
switch (choice)
diff --combined src/jalview/gui/Desktop.java
index 41ce9a7,ac957d8..b4b41a3
--- a/src/jalview/gui/Desktop.java
+++ b/src/jalview/gui/Desktop.java
@@@ -20,27 -20,28 +20,30 @@@
*/
package jalview.gui;
-import static jalview.util.UrlConstants.EMBLEBI_STRING;
import static jalview.util.UrlConstants.SEQUENCE_ID;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Cache;
import jalview.bin.Jalview;
+ import jalview.io.DataSourceType;
+ import jalview.io.FileFormat;
+ import jalview.io.FileFormatException;
+ import jalview.io.FileFormatI;
import jalview.io.FileLoader;
- import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
import jalview.io.JalviewFileChooser;
import jalview.io.JalviewFileView;
import jalview.jbgui.GSplitFrame;
import jalview.jbgui.GStructureViewer;
import jalview.structure.StructureSelectionManager;
+import jalview.urls.IdOrgSettings;
import jalview.util.ImageMaker;
import jalview.util.MessageManager;
import jalview.util.Platform;
+import jalview.util.UrlConstants;
import jalview.viewmodel.AlignmentViewport;
+import jalview.ws.UrlDownloadClient;
import jalview.ws.params.ParamManager;
import java.awt.BorderLayout;
@@@ -76,7 -77,6 +79,7 @@@ import java.beans.PropertyChangeListene
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Hashtable;
@@@ -102,7 -102,6 +105,6 @@@ import javax.swing.JFrame
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JMenuItem;
- import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JProgressBar;
@@@ -392,8 -391,6 +394,8 @@@ public class Desktop extends jalview.jb
showNews.setVisible(false);
+ getIdentifiersOrgData();
+
checkURLLinks();
this.addWindowListener(new WindowAdapter()
@@@ -457,7 -454,6 +459,6 @@@
}
});
- // displayed.
// Thread off a new instance of the file chooser - this reduces the time it
// takes to open it later on.
new Thread(new Runnable()
@@@ -466,11 -462,9 +467,9 @@@
public void run()
{
Cache.log.debug("Filechooser init thread started.");
- new JalviewFileChooser(
- jalview.bin.Cache.getProperty("LAST_DIRECTORY"),
- jalview.io.AppletFormatAdapter.READABLE_EXTENSIONS,
- jalview.io.AppletFormatAdapter.READABLE_FNAMES,
- jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT"));
+ String fileFormat = Cache.getProperty("DEFAULT_FILE_FORMAT");
+ JalviewFileChooser.forRead(Cache.getProperty("LAST_DIRECTORY"),
+ fileFormat);
Cache.log.debug("Filechooser init thread finished.");
}
}).start();
@@@ -530,29 -524,6 +529,29 @@@
});
}
+ public void getIdentifiersOrgData()
+ {
+ // Thread off the identifiers fetcher
+ addDialogThread(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ Cache.log.debug("Downloading data from identifiers.org");
+ UrlDownloadClient client = new UrlDownloadClient();
+ try
+ {
+ client.download(IdOrgSettings.getUrl(),
+ IdOrgSettings.getDownloadLocation());
+ } catch (IOException e)
+ {
+ Cache.log.debug("Exception downloading identifiers.org data"
+ + e.getMessage());
+ }
+ }
+ });
+ }
+
@Override
protected void showNews_actionPerformed(ActionEvent e)
{
@@@ -713,10 -684,10 +712,10 @@@
String file = (String) contents
.getTransferData(DataFlavor.stringFlavor);
- String format = new IdentifyFile().identify(file,
- FormatAdapter.PASTE);
+ FileFormatI format = new IdentifyFile().identify(file,
+ DataSourceType.PASTE);
- new FileLoader().LoadFile(file, FormatAdapter.PASTE, format);
+ new FileLoader().LoadFile(file, DataSourceType.PASTE, format);
}
} catch (Exception ex)
@@@ -919,9 -890,10 +918,10 @@@
}
});
+ desktop.add(frame);
+
windowMenu.add(menuItem);
- desktop.add(frame);
frame.toFront();
try
{
@@@ -982,8 -954,8 +982,8 @@@
// Java's Transferable for native dnd
evt.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
Transferable t = evt.getTransferable();
- java.util.List
of the"
+ " Tools->Preferences dialog box to change them.