merge from develop
[jalview.git] / examples / appletParameters.html
1 <!--
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
10  *  
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.
15  * 
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  * The Jalview Authors are detailed in the 'AUTHORS' file.
18 -->
19
20 <!-- content start -->
21 <h2>JalviewLite Applet Parameter Documentation</h2>
22 <p>
23 The JalviewLite applet is configured through a series of applet parameters,
24 which are described <a href="#parameters"> below</a>. Once initialised,
25 the applet can be interacted with <em>via</em> its 
26 <a href="javascript:doSubmit('jalviewLiteJs')">Javascript API</a>. 
27 </p><p><strong>Issues arising from tightening of Java Security default settings</strong><br/>JalviewLite is provided as a signed applet with 'sandbox' permissions and wildcards that allow it to be run from any website. Unfortunately, earlier versions of Java may not be compatible with these settings. </p>
28     <p>For additional deployment notes, <a href="#appletdeploymentnotes">see below</a>.</p>
29             <p><h2>Applet Parameters</h2><br/>The applet takes the following initialisation parameters.</p>
30         <a name="parameters"></a>        <table width="97%" class="borderTable" align="center" >
31           <tr> 
32             <td width="103" height="23"><strong>&lt;param name=&quot;&quot;</strong></td>
33             <td width="80" ><strong>value=&quot;&quot;&gt;</strong></td>
34             <td width="100%"><strong>Description</strong></td>
35           </tr>
36           <tr>
37           <td>permissions</td>
38           <td>sandbox</td>
39           <td><strong>This parameter is necessary, and must have the value <em>sandbox</em> to allow the JalviewLite applet to run.</strong></td>
40           </tr>
41           <tr> 
42             <td>file</td>
43             <td>fileName</td>
44             <td>The file to open, must be on same server as the applet.</td>
45           </tr>
46           <tr> 
47             <td>file2</td>
48             <td>fileName</td>
49             <td>A second file to open. If one file is nucleotide and the other peptide, and at least one peptide sequence
50             is the translation of one of the nucleotide sequences, then alignments will be displayed linked in a split frame (<em>since 2.9</em>).</td>
51           </tr>
52           <tr> 
53             <td>sequence1,<br>
54               sequence2,<br>
55               sequence3</td>
56             <td>sequence in (preferably) PFAM or Fasta format</td>
57             <td>The alignment can be added as a series of sequences instead of 
58               from a file.</td>
59           </tr>
60           <tr> 
61             <td>tree</td>
62             <td>fileName</td>
63             <td>Tree file in Newick format</td>
64           </tr>
65           <tr> 
66             <td>features</td>
67             <td>fileName</td>
68             <td>Jalview Features file to be applied to the alignment</td>
69           </tr>
70           <tr> 
71             <td>annotations</td>
72             <td>fileName</td>
73             <td>Jalview Annotation file will be added to the alignment</td>
74           </tr>
75           <tr> 
76             <td>jnetfile</td>
77             <td>fileName</td>
78             <td>Secondary structure predictions from a <a
79             href="http://www.compbio.dundee.ac.uk/~www-jpred/">Jnet</a> Concise 
80               file will be added to the first sequence in the alignment.</td>
81           </tr>
82           <tr> 
83             <td>PDBfile(x)</td>
84             <td><p>fileName seq1 seq2 seq3</p>
85               <p>or</p>
86               <p>fileName A=seq1 B=seq2 C=seq3</p></td>
87             <td>PDB file which is to be associated with a sequence, followed by 
88               space separated list of alignment sequence ids. PDB chains can be 
89               specifed to map to particular sequence by using A=SeqA notation</td>
90           </tr>
91           <tr> 
92             <td><p>PDBSeq<br>
93                 *Not needed post Jalview 2.3, use PDBFile instead</p></td>
94             <td>SequenceId</td>
95             <td>The sequence to associate a PDB file with. Note the value is case 
96               sensitive.</td>
97           </tr>
98           <tr> 
99             <td>defaultColour</td>
100             <td> <em>One of: </em><br>
101               Clustal, Blosum62, % Identity, Hydrophobic, Zappo, Taylor, Helix 
102               Propensity, Strand Propensity, Turn Propensity, Buried Index, Nucleotide, T-Coffee Scores, RNA Helices</td>
103             <td>Default is no colour.</td>
104           </tr>
105           <tr> 
106             <td>userDefinedColour</td>
107             <td><p><em>Example:</em><br>
108                 D,E=red; K,R,H=0022FF; c=yellow</p></td>
109             <td>Define residue colours</td>
110           </tr>
111           <tr> 
112             <td height="35">showFullId</td>
113             <td>true <em>or</em> false</td>
114             <td>if true displays start and end residue at the end of sequence 
115               Id.</td>
116           </tr>
117           <tr> 
118             <td>showAnnotation</td>
119             <td>true <em>or</em> false</td>
120             <td>If true shows the annotation panel below the alignment.</td>
121           </tr>
122           <tr> 
123             <td>showConservation</td>
124             <td>true <em>or</em> false</td>
125             <td>Default is true.</td>
126           </tr>
127           <tr> 
128             <td>showQuality</td>
129             <td>true <em>or</em> false</td>
130             <td>Default is true.</td>
131           </tr>
132           <tr> 
133             <td>showConsensus</td>
134             <td>true <em>or</em> false</td>
135             <td>Default is true.</td>
136           </tr>
137           <tr> 
138             <td>sortBy</td>
139             <td> Id <em>, </em> Pairwise Identity<em>, or</em> Length</td>
140             <td> Sorts the alignment on startup</td>
141           </tr>
142           <tr> 
143             <td>RGB</td>
144             <td>colour as hex string</td>
145             <td>Background colour for applet button - purely cosmetic to blend 
146               in with your web page. For orange, enter the value FF6600</td>
147           </tr>
148           <tr> 
149             <td>embedded</td>
150             <td>true <em>or</em> false</td>
151             <td>The applet is embedded in the web page, the &quot;Start Jalview&quot; 
152               button is not displayed.</td>
153           </tr>
154           <tr> 
155             <td>windowWidth</td>
156             <td>value</td>
157             <td>frame width</td>
158           </tr>
159           <tr> 
160             <td>windowHeight</td>
161             <td>value</td>
162             <td>frame height</td>
163           </tr>
164           <tr> 
165             <td>label</td>
166             <td>label text</td>
167             <td>Change text for the Launch Jalview Button</td>
168           </tr>
169           <tr> 
170             <td>wrap</td>
171             <td>true <em>or</em> false</td>
172             <td>Opens new windows in wrapped mode</td>
173           </tr>
174           <tr> 
175             <td>linkLabel_1</td>
176             <td>EMBL-EBI Search</td>
177             <td rowspan="2"><p>Right click on sequence id to see list of available 
178                 links. Any new links MUST have $SEQUENCE_ID$ as part of the linkURL_n 
179                 value. For multiple links, increment the label and url name by 
180                 1. ie <br>
181                 &lt;param name=&quot;linkLabel_2&quot; ..., <br>
182                 &lt;param name=&quot;linkUrl_2&quot;....<br>
183               </p>
184               <p>Regular expressions may also be used (<em>since Jalview 2.4</em>) to process the ID string inserted into the URL:
185               <br>$SEQUENCE_ID=/&lt;regex to extract ID&gt;/=$<br><em>Use the debug flag to check parsing and make sure that special symbols are properly escaped (particularly when generating applet tags from CGI scripts). 
186               <br>Regex URL links are also applied to the description line (since Jalview 2.4.+).</em></p></td>
187           </tr>
188           <tr> 
189             <td> <p>
190             <br>
191                 linkUrl_1<br>
192               </p></td>
193             <td><p><br>
194                 http://www.ebi.ac.uk/ebisearch/<br/>search.ebi?db=allebi&query=$SEQUENCE_ID$</p>
195                                                 </td>
196           </tr>
197           <tr> 
198             <td>showFeatureSettings</td>
199             <td>true <em>or</em> false</td>
200             <td>Shows the feature settings window when starting the applet</td>
201           </tr>
202           <tr>
203             <td>showfeaturegroups</td>
204             <td><em>separator</em> separated list of feature groups</td>
205             <td>Display the features in the given groups on the alignment</td>
206           </tr>
207           <tr>
208             <td>hidefeaturegroups</td>
209             <td><em>separator</em> separated list of feature groups</td>
210             <td>Hide the features in the given groups on the alignment
211             (will be overridden by showfeaturegroups for group names
212             found in both lists)</td>
213           </tr>
214           <tr> 
215             <td>application_url</td>
216             <td><p><em>URL of dynamic JNLP servlet,</em></p>
217               <p>http://www.jalview.org/services/launchApp</p></td>
218             <td>Launches full application with original alignment, features and 
219               annotations files used in applet</td>
220           </tr>
221           <tr>
222           <td>separator</td>
223           <td><em>non-empty separator string</em><br>default: |</td>
224           <td>string used to separate fields in list parameters (such as <em>showfeaturegroups</em>)</td>
225           </tr>
226           <tr><td>debug</td>
227           <td>true</td>
228           <td>Instruct the applet to output additional debug messages to the java console</td>
229           </tr>
230           <tr><td>nojmol</td>
231           <td>false</td>
232           <td>When set, do not try to find Jmol classes. Set this to supress URL not found errors appearing 
233           in server logs when Jmol is not available.
234           </td>
235           </tr>
236           <tr><td>showbutton</td>
237           <td>true</td>
238           <td>Show the jalview button on the page. When false, JalviewLite will open immediately.</td>
239           </tr>
240           </tr>
241                   <tr><td>sortByTree</td>
242                   <td>true or false (default is false)</td>
243                   <td>automatically sort the associated alignment view by the tree when a new tree is opened.</td>
244                   </tr>
245                   <tr>
246                    <td>showTreeBootstraps</td><td>true or false (default is true)</td><td>show or hide branch bootstraps</td>
247                         </tr>
248         <tr><td>showTreeDistances</td><td>true or false (default is true)</td><td>show or hide branch lengths</td></tr>
249         <tr><td>showUnlinkedTreeNodes</td><td>true or false (default is false)</td><td>indicate if unassociated nodes should be highlighted in the tree view</td>
250         </tr>
251           <tr><td>heightScale</td>
252           <td>1.0 or greater</td>
253           <td>Adjust the height of each cell in the alignment grid relative to the height of a character in the alignment font. (<em>since 2.5.1</em>)</td>
254           </tr>
255           <tr><td>widthScale</td>
256           <td>1.0 or greater</td>
257           <td>Adjust the width of each cell in the alignment grid relative to the width of a character in the alignment font. (<em>since 2.5.1</em>)</td>
258           </tr>
259           <tr><td>scaleProteinAsCdna</td><td>true or false (default is false)</td>
260           <td>Set true to shown protein residues the same width as their encoding codons. 
261           For use with parameter file2 when showing a split frame of cDNA and protein. (<em>since 2.9</em>)</td></tr>
262           <tr><td>centrecolumnlabels</td>
263           <td>true or false (default is false)</td>
264           <td>When true, text labels associated with a column in the alignment will be shown centered with respect to the column. (<em>since 2.4</em>)</td>
265           <tr><td>showUnconserved</td>
266           <td>true or false (default is false)</td>
267           <td>When true, only gaps and symbols different to the consensus sequence for a column will be shown. Useful for visualizing alignments exhibiting low sequence variation, where it is important to highlight mutations. (<em>since 2.5</em>)</td>
268           </tr>
269           <tr><td>upperCase</td>
270           <td><em>bold</em> or other value</td>
271           <td>Indicate a text style to apply to uppercase sequence symbols. Currently, only <strong>bold</strong> is supported.</td>
272           </tr>
273           <tr><td>automaticScrolling</td>
274           <td>true or false (default is true)</td>
275           <td>When true, alignment panels will automatically scroll to show any regions of the alignment highlighted due to javascript events or when mousing over a position in an associated structure. (<em>since 2.6</em>)</td>
276           </tr>
277           
278           <tr><td>showGroupConsensus</td>
279           <td>true or false (default is false)</td>
280           <td>When true, shows consensus annotation row for any groups on the alignment. (<em>since 2.7</em>)</td>
281           </tr>
282           
283           <tr><td>showGroupConservation</td>
284           <td>true or false (default is false)</td>
285           <td>When true, shows amino-acid property conservation annotation row for any groups on the alignment. (<em>since 2.7</em>)</td>
286           </tr>
287           <tr><td>showConsensusHistogram</td>
288           <td>true or false (default is true)</td>
289           <td>When true, shows the percentage occurence of the consensus symbol for each column as a histogram above the consensus sequence row. (<em>since 2.7</em>)</td>
290           </tr>
291           <tr><td>showSequenceLogo</td>
292           <td>true or false (default is false)</td>
293           <td>When true, shows a sequence logo above the consensus sequence (overlaid above the Consensus Histogram, if visible, with symbols coloured using the alignment's default colourscheme). (<em>since 2.7</em>)</td>
294           </tr>
295           <tr><td>normaliseSequenceLogo</td>
296           <td>true or false (default is false)</td>
297           <td>When true, all sequence logos will be normalised (all symbol stacks add up to full height of annotation row), rather than being scaled according to the fraction of symbols identical to the consensus. (<em>since 2.8</em>)</td>
298           </tr>
299           <tr><td>oninit</td>
300           <td><em>after_init()</em></td>
301           <td>name of javascript function that will be called after the jalviewLite instance has completed its initialisation. (<em>since 2.7</em>)</td>
302           </tr>
303           <tr><td>relaxedidmatch</td>
304           <td><em>true or false (default is false)</em></td>
305           <td>When true, use stem based matching to identify sequences that match features imported from a GFF or Jalview sequence features file, and for associating PDB data (passed on PDBfile parguments) with sequences (based on a given destination sequence ID). (<em>since 2.7</em>)</td>
306           </tr>
307           <tr><td>alignpdbfiles</td>
308           <td><em>true or false (default is false)</em></td>
309           <td>When true, and jalviewLite is able to use jmol as a structure viewer, attempt to show a superposition of all structures loaded onto the alignment, superimposed using the aligned regions of corresponding sequences. [experimental] (<em>since 2.7</em>)</td>
310           </tr>
311           <tr><td>externalstructureviewer</td>
312           <td><em>true or false (default is false)</em></td>
313           <td>re-route jmol colouring commands, selection and mouseover events to an external viewer using javascript callbacks. [experimental] (<em>since 2.7</em>)</td>
314           
315           </tr>
316           <tr><td>annotationcolour_max</td>
317           <td>colour name or RGB hex triplet (default is red)</td>
318           <td>Default colour used for maximum value when shading by annotation. (<em>since 2.7</em>)</td>
319           </tr>
320           <tr><td>annotationcolour_min</td>
321           <td>colour name or RGB hex triplet (default is orange)</td>
322           <td>Default colour used for minimum value when shading by annotation. (<em>since 2.7</em>)</td>
323           </tr>
324           <tr><td>jalviewhelpurl</td>
325           <td>absolute or relative url or javascript function prefixed by <em>javascript:</em> (default is http://www.jalview.org/help.html)</td>
326           <td>Optional parameter allowing modification of the default Jalview Help URL normally opened when JalviewLite's 'Help' menu item is selected. (<em>since 2.7</em>)</td>
327           </tr>
328           <tr><td>resolvetocodebase</td>
329           <td>True or False (False)</td>
330           <td>Set to true to re-instate pre-JalviewLite 2.7 behaviour where relative URLs were prepended with the applet 'codebase' rather than the current document base URL before resolution. (<em>since 2.7</em>)</td>
331           </tr>
332           <tr><td>scoreFile</td>
333           <td>file</td>
334           <td>Multiple sequences aligment scores file. Currently is supported only the T-Coffee score_ascii file format</td>
335           </tr>
336                   </table>
337                   <p><h2><a name="appletdeploymentnotes"/>Notes on applet deployment</h2><br/>
338         <ul>
339           <li>Package all your data files into a single (or multiple) zip / jar 
340             files. This is very useful to reduce download time of large data files. 
341             The applet archive tag can take multiple entries separated by commas, 
342             eg<br>
343             <pre>&lt;applet code=&quot;jalview.bin.JalviewLite&quot;<em><strong> 
344             archive=&quot;jalviewApplet.jar, mydata.zip&quot;</strong></em>&gt;<br>
345             </pre></li>
346           <li> Use Jalview for input to a HTML form. For an example of how to 
347             code this using Javascript, click <a href="javascript:doSubmit('formComplete')">here</a>. 
348             <br>
349           </li>
350           <li>Embed Jalview into the web page, without the &quot;Start Jalview&quot; 
351             button by setting the embed parameter to true;<br>
352             &lt;param name=&quot;embedded&quot;
353           value=&quot;true&quot;&gt; </li>
354         </ul>
355         <p><strong>**NEW FEATURES** in Jalview 2.8</strong></p> 
356         <ul>
357         <li>Normalised sequence logo display
358         </li>
359         <li>RNA secondary structure annotation row
360         </li>
361 <li>Jmol compatibility updated to Jmol 12.2.x series - <a href="JmolApplet-12.2.4.jar">download the JmolApplet here</a></li>
362 <li>To use Jmol as the structure viewer for Jalview, you must include 
363             the jar file in the applet archive argument thus:<br>
364             <pre>archive=&quot;jalviewApplet.jar,Jmol-12.2.4.jar&quot;</pre>
365           </li>
366           <li>Jmol 12.2.x requires at least Java 1.6 to run in the clients web browser. If the client does not have 
367             Java 1.6, or if the Jmol-12.2.jar is not added to the archive, the 
368             original Jalview structure viewer will still be available. <br>
369           </li>
370           
371         </ul>
372         <p><strong>**NEW FEATURES** in Jalview 2.7</strong></p>
373         <ul>
374         <li>Javascript callbacks capabilities<ul><li>oninit parameter and methods for registering javascript handlers for selections, mouseovers and linking to Jmol applets on the page.</li>
375         <li>To use javascript callbacks, ensure the applet tag includes the '<a href="http://download.oracle.com/javase/6/docs/technotes/guides/plugin/developer_guide/java_js.html">mayscript</a>' attribute - either as a parameter (&lt;param name="mayscript" value="true"/;gt;) or as a bare attribute in the applet html tag).</li></ul>
376         </li>
377         <li>New <a href="javascript:doSubmit('jalviewLiteJs')">jalviewLite java api</a> methods for selecting, highlighting, scrolling and reordering sequences in an alignment view.
378         </li></ul>
379         <p><strong>**NEW FEATURES** in Jalview 2.6</strong></p>
380         <ul>
381         <li>Jmol compatibility updated to Jmol 12.1.x series</li>
382           <li>Jalview 2.6 works only with Jmol version 12.1.13 or later. You can use the JmolApplet.jar from 
383           the Jmol binary distribution available at the Jmol Sourceforge site, 
384           or <a href="JmolApplet-12.1.13.jar">download the Jmol applet from here</a></li>
385           <li>Minimum recommended version of Java runtime for the applet is now 1.5 (JalviewLite v2.6 without the Jmol viewer may work ok on earlier Java environments but compatibility can no-longer be guaranteed).</li>
386   </ul>
387         <br><strong>**NEW FEATURES** in Jalview 2.5</strong></p>
388         <ul>
389         <li>New parameters to control display of tree annotation, width of alignment columns, and to disable the jalview button and check for Jmol on startup.</li>
390   </ul>        
391         <br><strong>**NEW FEATURES** in Jalview 2.4</strong></p>
392         <ul>
393         <li>New applet API methods for feature display control, views, and obtaining current selection via javascript.</li>
394           <li>Group show and hide parameters:
395         &quot;showfeaturegroups&quot; and
396         &quot;hidefeaturegroups&quot;. Both take a list
397         of feature group names (separarated by &quot;|&quot; by default) to hide or show on the displayed
398         alignment.
399         </li>
400         <li>Regular expressions can be used in URL links for sequence IDs.</li>
401         <li>&quot;debug&quot; parameter to control verbosity of the applet's console output.</li>
402         <li>&quot;showbutton&quot; parameter to disable launch button and open JalviewLite immediatly.</li>
403         <li>&quot;nojmol&quot; parameter to disable check for Jmol classes.</li>
404         </ul><br>
405         <strong>**NEW FEATURES** in Jalview 2.3</strong></p>
406         <ul>
407           <li>Note that Parameter &quot;PDBFile&quot; now takes 
408             the PDB file followed by a space separated list of alignment sequence 
409             ids to associate the structure to. It is also possible to associate 
410             multiple PDB files by adding an incremental value to PDBFile (up to 
411             10). It is also possible to map specific sequences to specific chains 
412             by using the following notation:<br>
413             <br>
414             <pre>
415             &lt;param name=&quot;PDBFile&quot; value=&quot;First.pdb SeqA SeqB 
416             SeqC&quot;&gt;<br>
417             &lt;param name=&quot;PDBFile2&quot; value=&quot;Second.pdb 
418             A=SeqA B=SeqB C=SeqC&quot;&gt;<br>
419             &lt;param name=&quot;PDBFile3&quot; value=&quot;Third.pdb 
420             D=SeqX B=SeqY C=SeqZ&quot;&gt;<br>
421             </pre>
422           </li>
423           <li>Note parameter &quot;PDBSeq&quot; is no longer required.<br>
424           </li>
425           <li>Jalview 2.3 was updated to work with Jmol 11. See the <a href="/development">versions archive if you want to download the old Jmol applet</a>.</li> 
426             <p>&nbsp;</p>
427           </li>
428         </ul>
429         <strong>**NEW FEATURES** in Jalview 2.1</strong> 
430         <ul>
431           <li>Jalview Applet can read and display JNet secondary structure annotation 
432             directly via the <strong>jnetfile</strong> parameter. <br>
433           </li>
434           <li>Param &quot;UserDefinedColour&quot; - specify your own colours for each residue using a semi colon 
435             separated list. Multiple residues can be assigned the same colour 
436             using commas. eg:<br>
437             <pre>&lt;param name=&quot;userDefinedColour&quot; 
438             value=&quot;D,E=red; K,R,H=0022FF; C=yellow&quot;&gt;</pre>
439           </li>
440           <li>Param &quot;showFeatureSettings&quot;
441             - this will display the feature settings window when the applet starts.
442           </li>
443           <li>Param &quot;Application_URL&quot; value=&quot;http://www.jalview.org/services/launchApp&quot;<br/>
444             This calls a servlet which creates a JNLP file with the alignment 
445             file, annotations file and features file of the applet as arguments. 
446             If the user has Java installed, the returned JNLP file should start 
447             up the full Jalview Application. BUT this does not currently work 
448             for alignment files added to the applet in a zip file.
449             <br/>Look at the XML comments in the file downloaded from <a href="http://www.jalview.org/services/launchApp">The LaunchApp page</a> for full documentation.
450           </li>
451           <li>Alignment file can be a series of parameters using eg PFAM format 
452             <br>
453             <pre>&lt;param name=&quot;sequence1&quot; 
454             value=&quot;Q93XJ9_SOLTU/11-26 TSFLPRKPVVTSLKAI&quot;&gt;<br>
455             &lt;param name=&quot;sequence2&quot; value=&quot;FER1_PEA/14-29 TSFLRTQPMPMSVTTT&quot;&gt;<br>
456             </pre>(All the usual Jalview File formats are valid, however each 
457             new line in an alignment file must be entered as a parameter)</li>
458         </ul>
459 <!-- content end -->