# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edu.abi.am/bioinformatics-algorithms/global-and-local-alignment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
