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