Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 1.67 KB

README.md

File metadata and controls

34 lines (18 loc) · 1.67 KB

May 2022

Sequence Alignment Algorithms 🔡

Overview

This repository contains C++ implementations of two popular sequence alignment algorithms: Needleman-Wunsch and Hirschberg. These algorithms are widely used in bioinformatics and computational biology for aligning sequences such as DNA, RNA, or proteins 🧬.

Needleman-Wunsch Algorithm

The Needleman-Wunsch algorithm is a dynamic programming approach for global sequence alignment. It computes the optimal alignment score and traceback to determine the aligned sequences. This implementation provides a clear and concise example of how to use the algorithm in C++.

Usage

Just compile NeedlemanWunsch.cpp and run the code , providing input sequences as required in the head. The output will include the optimal alignment score and the aligned sequences.

Hirschberg Algorithm

The Hirschberg algorithm is an improvement over Needleman-Wunsch in terms of space complexity. It uses a divide-and-conquer strategy to achieve linear space complexity, making it more memory-efficient. This implementation demonstrates the application of the Hirschberg algorithm in C++.

Usage

Compile Hirschberg.cpp and run the code, providing input sequences as required. The output will include the aligned sequences.

Compilation

Both implementations can be compiled using a standard C++ compiler, such as g++.

Disclaimer 📚

This code is provided as-is, without any warranty. Use it at your own risk. It is intended for academic and educational purposes only. Feel free to explore, modify, and contribute to this repository. If you have any questions or suggestions, please open an issue or submit a pull request.

Happy coding! 🚀 </>