> For the complete documentation index, see [llms.txt](https://edu.abi.am/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edu.abi.am/bioinformatics-algorithms/global-and-local-alignment.md).

# Global and local alignment

There are two primary approaches to aligning two sequences. Global alignment involves aligning the entire length of both sequences, whereas local alignment focuses only on aligning regions that exhibit similarity. Global alignment is suitable for comparing sequences expected to be similar overall but may differ in some areas. In contrast, local alignment is effective for identifying similar segments within longer sequences that may otherwise differ substantially. Local alignments are commonly utilized to pinpoint functional or structural motifs within a sequence.

### Meet the family: global and local alignment

{% embed url="<https://www.youtube.com/watch?v=-bjSPP2v6_Q&list=PL2mpR0RYFQsBiCWVJSvVAO3OJ2t7DzoHA&index=37>" %}

### Practical: Implementing global alignment

{% embed url="<https://www.youtube.com/watch?v=BGV-hUoHF9k&list=PL2mpR0RYFQsBiCWVJSvVAO3OJ2t7DzoHA&index=38>" %}

### Read alignment in the field

{% embed url="<https://www.youtube.com/watch?v=u06cm08U0BQ&list=PL2mpR0RYFQsBiCWVJSvVAO3OJ2t7DzoHA&index=39>" %}

## Problems to solve (advanced)

Try to solve these problems after completing this section.

1. [Global Alignment with Scoring Matrix](https://rosalind.info/problems/glob/)
2. [Maximizing the Gap Symbols of an Optimal Alignment](https://rosalind.info/problems/mgap/)
3. [Global Alignment with Constant Gap Penalty](https://rosalind.info/problems/gcon/)
4. [Local Alignment with Scoring Matrix](https://rosalind.info/problems/loca/)

## Congratulations!

If you made it here, then congratulations! You have successfully completed this section. Move to the next portion of the guide with the arrow buttons below.
