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