Using Jalview in applets - basic html parameters

 


The applet above reads in a protein alignment in msf format and displays it in a Jalview frame.
A consensus calculation is done over all the sequences and the alignment is coloured according to each residue's agreement with the consensus.

The html to do this is:

<APPLET codebase="http://www.sdsc.edu/~damartin/jalview/"
     code="jalview.ButtonAlignApplet"
     width = 1000
     height = 35>
  <param name=input value="http://www.sdsc.edu/~damartin/jalview/lipase.msf">
  <param name=type value="URL">
  <param name=format value="MSF">
</APPLET>

Description of the html parameters

The <APPLET> tag

<APPLET codebase="http://www.sdsc.edu/~damartin/jalview/"
        code="jalview.ButtonAlignApplet"
        width = 150
        height = 40>
This line defines where the code for the applet lies (www.ebi.ac.uk) and what java class is to be called
(jalview.ButtonAlignApplet).

The width and height parameters define how many pixels the applet should take up in the browser.  In this case they  should be enough to display a button.

This CODEBASE method loads classes as and when it needs them so is probably suited for slow net connections.  An
alternative is to load all the classes at once in a jar file (~100kb).  This makes the applet slow to start but subsequent
operations faster.
 
 

To use a jar file:
 

<APPLET ARCHIVE="http://www.sdsc.edu/~damartin//jalview/jalview.jar"
        CODE="jalview.ButtonAlignApplet"
        WIDTH= 250
        HEIGHT = 40>
 

Specifying an alignment file and format

 <param name=input value="http://www.sdsc.edu/~damartin/jalview/test.msf">
 <param name=type value="URL">
 <param name=format value="MSF">
These parameters describe where to find the alignment and what format it is in.

    input - The URL of the alignment to be viewed
    type   -  Whether the alignment is a file or a URL.  Use URL here as File is not allowed for security reasons.
    format - the format of the alignment.  Allowable values are MSF, CLUSTAL, FASTA and PIR.

Advanced html parameters

The applet above reads in a protein alignment in fasta format that also contains some secondary structure predictions and definitions. The alignment is split into two groups which are displayed differently.

The protein alignment has the residue text displayed and is coloured according to each residues agreement with the consensus sequence. The secondary structure predictions/definitions have no text displayed but are coloured according to the structural element (helix/sheet).

The consensus calculation is done over a subset of the sequences in the alignment (the protein sequences). This is also specified in the html. The html to do this is :