Opening URLs from Jalview

Opening URLs from Jalview
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 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.

Other links for a sequence either derived from any other configured URL links, or imported from the sequence's annotation, are accessed by right clicking to open the sequence pop-up menu, and selecting from the Links submenu.

Configuring URL Links
URL links are defined in the "Connections" tab of the Jalview desktop preferences, or specified as applet parameters.

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. 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.

eg.
UniRef100 = http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&library=uniref100
Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$

Links will also be made for any database cross references associated with the sequence where the database name exactly matches a URL link name. In this case, the $DB_ACCESSION$ string will be replaced with the accession string for the database cross-reference, rather than 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
A url may contain a string of the form $SEQUENCE_ID=/regular expression/=$ or $DB_ACCESSION=/regular expression/=$. In this case, the regular expression will be applied to the full sequence ID or DB accession ID string and the resulting match will be inserted into the URL. Groups of parentheses can be used to specify which regions of the regular expression will be used to generate the URL: