Sequence alignment is fundamental to bioinformatics. In fact, one of the common tasks of a bioinformatician or an omics researcher is sequence alignemnt.
Sequence alignment is used to identify similarities, homology, and functional relationships between proteins or genes in different organisms or species. By comparing sequences, we can infer evolutionary relationships and gain insights into the structure and function of biological molecules.
During sequence alignment, the aim is to achieve the highest similarity score. Keep in mind that sequence alignment can have multiple correct solutions, and the outcome may vary based on the specific implementation and scoring parameters.
I developed a C program for local sequence alignment using dynamic programming to find the optimal alignment.
This program, called SLAST (Simple Local Alignment Search Tool), generates aligned sequences via dynamic programming. Keep in mind that this is just a simple implementation and does not include the sophisticated heuristics and optimizations of more sophisticated alignment tools like BLAST used in the bioinformatics and genomics community. A full BLAST implementation involves additional complexities such as seeding and extending, filtering, statistical analysis, and database searching.
SLAST uses a dynamic programming 2-dimensional matrix that stores intermediate scores obtained during the computation of optimal alignments between two sequences. You can call it our scoring matrix. You can find the code on my github here - https://github.com/propenster/slast
See the code sections below:
Header - slast.h
Core SLAST Implementation - slast.c
Entry module - main.c
So that is it, thank you for staying with me through this.