Merge branch 'develop' into features/JAL-2316
[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 URL designated for 'popups' in the &quot;Connections&quot; tab of the <a
31     href="../features/preferences.html">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;Connections&quot; tab of the <a
45     href="../features/preferences.html">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     By default, the list of available links in the preferences dialog box 
51     contains the item &quot;EMBL-EBI Search&quot;, 
52     which is set as the URL which opens on double-clicking on a sequence ID, and as a 
53     menu item in the Links menu. This link will show a web page in your default
54     browser with the selected sequence id as part of the URL.
55     <br>
56     Also by default, the list of available links contains persistent URLs for many common 
57     bioinformatics databases. These links are downloaded by Jalview from
58     the <em>identifiers.org</em> website, and the names and URLs are not user editable.
59     <br>
60     The list of links is sortable, by clicking on the headers of the table. The list
61     can be filtered using the free text search box below the table, or the 
62     &quot;Custom Only&quot; button, which displays only user-defined links.
63     </p> 
64     <p>
65     In the preferences dialog box, the links which appear in the Links menu 
66     can be configured by selecting or deselecting links in the &quot;In Menu&quot; 
67     column. The names of selected links will be displayed
68     on new menu items under the &quot;Link&quot; menu when you right
69     click on a sequence id.<br> 
70     You can configure which link is used when double-clicking on a sequence
71     by selecting or deselecting links in the &quot;On Click&quot; column. Exactly one
72     link must be configured for double-clicking. Since the link uses the sequence id
73     to construct the URL to open, the selected link must contain the 
74     &quot;$SEQUENCE_ID$&quot; token (see below for details of the &quot;$SEQUENCE_ID$&quot;
75     and other tokens).</p>
76     <p>
77     Additionally you can click <strong>new</strong> to add a
78     new link, and <strong>edit</strong> to modify an existing link, or <strong>delete</strong>
79     to remove it. Only URLs entered by the user (or the default EMBL-EBI link) may
80     be edited or deleted. When adding or editing a link, the URL string must contain a
81     token that can be replaced with a sequence ID or DB accession ID. The simplest token is
82     &quot;$SEQUENCE_ID$&quot;, which will be replaced by the chosen
83     sequence id when you click on it. 
84   </p>
85   <p>
86     eg.<br> UniRef100 =
87     http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&amp;library=uniref100<br>
88     Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$ <br> <br>
89     Links will also be made for any database cross references associated
90     with the sequence where the database name exactly matches a URL link
91     name. In this case, the $DB_ACCESSION$ string will be replaced with
92     the accession string for the database cross-reference, rather than
93     the sequence ID for the sequence (<em>since Jalview 2.10.1</em>).
94   </p>
95   <p>
96     <strong><a name="warning">Warning dialog about updating
97         your configured URL links</a></strong><br /> In the desktop
98     prior to Jalview 2.10.1, the only way to configure custom links for
99     a particular database cross-reference for a sequence was to give it
100     a name that
101     <em>exactly</em> matched the database source, and a regular
102     expression for filtering out any spurious matches generated when the
103     custom linked was tested against the Sequence's ID string. Since the
104     introduction of the $DB_ACCESSION$ token, however, $SEQUENCE_ID$
105     will not be used for database cross-reference accession strings, and
106     if you have custom links configured, Jalview will raise a warning
107     message so let you know that you may need to update your links to
108     use $DB_ACCESSION$.
109   </p>
110   <p>
111     <strong>Regular Expression Substitution</strong><br> A url may
112     contain a string of the form $SEQUENCE_ID=/<em>regular
113     expression</em>/=$ or $DB_ACCESSION=/<em>regular expression</em>/=$. 
114     In this case, the regular expression will be
115     applied to the full sequence ID or DB accession ID string and the resulting match will
116     be inserted into the URL. Groups of parentheses can be used to
117     specify which regions of the regular expression will be used to
118     generate the URL:
119   <ul>
120     <li>Each top level parenthesis will yield a URL containing the
121       text matched within that parenthesis.</li>
122     <li>Regions matching sub-parentheses within a top-level
123       parenthesis will be concatenated to form the text inserted into
124       the URL for the top-level parenthesis.</li>
125     <em>Please Note:
126       <ul>
127         <li>The regular expressions supported by Jalview are those
128           provided by the <a href="http://www.javaregex.com">Stevesoft
129             javaregex package</a>.
130         </li>
131         <li>Some characters must be escaped when specifying them as
132           a match within a regular expression.</li>
133       </ul> <br> Many Thanks to Bernd Brandt of the Free University of
134       Amsterdam for testing this new regular-expression expansion
135       feature!
136     </em>
137     <em>
138   </ul>
139   </p>
140   </p>
141 </body>
142 </html>