align_ungapped#
- biotite.sequence.align.align_ungapped(seq1: Sequence, seq2: Sequence, matrix: SubstitutionMatrix | tuple[int, int] = (1, -1), score_only: bool = False) Alignment | int[source]#
Align two sequences without insertion of gaps.
Both sequences need to have the same length.
- Parameters:
- seq1, seq2Sequence
The sequences, whose similarity should be scored.
- matrixSubstitutionMatrix or tuple(int, int), optional
Either a substitution matrix or a
(match, mismatch)pair of scores. By default a match scores1and a mismatch scores-1.- score_onlybool, optional
If true return only the score instead of an alignment.
- Returns:
- scoreAlignment or int
The resulting trivial alignment. If score_only is set to true, only the score is returned.