1 #-------------------------------------------------------------------------------
2 # Jalview - A Sequence Alignment Editor and Viewer (Version 2.5.1)
3 # Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 # This file is part of Jalview.
7 # Jalview is free software: you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 # Jalview is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty
13 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 # PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 #-------------------------------------------------------------------------------
20 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
21 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
23 * This file is part of Jalview.
25 * Jalview is free software: you can redistribute it and/or
26 * modify it under the terms of the GNU General Public License
27 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
29 * Jalview is distributed in the hope that it will be useful, but
30 * WITHOUT ANY WARRANTY; without even the implied warranty
31 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
32 * PURPOSE. See the GNU General Public License for more details.
34 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
37 Opening URLs from Jalview
41 <p><strong>Opening URLs from Jalview</strong><br>
42 Both the applet and the desktop application are able to open URLs as
43 'popups' in your web browser. <br>
44 Double-clicking on the ID of a sequence will open the first URL that can
45 be generated from its sequence ID. This is often the SRS site, but you
46 can easily configure your own <a href="#urllinks>sequence URL links</a>.</p>
47 <p>Other links for a sequence either derived from any other
48 configured URL links, or imported from the sequence's annotation, are
49 accessed by right clicking to open the sequence pop-up menu, and
50 selecting from the <em>Links</em> submenu.</p>
51 <p><strong><a name="urllinks">Configuring URL Links</a></strong>
52 <br>URL links are defined in the "Connections" tab of the <a
53 href="../features/preferences.html">Jalview desktop preferences</a>, or
55 href="http://www.jalview.org/examples/appletParameters.html#parameters">applet
57 By default the item "SRS" is added to this link menu. This
58 link will show a web page in your default browser with the selected
59 sequence id as part of the URL.<br>
60 In the preferences dialog box, click <strong>new</strong> to add a new
61 link, and <strong>edit</strong> to modify an existing link, or <strong>delete</strong>
63 You can name the link, this will be displayed on a new menu item under
64 the "Link" menu when you right click on a sequence id. <br>
65 The URL string must contain a token that can be replaced with a sequence
66 ID. The simplest token is "$SEQUENCE_ID$", which will be
67 replaced by the chosen sequence id when you click on it.</p>
70 http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&library=uniref100<br>
71 Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$ <br>
73 Links will also be made for any database cross references associated
74 with the sequence where the database name exactly matches a URL link
75 name. In this case, the $SEQUENCE_ID$ string will be replaced with the
76 accession string for the database cross-reference, rather than the
77 sequence ID for the sequence (<em>since Jalview 2.4</em>).</p>
78 <p><strong>Regular Expression Substitution</strong><br>
79 A url may contain a string of the form $SEQUENCE_ID=/<em>regular
80 expression</em>/=$. In this case, the regular expression will be applied to
81 the full sequence ID string and the resulting match will be inserted
82 into the URL. Groups of parentheses can be used to specify which regions
83 of the regular expression will be used to generate the URL:
85 <li>Each top level parenthesis will yield a URL containing the
86 text matched within that parenthesis.</li>
87 <li>Regions matching sub-parentheses within a top-level
88 parenthesis will be concatenated to form the text inserted into the URL
89 for the top-level parenthesis.</li>
92 <li>The regular expressions supported by Jalview are those
93 provided by the <a href="www.javaregex.com">Stevesoft javaregex
95 <li>Some characters must be escaped when specifying them as a
96 match within a regular expression.</li>
99 Many Thanks to Bernd Brandt of the Free University of Amsterdam for
100 testing this new regular-expression expansion feature! </em>