How to use ComAlign


ComAlign is a program, that given a number of sequences (in the GenAl-format, see [...]) generates a number of heuristic alignments and combines these best possible.

ComAlign can be called with the following parameters (defaults in parathesis):

   ComAlign [-h|-H] [-s#] [-n#] [-i#] [-l#] [-t#] [-c#] [-a] [-f#]

where

An example

Firstly we want to generate 8 sequences of an approximate length of 50 nucleotides. They shouldn't be to closely related, so we'll simulate about 15 mutations on each sequence. This is done with the program DNAgen:

   DNAgen -n8 -l50 -g15

The output on 'stdout' will look like (in the GenAl-format):

   >Artificial generated sequence 1
   TATGGCGGATACGGGTCTTAATTGGACACAAAGGGGAACCCGATATCGC
   *
   *
   >Artificial generated sequence 2
   CTTGGCGGGGCAGGTGTCTTAAATGGGCCGCAAAAAGGAGCGTTAGCGAAT
   *
   *
   >Artificial generated sequence 3
   TATGTCGGCACACATCGTGTTAAGCTGAACAAAGCGTCCTCGCTAGGC
   *
   *
   >Artificial generated sequence 4
   TCTGCCGTAATCCGTCGGGAATAGGCCCGAGTAGGCCTCCTCGCTAGGC
   *
   *
   >Artificial generated sequence 5
   CCAACGAACTGAGCCCTTGGGTACACGCGACAGGGAGACTTCCTAGCAGC
   *
   *
   >Artificial generated sequence 6
   CGTAACGCACTAAGCCATTCGGTGAAGTGGTAGGGAGTTTCGCGAGC
   *
   *
   >Artificial generated sequence 7
   CGAGTGGAGCAAACCTTCGTTTAGCGCATTCCGAGTCATTGATGA
   *
   *
   >Artificial generated sequence 8
   TGTTGTGGGCTAGCCCTTATCTTATACGCGTTAGGCAGTCACTGAAAAA
   *
   *

Redirect the output to a file named 'sequences':

   DNAgen -n8 -l50 -g15 > sequences

Now this file will be used as input file for ComAlign. We will
align all 8 sequences and run ComAlign for 100 iterations. If
there hasn't been any change after 10 iterations we want to
abort ComAlign. On termination we wan't to see the best found
alignment. The name of the input file is 'sequences':

   ComAlign -n8 -i100 -c10 -a -fsequences

The output will look like (smaller font chosen to fit the screen):

                          current    min.     max.  ComAlign    time
                           score    score    score    score   1/100sec.
                        +--------+--------+--------+--------+----------+
     0) alignment score |   3880 |   3880 |   3880 |   3880 |       66 |
     1) alignment score |   3973 |   3880 |   3973 |   3880 |      139 |
     2) alignment score |   3954 |   3880 |   3973 |   3879 |      205 |
     3) alignment score |   3838 |   3838 |   3973 |   3838 |      273 |
     4) alignment score |   3730 |   3730 |   3973 |   3708 |      349 |
     5) alignment score |   3834 |   3730 |   3973 |   3708 |      423 |
     6) alignment score |   3886 |   3730 |   3973 |   3708 |      496 |
     7) alignment score |   3866 |   3730 |   3973 |   3708 |      566 |
     8) alignment score |   4377 |   3730 |   4377 |   3708 |      638 |
     9) alignment score |   3660 |   3660 |   4377 |   3620 |      707 |
    10) alignment score |   3642 |   3642 |   4377 |   3599 |      784 |
    11) alignment score |   4017 |   3642 |   4377 |   3599 |      853 |
    12) alignment score |   3991 |   3642 |   4377 |   3599 |      928 |
    13) alignment score |   3850 |   3642 |   4377 |   3592 |      998 |
    14) alignment score |   4074 |   3642 |   4377 |   3592 |     1069 |
    15) alignment score |   4026 |   3642 |   4377 |   3592 |     1142 |
    16) alignment score |   3941 |   3642 |   4377 |   3592 |     1214 |
    17) alignment score |   3717 |   3642 |   4377 |   3592 |     1287 |
    18) alignment score |   3844 |   3642 |   4377 |   3592 |     1360 |
    19) alignment score |   3883 |   3642 |   4377 |   3592 |     1437 |
    20) alignment score |   3850 |   3642 |   4377 |   3592 |     1509 |
    21) alignment score |   3795 |   3642 |   4377 |   3587 |     1581 |
    22) alignment score |   4256 |   3642 |   4377 |   3587 |     1657 |
    23) alignment score |   3920 |   3642 |   4377 |   3587 |     1734 |
    24) alignment score |   3976 |   3642 |   4377 |   3587 |     1809 |
    25) alignment score |   3764 |   3642 |   4377 |   3587 |     1883 |
    26) alignment score |   3670 |   3642 |   4377 |   3587 |     1958 |
    27) alignment score |   3876 |   3642 |   4377 |   3587 |     2032 |
    28) alignment score |   3953 |   3642 |   4377 |   3587 |     2110 |
    29) alignment score |   4196 |   3642 |   4377 |   3587 |     2186 |
    30) alignment score |   3673 |   3642 |   4377 |   3587 |     2263 |
                        +--------+--------+--------+--------+----------+
 

       1  T  A  T  G  G  C  G  G  A  T  A  C  G  G  G  T  -  -  C  T  T  A  A

       1  C  T  T  G  G  C  G  G  G  -  G  C  A  G  G  T  G  T  C  T  T  A  A

       1  T  A  T  G  T  C  G  G  C  -  A  C  A  C  A  T  -  -  C  G  T  G  T

       1  T  C  T  G  C  C  G  T  A  -  A  T  C  C  G  T  -  -  C  G  G  G  A

       1  C  C  -  A  A  C  G  A  A  -  C  T  G  A  G  C  -  -  C  C  T  T  G

       1  C  G  T  A  A  C  G  C  A  -  C  T  A  A  G  C  -  -  C  A  T  T  C

       1  C  G  -  A  G  T  G  G  A  -  G  C  A  A  A  C  -  -  C  T  T  C  G

       1  T  G  T  T  G  T  G  G  G  -  C  T  A  G  C  C  -  -  C  T  T  A  T
 
 

      22  T  T  G  G  -  A  C  A  C  A  A  A  G  G  G  G  A  A  -  C  C  C  G

      23  A  T  G  G  G  C  C  G  C  A  A  A  A  A  G  G  A  G  -  C  G  T  T

      21  T  A  A  G  -  C  T  G  A  A  C  A  A  A  G  C  G  T  -  C  C  T  C

      21  A  T  A  G  G  C  C  C  G  A  G  T  A  G  G  C  C  T  -  C  C  T  C

      20  G  G  T  A  C  A  C  G  C  G  A  C  A  G  G  G  A  G  A  C  T  T  C

      21  G  G  T  G  -  A  A  G  T  G  G  T  A  G  G  G  A  G  -  T  T  T  C

      20  T  T  T  A  -  G  C  G  C  A  T  T  C  C  G  -  A  G  -  T  C  A  T

      21  C  T  T  A  T  A  C  G  C  G  T  T  A  G  G  C  A  G  -  T  C  A  C
 
 

      43  A  T  A  T  -  C  G  C

      45  A  G  C  G  -  A  A  T

      42  G  C  T  A  -  G  G  C

      43  G  C  T  A  -  G  G  C

      43  C  T  A  G  C  A  G  C

      42  G  C  -  G  -  A  G  C

      40  T  G  -  A  -  T  G  A

      43  T  G  A  A  -  A  A  A

   Statistics: Best score:             3587
                 found after:            21  iterations
               Total time elapsed:     2263  1/100 sec.
                 + overhead time:         2  1/100 sec.
 

