ALINE: colouring, numbering and annotation

Aline is an extensible WYSIWYG protein sequence alignment editor for publication quality figures. It can  read common sequence alignment formats which the user can then alter, embellish, markup etc to produce the kind of sequence figure commonly found in biochemical articles. Its homepage is here.

Aline is an interactive perl/tk application and can be installed from SBo. I have used the program to create visually appealing  multiple sequence alignment (MSA) figures and decided to list a few basic steps.

Colour scheme

To set a colour scheme:
  • choose a colour scheme from ‘Colouring > Predefined colour scheme’
  • set the scheme ‘Colouring > By similarity’
  • pick which sequences you want
  • adjust “Low similarity cutoff” and click ‘Run’
To choose a custom colour scheme:
  •  go ‘Colouring > Load colour scheme’
  •  set it as above ‘Colouring > By similarity’
To modify the scheme
  • go ‘Colouring > Edit colour scheme’
  • save it from ‘Colouring > Save colour scheme’ menu

Sequence annotation

Insert an empty row for your annotation:
  • select the ‘Insert blank row’ button from the ‘Actions’ panel
  • click on an existing sequence row
  • the new blank row will be inserted abov
  • …or you can just right-click on a row and do all that from the context menu
Draw in the blank row the topology of your sequence of choice:
  • shapes are in the ‘Draw’ panel — click on the side button of the “Helix” shape to see them all
  • choose what you want
  • to draw the selected shape, left-click on the empty row and drag
  • you can select a different line and fill colour from the ‘Attributes’ panel
  • …of course, you should know the coordinates of your domains. The SMART database is a good place to predict these.

Residue numbering

To enumerate the sequence you want to use as a reference, better put it as the first sequence:
  • click the ‘Drag row’ button from the ‘Actions’ panel
  • left-click on the row you want to drag
  • move it up
To add residue number:
  • go to ‘Tools > Add residue numbers’
  • specify which sequence the numbering will follow
  • where to be drawn, etc.

This will follow the uninterrupted residue number of the selected sequence. It will skip any gaps created by the MSA program. In most cases this is what you want. You may, however, want to add numbering that corresponds to the length of the whole MSA, not individual sequences. I did not find a way to do this directly. Therefore, I created a fasta file that contained only the “X” character, that ALINE will interpret as unidentified residue. For example if my MSA was 200 amino acids long, I made a fasta file with 200 “X” characters. Like this:


To append it to your MSA, go to ‘Edit > Insert sequences from file’. Add residue numbers as above but this time based on this “RULER” sequence. Once the numbering is inserted, you can delete the “RULER” row. The numbers will stay.

Exporting graphics

Once you have the MSA coloured and pretty, you have to export it. I would recommend exporting it as EPS (File > Export postscript). You can open it with another graphics manipulation software. I use Inkscape and from there you can export in a number of vector or raster graphic formats.


One thing I found a bit inconvenient was the maximum row length. It is 100 characters by default. I just opened the /usr/bin/aline perl executable and modified line 1523:

    # Scale bars
    my $sframe = $info->Frame(qw/-borderwidth 2 -relief raised/)->pack(qw/-side top -expand 1 -fill both/);
    $sframe->Label(-text=>"Adjust:",-anchor=>'w',-bg=>$cfg{wcs}[2])->pack(qw/-fill x/);
    $ui{cshscale}=_mySlider($sframe,'Horizontal spacing',8,32,12,'csh',2);
    $ui{csvscale}=_mySlider($sframe,'Vertical spacing',8,32,12,'csv',2);
    $ui{fsiscale}=_mySlider($sframe,'Font scale',10,400,$par{fsi}*100,'fsi',5);
    $ui{nchscale}=_mySlider($sframe,'Width in characters',10,1000,40,'nch',0);
    $ui{ttlscale}=_mySlider($sframe,'Title width',0,20,$par{lin},'lin',0);

I am going to add the option to my aline.SlackBuild to do this for you, when I submit an update of the script. UPDATE (11 Apr 2015): the option is added, just pass ROW=1000 to the script.


Bond, C.S. and Schüttelkopf, A.W. (2009), Acta cryst. D65, 510-512

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s