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