Running MSA on the same sequences gives us a score of 3662 in just
1.850 seconds. Now we would like to see how long it takes ComAlign
to find a solution that is at least as good as MSA's solution AND
we want to know what ComAlign's best solution was after spending the
same amount of computation time as MSA spent:

   ComAlign -n8 -i100 -l3662 -t185 -a -fsequences

Resulting in:

                          current    min.     max.  ComAlign    time
                           score    score    score    score   1/100sec.
                        +--------+--------+--------+--------+----------+
     0) alignment score |   3880 |   3880 |   3880 |   3880 |       67 |
     1) alignment score |   3973 |   3880 |   3973 |   3880 |      137 |
     2) alignment score |   3954 |   3880 |   3973 |   3879 |      208 |
     3) alignment score |   3838 |   3838 |   3973 |   3838 |      273 |
     4) alignment score |   3730 |   3730 |   3973 |   3708 |      341 |
     5) alignment score |   3834 |   3730 |   3973 |   3708 |      416 |
     6) alignment score |   3886 |   3730 |   3973 |   3708 |      487 |
     7) alignment score |   3866 |   3730 |   3973 |   3708 |      557 |
     8) alignment score |   4377 |   3730 |   4377 |   3708 |      631 |
     9) alignment score |   3660 |   3660 |   4377 |   3620 |      705 |
    10) alignment score |   3642 |   3642 |   4377 |   3599 |      778 |
    11) alignment score |   4017 |   3642 |   4377 |   3599 |      847 |
    12) alignment score |   3991 |   3642 |   4377 |   3599 |      916 |
    13) alignment score |   3850 |   3642 |   4377 |   3592 |      988 |
    14) alignment score |   4074 |   3642 |   4377 |   3592 |     1060 |
    15) alignment score |   4026 |   3642 |   4377 |   3592 |     1132 |
    16) alignment score |   3941 |   3642 |   4377 |   3592 |     1202 |
    17) alignment score |   3717 |   3642 |   4377 |   3592 |     1279 |
    18) alignment score |   3844 |   3642 |   4377 |   3592 |     1352 |
    19) alignment score |   3883 |   3642 |   4377 |   3592 |     1445 |
    20) alignment score |   3850 |   3642 |   4377 |   3592 |     1527 |
    21) alignment score |   3795 |   3642 |   4377 |   3587 |     1599 |
    22) alignment score |   4256 |   3642 |   4377 |   3587 |     1676 |
    23) alignment score |   3920 |   3642 |   4377 |   3587 |     1751 |
    24) alignment score |   3976 |   3642 |   4377 |   3587 |     1825 |
    25) alignment score |   3764 |   3642 |   4377 |   3587 |     1900 |
    26) alignment score |   3670 |   3642 |   4377 |   3587 |     1979 |
    27) alignment score |   3876 |   3642 |   4377 |   3587 |     2052 |
    28) alignment score |   3953 |   3642 |   4377 |   3587 |     2134 |
    29) alignment score |   4196 |   3642 |   4377 |   3587 |     2207 |
    30) alignment score |   3673 |   3642 |   4377 |   3587 |     2284 |
    31) alignment score |   3630 |   3630 |   4377 |   3587 |     2360 |
    32) alignment score |   4062 |   3630 |   4377 |   3587 |     2441 |
    33) alignment score |   4020 |   3630 |   4377 |   3587 |     2522 |
    34) alignment score |   3735 |   3630 |   4377 |   3587 |     2598 |
    35) alignment score |   3844 |   3630 |   4377 |   3587 |     2675 |
    36) alignment score |   3741 |   3630 |   4377 |   3587 |     2751 |
    37) alignment score |   3979 |   3630 |   4377 |   3587 |     2828 |
    38) alignment score |   4007 |   3630 |   4377 |   3587 |     2906 |
    39) alignment score |   3705 |   3630 |   4377 |   3587 |     2989 |
    40) alignment score |   3806 |   3630 |   4377 |   3587 |     3066 |
                        +--------+--------+--------+--------+----------+
 

       1  T  A  T  G  G  C  G  G  A  T  A  C  G  G  G  T  -  -  C  T  T  A  A

       1  C  T  T  G  G  C  G  G  G  -  G  C  A  G  G  T  G  T  C  T  T  A  A

       1  T  A  T  G  T  C  G  G  C  -  A  C  A  C  A  T  -  -  C  G  T  G  T

       1  T  C  T  G  C  C  G  T  A  -  A  T  C  C  G  T  -  -  C  G  G  G  A

       1  C  C  -  A  A  C  G  A  A  -  C  T  G  A  G  C  -  -  C  C  T  T  G

       1  C  G  T  A  A  C  G  C  A  -  C  T  A  A  G  C  -  -  C  A  T  T  C

       1  C  G  -  A  G  T  G  G  A  -  G  C  A  A  A  C  -  -  C  T  T  C  G

       1  T  G  T  T  G  T  G  G  G  -  C  T  A  G  C  C  -  -  C  T  T  A  T
 
 

      22  T  T  G  G  -  A  C  A  C  A  A  A  G  G  G  G  A  A  -  C  C  C  G

      23  A  T  G  G  G  C  C  G  C  A  A  A  A  A  G  G  A  G  -  C  G  T  T

      21  T  A  A  G  -  C  T  G  A  A  C  A  A  A  G  C  G  T  -  C  C  T  C

      21  A  T  A  G  G  C  C  C  G  A  G  T  A  G  G  C  C  T  -  C  C  T  C

      20  G  G  T  A  C  A  C  G  C  G  A  C  A  G  G  G  A  G  A  C  T  T  C

      21  G  G  T  G  -  A  A  G  T  G  G  T  A  G  G  G  A  G  -  T  T  T  C

      20  T  T  T  A  -  G  C  G  C  A  T  T  C  C  G  -  A  G  -  T  C  A  T

      21  C  T  T  A  T  A  C  G  C  G  T  T  A  G  G  C  A  G  -  T  C  A  C
 
 

      43  A  T  A  T  -  C  G  C

      45  A  G  C  G  -  A  A  T

      42  G  C  T  A  -  G  G  C

      43  G  C  T  A  -  G  G  C

      43  C  T  A  G  C  A  G  C

      42  G  C  -  G  -  A  G  C

      40  T  G  -  A  -  T  G  A

      43  T  G  A  A  -  A  A  A

   Statistics: Best score:             3587
                 found after:            21  iterations
               Total time elapsed:     3066  1/100 sec.
                 + overhead time:        12  1/100 sec.
               Time needed to find an alignment with
                 score <=   3662:       705  1/100 sec.
               Score of best alignment found within
                185 (1/100 sec.):      3880

So it took ComAlign a bit more than 7 seconds to find a solution as good as what MSA proposed and after 1.85 seconds the best possible combination ComAlign could find scored 3880. So for these relatively short sequences MSA clearly is faster in finding a suboptimal solution.
 

Other examples