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://circinus.ebi.ac.uk:6543/jalview/"
code="jalview.ButtonAlignApplet"
width = 1000
height = 35>
<param name=input value="http://circinus.ebi.ac.uk:6543/jalview/lipase.msf">
<param name=type value="URL">
<param name=format value="MSF">
</APPLET>
<APPLET codebase="http://www.ebi.ac.uk/~michele/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
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.ebi.ac.uk/~michele/jalview/jalview.jar"
CODE="jalview.ButtonAlignApplet"
WIDTH= 250
HEIGHT = 40>
<param name=input value="http://www.ebi.ac.uk/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.
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 :
<APPLET archive="http://circinus.ebi.ac.uk:6543/jalview/jalview.jar"
code="jalview.ButtonAlignApplet" width = 100 height = 35>
<PARAM name=input value="http://circinus.ebi.ac.uk:6543/jalview/test2.fa">
<PARAM name=type value="URL"><PARAM name=format value="FASTA">
<PARAM name="groups" value="2"><PARAM name="group1" value="1-36:PID:true:true:false">
<PARAM name="group2" value="37-45:SECONDARY:false:true:true">
<PARAM name=fontsize value="10">
<PARAM name="mailServer" = value = "circinus.ebi.ac.uk">
<PARAM name="Consensus" value="1-36">
</APPLET>
<param name="groups" value="2">
<param name="group1" value="1-36:PID:true:true:false">
<param name="group2" value="37-45:SECONDARY:true:false:false">
groups - the number of groups defined
<sequences in group> :
<colour scheme> : <display boxes> : <display text> : <colour
text>
20-26
Sequences 20,21,22,23,2425,26 are in the group
1,2,4
Sequences 1,2 and 4 are in the group
10-15,2,6-7
Sequences 2,6,7,10,11,12,13,14,15 are in the group
Allowed values are
ZAPPO
- colour residues by physio-chemical properties
PID
- colour residues by percentage identity agreement with consensus sequence
BLOSUM62
- colour residues by agreement with consensus or +ve BLOSUM62 score with
consensus residue
HYDROPHOBIC - colour residues by hydrophobicity
(red - hydrophobic, blue - hydrophilic).
SECONDARY -
colour residues by secondary structure (H - magenta, E - yellow).
<PARAM name="Consensus" value="1,4,6-10">You can also select all the sequences by
<PARAM name="Consensus" value = "*">
<PARAM name="numseqs" value=3>
<PARAM name="seq1" value="ALSDKFHLKRHELKHASLDKHLKHR">
<PARAM name="seq2" value="ALSDKFHLKRHE-----LDKHLKHR">
<PARAM name="seq3" value="ALSDKFHLKRHELKHALKFL-HLKHR">Optionally you can supply parameters that define the ids for each of the sequences as follows:
<PARAM name="id1" value="LCAT_HUMAN">
<PARAM name="id2" value="LCAT_YEAST">
<PARAM name="id3" value="LCAT_MOUSE">If you don't supply ids then the defaults will be Seq_1 Seq_2 etc.