3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
6 * This file is part of Jalview.
8 * Jalview is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation, either version 3
11 * of the License, or (at your option) any later version.
13 * Jalview is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 * PURPOSE. See the GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
20 * The Jalview Authors are detailed in the 'AUTHORS' file.
22 <head>Opening URLs from Jalview
26 <strong>Opening URLs from Jalview</strong><br> Both the applet
27 and the desktop application are able to open URLs as 'popups' in
29 <p> Double-clicking on the ID of a sequence
30 will open whichever URL is selected for 'popups' in the <strong>"Links"</strong> tab of the <a
31 href="../features/preferences.html#links">Jalview desktop
33 This is by default the EMBL-EBI site, but you can easily configure your own <a
34 href="#urllinks">sequence URL links</a>.
37 Other links for a sequence, either derived from any other configured
38 URL links, or imported from the sequence's annotation, are accessed
39 by right clicking to open the sequence pop-up menu, and selecting
40 from the <em>Links</em> submenu.
43 <strong><a name="urllinks">Configuring URL Links</a></strong> <br>URL
44 links are defined in the "Links" tab of the <a
45 href="../features/preferences.html#links">Jalview desktop
46 preferences</a>, or specified as <a
47 href="http://www.jalview.org/examples/appletParameters.html#parameters">applet
50 <em>Default Link Settings</em><br /> The "EMBL-EBI Search"
51 link is the default link shown in the "Link" submenu, and
52 opened when double-clicking on a sequence ID. When clicked, this
53 link will show a web page in your default browser with the selected
54 sequence ID as part of the URL.
57 <em>Adding additional links</em><br /> You can configure your own
58 links via the Jalview <a href="../features/preferences.html#links"><strong>Preferences</strong></a>
59 dialog. Jalview also provides persistent URLs for many common
60 bioinformatics databases (since 2.10.2). These links are downloaded by Jalview from
61 the <em>identifiers.org</em> website, and the names and URLs are not
65 <em>Creating your own URL link</em> <br/>URL links are specified as a
66 template containing special tokens that Jalview will replace with
67 the Sequence ID or Database Accession of the sequence when you
68 double click on its ID or open it's <strong>Link</strong> submenu.
69 Link URL templates must contain at least one token.
71 <em>eg.</em><pre> UniRef100 =
72 http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&library=uniref100<br/>
73 Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$ <br> </pre>
75 Links will also be made for any database cross references associated
76 with the sequence for any link templates whose name begins with the database name.
77 In this case, the $DB_ACCESSION$ string will be replaced with
78 the accession string for the database cross-reference, rather than
79 the sequence ID for the sequence (<em>since Jalview 2.10.1</em>).
80 <br /> <em>For example: to create a link for viewing MACiE records
81 from PDB Entries, create a new custom link entry with the name
82 "PDB in MACiE", and link URL template:
83 <pre>https://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/MACiE/index.pl?query_pdb=1&pdb=$DBACCESSION$</pre>
84 <br />The sequence ID popup menu for seuqences with a PDB entry
85 will now show 'PDB in MACiE|1xyz..' links in the <strong>links</strong>
90 <strong><a name="warning">Warning dialog about updating
91 your configured URL links</a></strong><br /> In the desktop
92 prior to Jalview 2.10.1, the only way to configure custom links for
93 a particular database cross-reference for a sequence was to give it
95 <em>exactly</em> matched the database source, and a regular
96 expression for filtering out any spurious matches generated when the
97 custom linked was tested against the Sequence's ID string. Since the
98 introduction of the $DB_ACCESSION$ token, however, $SEQUENCE_ID$
99 will not be used for database cross-reference accession strings, and
100 if you have custom links configured, Jalview will raise a warning
101 message so let you know that you may need to update your links to
105 <strong>Regular Expression Substitution</strong><br> A url may
106 contain a string of the form $SEQUENCE_ID=/<em>regular
107 expression</em>/=$ or $DB_ACCESSION=/<em>regular expression</em>/=$. In
108 this case, the regular expression will be applied to the full
109 sequence ID or DB accession ID string and the resulting match will
110 be inserted into the URL. Groups of parentheses can be used to
111 specify which regions of the regular expression will be used to
115 <li>Each top level parenthesis will yield a URL containing the
116 text matched within that parenthesis.</li>
117 <li>Regions matching sub-parentheses within a top-level
118 parenthesis will be concatenated to form the text inserted into
119 the URL for the top-level parenthesis.</li>
121 <em>Please Note:</em>
123 <li>The regular expressions supported by Jalview are those
124 provided by the <a href="http://www.javaregex.com">Stevesoft
125 javaregex package</a>.
127 <li>Some characters must be escaped when specifying them as a
128 match within a regular expression.</li>
129 </ul> <br> Many Thanks to Bernd Brandt of the Free University of
130 Amsterdam for testing the regular-expression expansion feature!