1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*!
Supported alignment algorithms.
`Algorithm` defines the behavior for an `Aligner`. It needs to be passed to build an `Aligner`.
e.g.,
```rust
use sigalign::{Aligner, algorithms::Local};
let algorithm = Local::new(4, 6, 2, 50, 0.1).unwrap();
let aligner = Aligner::new(algorithm);
```
The `Algorithm` trait is not intended to be used directly. Instead, use the implemented algorithms.
Currently, the following algorithms are implemented:
1. **Basic**: Basic algorithm without constraints.
- `Local`: Performs local alignment.
- `SemiGlobal`: Performs semi-global alignment.
2. **With Limit**: Performs alignment with a limit on the number of alignments.
The algorithm stops after finding a certain number of alignments that satisfy the cutoffs,
which means that the results are not guaranteed to be optimal.
- `LocalWithLimit`: Local alignment with a limit.
- `SemiGlobalWithLimit`: Semi-global alignment with a limit.
3. **With Chunk**: Divides the query sequence into chunks and aligns each chunk separately.
This is useful when the query sequence is too long to be aligned at once.
- `LocalWithChunk`: Local alignment with chunking.
- `SemiGlobalWithChunk`: Semi-global alignment with chunking.
## Local vs SemiGlobal
The alignment mode in bioinformatics dictates how sequences are compared and aligned. SigAlign supports two modes: semi-global and local.
In the **semi-global** mode, either the query or the reference sequence is completely consumed at each alignment end. Examples include:
- Case 1
```text
QUERY : -------------
|||||||||
TARGET: -------------
```
- Case 2
```text
QUERY : -------------
|||||||||
TARGET: -------------
```
- Case 3
```text
QUERY : -------------
|||||||
TARGET: -------
```
- Case 4
```text
QUERY : -------
|||||||
TARGET: -------------
```
In the **local** mode, the alignment may include only parts of the target and query sequence.
For example:
- Case 1
```text
QUERY : ----------------
||||||
TARGET: ----------------
```
*/
use AlignmentRegulator;
use ;
pub use ParamsError;
use check_pattern_size;
pub use ;
pub use ;
pub use ;
/// An alignment algorithm.