JAL-1503 update version in GPL header
[jalview.git] / help / html / webServices / urllinks.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
4  * Copyright (C) 2014 The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
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 of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19 -->
20 <head>
21 Opening URLs from Jalview
22 </head>
23 <body>
24 <p>
25 <p><strong>Opening URLs from Jalview</strong><br>
26 Both the applet and the desktop application are able to open URLs as
27 'popups' in your web browser. <br>
28 Double-clicking on the ID of a sequence will open the first URL that can
29 be generated from its sequence ID. This is often the SRS site, but you
30 can easily configure your own <a href="#urllinks">sequence URL links</a>.</p>
31 <p>Other links for a sequence either derived from any other
32 configured URL links, or imported from the sequence's annotation, are
33 accessed by right clicking to open the sequence pop-up menu, and
34 selecting from the <em>Links</em> submenu.</p>
35 <p><strong><a name="urllinks">Configuring URL Links</a></strong>
36 <br>URL links are defined in the &quot;Connections&quot; tab of the <a
37         href="../features/preferences.html">Jalview desktop preferences</a>, or
38 specified as <a
39         href="http://www.jalview.org/examples/appletParameters.html#parameters">applet
40 parameters</a>. <br>
41 By default the item &quot;SRS&quot; is added to this link menu. This
42 link will show a web page in your default browser with the selected
43 sequence id as part of the URL.<br>
44 In the preferences dialog box, click <strong>new</strong> to add a new
45 link, and <strong>edit</strong> to modify an existing link, or <strong>delete</strong>
46 to remove it.<br>
47 You can name the link, this will be displayed on a new menu item under
48 the &quot;Link&quot; menu when you right click on a sequence id. <br>
49 The URL string must contain a token that can be replaced with a sequence
50 ID. The simplest token is &quot;$SEQUENCE_ID$&quot;, which will be
51 replaced by the chosen sequence id when you click on it.</p>
52 <p>eg.<br>
53 UniRef100 =
54 http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&amp;library=uniref100<br>
55 Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$ <br>
56 <br>
57 Links will also be made for any database cross references associated
58 with the sequence where the database name exactly matches a URL link
59 name. In this case, the $SEQUENCE_ID$ string will be replaced with the
60 accession string for the database cross-reference, rather than the
61 sequence ID for the sequence (<em>since Jalview 2.4</em>).</p>
62 <p><strong>Regular Expression Substitution</strong><br>
63 A url may contain a string of the form $SEQUENCE_ID=/<em>regular
64 expression</em>/=$. In this case, the regular expression will be applied to
65 the full sequence ID string and the resulting match will be inserted
66 into the URL. Groups of parentheses can be used to specify which regions
67 of the regular expression will be used to generate the URL:
68 <ul>
69         <li>Each top level parenthesis will yield a URL containing the
70         text matched within that parenthesis.</li>
71         <li>Regions matching sub-parentheses within a top-level
72         parenthesis will be concatenated to form the text inserted into the URL
73         for the top-level parenthesis.</li>
74         <em>Please Note:
75         <ul>
76                 <li>The regular expressions supported by Jalview are those
77                 provided by the <a href="www.javaregex.com">Stevesoft javaregex
78                 package</a>.</li>
79                 <li>Some characters must be escaped when specifying them as a
80                 match within a regular expression.</li>
81         </ul>
82         <br>
83         Many Thanks to Bernd Brandt of the Free University of Amsterdam for
84         testing this new regular-expression expansion feature! </em>
85         <em>
86 </ul>
87 </p>
88 </p>
89 </body>
90 </html>