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