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