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