JAL-2316 tidied up documentation for Links tab
[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     <strong>Opening URLs from Jalview</strong><br> Both the applet
27     and the desktop application are able to open URLs as 'popups' in
28     your web browser.</p>
29     <p> Double-clicking on the ID of a sequence
30     will open whichever URL is selected for 'popups' in the <strong>&quot;Links&quot;</strong> tab of the <a
31     href="../features/preferences.html#links">Jalview desktop
32     preferences</a>.
33     This is by default the EMBL-EBI site, but you can easily configure your own <a
34       href="#urllinks">sequence URL links</a>.
35   </p>
36   <p>
37     Other links for a sequence, either derived from any other configured
38     URL links, or imported from the sequence's annotation, are accessed
39     by right clicking to open the sequence pop-up menu, and selecting
40     from the <em>Links</em> submenu.
41   </p>
42   <p>
43     <strong><a name="urllinks">Configuring URL Links</a></strong> <br>URL
44     links are defined in the &quot;Links&quot; tab of the <a
45     href="../features/preferences.html#links">Jalview desktop
46     preferences</a>, or specified as <a
47     href="http://www.jalview.org/examples/appletParameters.html#parameters">applet
48     parameters</a>.</p>
49   <p>
50     <em>Default Link Settings</em><br /> The &quot;EMBL-EBI Search&quot;
51     link is the default link shown in the &quot;Link&quot; submenu, and
52     opened when double-clicking on a sequence ID. When clicked, this
53     link will show a web page in your default browser with the selected
54     sequence ID as part of the URL.
55   </p>
56   <p>
57     <em>Adding additional links</em><br /> You can configure your own
58     links via the Jalview <a href="../features/preferences.html#links"><strong>Preferences</strong></a>
59     dialog. Jalview also provides persistent URLs for many common
60     bioinformatics databases. These links are downloaded by Jalview from
61     the <em>identifiers.org</em> website, and the names and URLs are not
62     user editable.
63   </p>
64   <p>
65     <em>Creating your own URL link</em> URL links are specified as a
66     template containing special tokens that Jalview will replace with
67     the Sequence ID or Database Accession of the sequence when you
68     double click on its ID or open it's <strong>Link</strong> submenu.
69     Link URL templates must contain at least one token. 
70   </p>
71     <em>eg.</em><pre> UniRef100 =
72     http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&amp;library=uniref100<br/>
73     Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$ <br> </pre>
74   <p>
75     Links will also be made for any database cross references associated
76     with the sequence where the database name exactly matches a URL link
77     name. In this case, the $DB_ACCESSION$ string will be replaced with
78     the accession string for the database cross-reference, rather than
79     the sequence ID for the sequence (<em>since Jalview 2.10.1</em>).
80   </p>
81   <p>
82     <strong><a name="warning">Warning dialog about updating
83         your configured URL links</a></strong><br /> In the desktop
84     prior to Jalview 2.10.1, the only way to configure custom links for
85     a particular database cross-reference for a sequence was to give it
86     a name that
87     <em>exactly</em> matched the database source, and a regular
88     expression for filtering out any spurious matches generated when the
89     custom linked was tested against the Sequence's ID string. Since the
90     introduction of the $DB_ACCESSION$ token, however, $SEQUENCE_ID$
91     will not be used for database cross-reference accession strings, and
92     if you have custom links configured, Jalview will raise a warning
93     message so let you know that you may need to update your links to
94     use $DB_ACCESSION$.
95   </p>
96   <p>
97     <strong>Regular Expression Substitution</strong><br> A url may
98     contain a string of the form $SEQUENCE_ID=/<em>regular
99       expression</em>/=$ or $DB_ACCESSION=/<em>regular expression</em>/=$. In
100     this case, the regular expression will be applied to the full
101     sequence ID or DB accession ID string and the resulting match will
102     be inserted into the URL. Groups of parentheses can be used to
103     specify which regions of the regular expression will be used to
104     generate the URL:
105   
106   <ul>
107     <li>Each top level parenthesis will yield a URL containing the
108       text matched within that parenthesis.</li>
109     <li>Regions matching sub-parentheses within a top-level
110       parenthesis will be concatenated to form the text inserted into
111       the URL for the top-level parenthesis.</li>
112   </ul>
113   <em>Please Note:</em>
114     <ul>
115       <li>The regular expressions supported by Jalview are those
116         provided by the <a href="http://www.javaregex.com">Stevesoft
117           javaregex package</a>.
118       </li>
119       <li>Some characters must be escaped when specifying them as a
120         match within a regular expression.</li>
121     </ul> <br> Many Thanks to Bernd Brandt of the Free University of
122     Amsterdam for testing the regular-expression expansion feature!
123 </body>
124 </html>