# Alignobot

With Alignobot you can compare sequences by creating global and local alignments. Alignobot can be found at alignobot@appspot.com. Before you start an alignment be sure to select 2 sequences in the workspace.

Note: The video tutorials are hosted by an external service, because the file size limitation of the iGEM wiki kept us from uploading it to the wiki.

## Global Alignments

Alignobot finds global alignments using the Needleman/Wunsch Algorithm.

In the main menu you can either select the default distance function or specify your own. At this point the robot only supports one value for each substitution. Transition matrices will be available in a later version. Now click "Send" and Alignobot will calculate your alignment and display it:

Note: The display may slightly differ from this picture due to ongoing development.

## Local Alignment

The Alignment Robot can also find local alignments using the Smith/Waterman algorithm. As with the global alignment you can either use the default similarity function or specify your own. Again support for transition matrices is still to come. Once you have selected and sent your request, the robot will find the best local alignment of the selected two sequences. There might be more than one of them with the same score. The robot will then display all of them.

## Brief Overview of Algorithm

Alingnobot uses implementations of the Needleman/Wunsch algorithm to find global alignments and the Smith/Waterman algorithm to find local alignments. You can find the definitions on Wikipedia: Needleman/Wunsch and Smith/Waterman
Once the User clicks send the robot first loads the sequences from the workspace and checks that there are two of them. Then it evaluates the input form and the user specified cost/similarity functions if selected. If there are non-numeric characters it switches back to the default functions.
After these preparations are done the actual alignment calculation starts. The distance/similarity matrices get initialized and then filled following the algorithms.
Now the optimal score is found the robot will calculate the actual alignment using back tracing. In local alignment the robot will display all alignments with the optimal score.
Finally the robot uses the SynBioWave SequenceView function to display the output.