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