synchronized documentation between development and 2.4.0b2
[jalview.git] / help / html / webServices / urllinks.html
1 <html>
2 <head>
3 Opening URLs from Jalview
4 </head>
5 <body>
6 <p>
7 <p><strong>Opening URLs from Jalview</strong><br>
8 Both the applet and the desktop application are able to open URLs as
9 'popups' in your web browser. <br>
10 Double-clicking on the ID of a sequence will open the first URL that can
11 be generated from its sequence ID. This is often the SRS site, but you
12 can easily configure your own <a href="#urllinks>sequence URL links</a>.</p>
13 <p>Other links for a sequence either derived from any other
14 configured URL links, or imported from the sequence's annotation, are
15 accessed by right clicking to open the sequence pop-up menu, and
16 selecting from the <em>Links</em> submenu.</p>
17 <p><strong><a name="urllinks">Configuring URL Links</a></strong>
18 <br>URL links are defined in the &quot;Connections&quot; tab of the <a
19         href="../features/preferences.html">Jalview desktop preferences</a>, or
20 specified as <a
21         href="http://www.jalview.org/examples/appletParameters.html#parameters">applet
22 parameters</a>. <br>
23 By default the item &quot;SRS&quot; is added to this link menu. This
24 link will show a web page in your default browser with the selected
25 sequence id as part of the URL.<br>
26 In the preferences dialog box, click <strong>new</strong> to add a new
27 link, and <strong>edit</strong> to modify an existing link, or <strong>delete</strong>
28 to remove it.<br>
29 You can name the link, this will be displayed on a new menu item under
30 the &quot;Link&quot; menu when you right click on a sequence id. <br>
31 The URL string must contain a token that can be replaced with a sequence
32 ID. The simplest token is &quot;$SEQUENCE_ID$&quot;, which will be
33 replaced by the chosen sequence id when you click on it.</p>
34 <p>eg.<br>
35 UniRef100 =
36 http://www.ebi.uniprot.org/uniprot-srv/uniRefView.do?proteinAc=$SEQUENCE_ID$&amp;library=uniref100<br>
37 Swissprot = http://www.expasy.org/uniprot/$SEQUENCE_ID$ <br>
38 <br>
39 Links will also be made for any database cross references associated
40 with the sequence where the database name exactly matches a URL link
41 name. In this case, the $SEQUENCE_ID$ string will be replaced with the
42 accession string for the database cross-reference, rather than the
43 sequence ID for the sequence (<em>since Jalview 2.4</em>).</p>
44 <p><strong>Regular Expression Substitution</strong><br>
45 A url may contain a string of the form $SEQUENCE_ID=/<em>regular
46 expression</em>/=$. In this case, the regular expression will be applied to
47 the full sequence ID string and the resulting match will be inserted
48 into the URL. Groups of parentheses can be used to specify which regions
49 of the regular expression will be used to generate the URL:
50 <ul>
51         <li>Each top level parenthesis will yield a URL containing the
52         text matched within that parenthesis.</li>
53         <li>Regions matching sub-parentheses within a top-level
54         parenthesis will be concatenated to form the text inserted into the URL
55         for the top-level parenthesis.</li>
56         <em>Please Note:
57         <ul>
58                 <li>The regular expressions supported by Jalview are those
59                 provided by the <a href="www.javaregex.com">Stevesoft javaregex
60                 package</a>.</li>
61                 <li>Some characters must be escaped when specifying them as a
62                 match within a regular expression.</li>
63         </ul>
64         <br>
65         Many Thanks to Bernd Brandt of the Free University of Amsterdam for
66         testing this new regular-expression expansion feature! </em>
67         <em>
68 </ul>
69 </p>
70 <p
71 </body>
72 </html>