JAL-3224 JAL-3225 Some fixes in install4j template and build.gradle, and a correction...
[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 (since 2.10.2). 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> <br/>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 for any link templates whose name begins with the database name.
77     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     <br /> <em>For example: to create a link for viewing MACiE records
81       from PDB Entries, create a new custom link entry with the name
82       "PDB in MACiE", and link URL template:
83       <pre>https://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/MACiE/index.pl?query_pdb=1&amp;pdb=$DBACCESSION$</pre>
84       <br />The sequence ID popup menu for seuqences with a PDB entry
85       will now show 'PDB in MACiE|1xyz..' links in the <strong>links</strong>
86       submenu.
87     </em>
88   </p>
89   <p>
90     <strong><a name="warning">Warning dialog about updating
91         your configured URL links</a></strong><br /> In the desktop
92     prior to Jalview 2.10.1, the only way to configure custom links for
93     a particular database cross-reference for a sequence was to give it
94     a name that
95     <em>exactly</em> matched the database source, and a regular
96     expression for filtering out any spurious matches generated when the
97     custom linked was tested against the Sequence's ID string. Since the
98     introduction of the $DB_ACCESSION$ token, however, $SEQUENCE_ID$
99     will not be used for database cross-reference accession strings, and
100     if you have custom links configured, Jalview will raise a warning
101     message so let you know that you may need to update your links to
102     use $DB_ACCESSION$.
103   </p>
104   <p>
105     <strong>Regular Expression Substitution</strong><br> A url may
106     contain a string of the form $SEQUENCE_ID=/<em>regular
107       expression</em>/=$ or $DB_ACCESSION=/<em>regular expression</em>/=$. In
108     this case, the regular expression will be applied to the full
109     sequence ID or DB accession ID string and the resulting match will
110     be inserted into the URL. Groups of parentheses can be used to
111     specify which regions of the regular expression will be used to
112     generate the URL:
113   
114   <ul>
115     <li>Each top level parenthesis will yield a URL containing the
116       text matched within that parenthesis.</li>
117     <li>Regions matching sub-parentheses within a top-level
118       parenthesis will be concatenated to form the text inserted into
119       the URL for the top-level parenthesis.</li>
120   </ul>
121   <em>Please Note:</em>
122     <ul>
123       <li>The regular expressions supported by Jalview are those
124         provided by the <a href="http://www.javaregex.com">Stevesoft
125           javaregex package</a>.
126       </li>
127       <li>Some characters must be escaped when specifying them as a
128         match within a regular expression.</li>
129     </ul> <br> Many Thanks to Bernd Brandt of the Free University of
130     Amsterdam for testing the regular-expression expansion feature!
131 </body>
132 </html>