align_local_ungapped#

biotite.sequence.align.align_local_ungapped(seq1: Sequence, seq2: Sequence, matrix: SubstitutionMatrix | tuple[int, int], seed: tuple[int, int], threshold: int, direction: str = 'both', score_only: bool = False, check_matrix: bool = True) → Alignment | int[source]#

Perform a local alignment extending from given seed position without inserting gaps.

Deprecated since version Use: SeedExtension instead.

Parameters:
seq1, seq2Sequence

The sequences to be aligned.

matrixSubstitutionMatrix or tuple(int, int)

Either a substitution matrix or a (match, mismatch) pair of scores.

seedtuple(int, int)

The indices in seq1 and seq2 where the local alignment starts. The indices must be non-negative.

thresholdint

If the current score falls this value below the maximum score found, the alignment terminates.

direction{‘both’, ‘upstream’, ‘downstream’}, optional

Controls in which direction the alignment extends starting from the seed (see SeedExtension).

score_onlybool, optional

If set to True, only the similarity score is returned instead of the Alignment.

check_matrixbool, optional

If set to False, the matrix is not checked for compatibility with the alphabets of the sequences.

Returns:
alignmentAlignment

The resulting ungapped alignment. Only returned, if score_only is False.

scoreint

The alignment similarity score. Only returned, if score_only is True.

See also

SeedExtension

The non-deprecated, reusable replacement for this function.

align_local_gapped

For gapped local alignments with the same X-Drop technique.